Skip to content

This ROS2 node subscribes to two different map messages, merges them, and publishes the merged map to the /merge_map topic.

License

Notifications You must be signed in to change notification settings

abdulkadrtr/mapMergeForMultiRobotMapping-ROS2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mapMergeForMultiRobotMapping-ROS2

This ROS2 node subscribes to two different map messages, merges them, and publishes the merged map to the /merge_map topic.

How does it work

The Merge Map ROS2 package is designed to merge map messages from /map1 and /map2 topics, and publish the merged map to the /merge_map topic. To use this package, follow the instructions below:

  1. Copy the merge_map folder to the src directory of your ROS2 workspace.
  2. Run the following command: ros2 launch merge_map merge_map_launch.py This command starts the map merging node and opens an RViz2 window.
  3. In the RViz2 window, you can observe the merged map. Whenever one of the maps being merged is updated, the merge_map node will also update the merged map accordingly.

Make sure to have ROS2 installed and properly configured in your environment before using this package. For more information, please refer to the ROS2 documentation.

launch.py customization

The Merge Map ROS2 package can be customized and launched in your own launch.py file by adding the following code block. You can update /yourMapName1 and /yourMapName2 topics according to your project:

Node(
    package='merge_map',
    executable='merge_map',
    output='screen',
    parameters=[{'use_sim_time': True}],
    remappings=[
        ("/map1", "/yourMapName1"),
        ("/map2", "/yourMapName2"),
    ],
),

Example

About

This ROS2 node subscribes to two different map messages, merges them, and publishes the merged map to the /merge_map topic.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages