turtlebot with namespace in gazebo and visualization in rviz
Hi, I need to bring up multiple turtlebots in gazebo, so I gave each of them a namespace. The way I did this is just modify the turtlebot_world.launch file in turtlebot_gazebo pkg. If I just bring up one turtlebot without namespace, I can use roslaunch turtlebot_gazebo gmapping_demo.launch
and roslaunch turtlebot_rviz_launchers view_navigation.launch
to open rviz successfully. What I did is like these:
- bring up one turtlebot with namespace robot0,
- change the arg name,"scan_topic" from /scan to robot0/scan in gmapping.launch.xml,
- create a agent.rviz file by adding robot0/ before several topics in navigation.rviz. exp:from Topic: /mobile_base/sensors/bumper_pointcloud to Topic: robot0/mobile_base/sensors/bumper_pointcloud
But What I can achieve is only bringing up multiple turtlebots with different namespaces, but rviz can not find these turtlebots. I don't know what should I do to make things work.
Thanks