0
$\begingroup$

Rosanswers logo

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!


Originally posted by AmateurHour on ROS Answers with karma: 95 on 2018-07-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Reamees with karma: 591 on 2018-07-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by AmateurHour on 2018-07-18:
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.

Comment by Reamees on 2018-07-18:
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.

Comment by Reamees on 2018-07-18:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.