Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use opaque function to allow for remapping of scan topics #293

Merged
merged 2 commits into from Nov 1, 2023

Conversation

hilary-luo
Copy link
Contributor

@hilary-luo hilary-luo commented Oct 31, 2023

Description

Remap scan topics when launching nav2 so that the costmaps subscribe to the correct scan topic and so that dynamic objects appear in the costmaps so that they are avoided.

Fixes #247.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Simulated and then tested with a turtlebot4 lite to ensure that when running Nav2 + localization with and without namespacing, unmapped / dynamic obstacles appear in the costmaps and the robot avoids said obstacle. In simulation this can be done by inserting cubes / cylinders and with the real robot you can walk around the robot and observe the reactions.

# Run this command for sim
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py nav2:=true slam:=false localization:=true rviz:=true namespace:=robot1

# Run these commands for physical robots
ros2 launch turtlebot4_viz view_robot.launch.py namespace:=robot2
ros2 launch turtlebot4_navigation localization.launch.py namespace:=/robot2 map:=office.yaml # replace with your map file
ros2 launch turtlebot4_navigation nav2.launch.py namespace:=/robot2

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@hilary-luo hilary-luo merged commit 7785cee into humble Nov 1, 2023
2 checks passed
@hilary-luo hilary-luo deleted the hl/nav-namespace-patch branch November 1, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Voxellayer/Obstaclelayer does'nt subscribe to right topic
2 participants