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

Revision history [back]

click to hide/show revision 1
initial version

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.