Skip to content

lineworld-lab/ros2_lidar_merger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ros2_lidar_merger

rviz_snapshot.png

This ROS2 C++ package merges the LaserScan messages from two 2D LiDARs into a single LaserScan message.

The package has been tested on ROS2 Humble.

Requisites

Your LiDARs have to be installed in same z direction (Both upward or both downward).

Parameters

parameter_explained.png

The lidar merger node has the following parameters:

  • first_lidar_yaw (required): The yaw angle of the first LiDAR relative to the robot's heading.
  • second_lidar_yaw (required): The yaw angle of the second LiDAR relative to the robot's heading.
  • x_diff (required): The distance between the second LiDAR and the first LiDAR in a coordinate system where the +y axis indicates the robot's heading.
  • y_diff (required): The distance between the second LiDAR and the first LiDAR in a coordinate system where the +y axis indicates the robot's heading.

Installation

Clone this repository into your ROS2 workspace:

cd /path/to/workspace/src
git clone https://github.com/lineworld-lab/ros2_lidar_merger.git
mv ros2_lidar_merger lidar_merger

Build:

cd /path/to/workspace
colcon build

Usage

Command line example:

ros2 run lidar_merger lidar_merger --ros-args -p first_lidar_yaw:=-0.785 -p second_lidar_yaw:=2.356 -p x_diff:=-0.49 -p y_diff:=-0.74 -r __ns:=/amr_1

Launch file example:

  lidar_merger = Node(
    package="lidar_merger",
    executable="lidar_merger",
    namespace=namespace,
    parameters=[
        {"first_lidar_yaw": -1.0 / 4.0 * PI},
        {"second_lidar_yaw": 3.0 / 4.0 * PI},
        {"x_diff": -0.49},
        {"y_diff": -0.74},
    ],
    output="screen"
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published