ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Rviz and Namespaces with explore_lite

asked 2018-07-17 12:05:41 -0600

AmateurHour gravatar image

Hello! I am attempting to run multiple turtlebot3s on my Ubuntu16.02 using the package explore_lite. My current strategy is to use namespaces to launch individual robots,

  • after roscore, starting on my ssh turtlebot with ROS_NAMESPACE=tb3_1 roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="tb3_1" set_lidar_frame_id:="tb3_1/base_scan" ,
  • followed by ROS_NAMESPACE=tb3_1 roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping multi_robot_name:=tb3_1.
  • Problems arise after the following move_base launch command : ROS_NAMESPACE=tb3_1 roslaunch turtlebot3_navigation move_base.launch multi_robot_name:=tb3_1 which throws the error Costmap2DROS transform timeout [...] Could not get robot pose, cancelling reconfiguration

I tried to go into global_costmap_params.yaml and change the global_frame from /map to /tb3_1/map , but I was given an error saying that 'target_frame tb3_1/map does not exist`. Any tips are greatly appreciated! Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-18 02:03:38 -0600

Reamees gravatar image

I have no experience with using the ROS_NAMESPACE variable. In my opinion it is better to set the namespace inside the launch file. Which you might be doing as well, can't tell without seeing the launch files. If you do set them in the launch files and are using the ROS_NAMESPACE variable then I think your namspace may end up like /tb3_1/tb3_1/robot_state_publisher.

To resolve your issue you will have to trace down what is connected to what and what each node is actually expecting. rosnode list, rosnode info your_node, rostopic list, rostopic info your_topic, rosparam list, rosparam get your_param, rosrun rqt_tf_tree rqt_tf_tree, etc are just a few of the commands that you should always be using to find out where the problem is, atleast to the point that other people can help when you ask a question. If you have two nodes that should be communicating run rosnode info on the nodes to see if they are subscribing/publishing to the correct topics.

Running multiple robots in different namespaces is a problem that has been solved many times, here is a very thorough answer on answers.ros for the same question. I would start there, or google for more examples.

edit flag offensive delete link more


Yes, I have the questions that have already been answered on the forum and they were of very little use to me because they are all modeling in a simulation environment. I am trying to run robots in a real environment and have no experience with using any kind of namespace, thus my question. Thanks.

AmateurHour gravatar image AmateurHour  ( 2018-07-18 07:50:15 -0600 )edit

You're welcome. Namespaces should work the same way in simulations as they do in the real world. Working with namespaces could be confusing at first, there are a lot of things that can and will go wrong. It is usually easier to debug the simulation than the actual thing.

Reamees gravatar image Reamees  ( 2018-07-18 13:38:33 -0600 )edit

I would also suggest reading through the name ros wiki page if you have yet not done so. Even if some of it might not make immediate sense, it will be good to have read it.

Reamees gravatar image Reamees  ( 2018-07-18 13:39:59 -0600 )edit

Question Tools



Asked: 2018-07-17 12:05:41 -0600

Seen: 930 times

Last updated: Jul 18 '18