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

Hello Marco,

if you completed the 4th tutorial, you are almost there. Just add the Operator and Navigator (and optionally the ActionClients) two both robot namespaces with the same parameters as in tutorial3. And don't forget to remove the sim_joy node, so the Operator can take control of the robots.

Then you can start the first robot with:

rosservice call /robot_0/StartMapping 3
// Wait for it to finish
rosservice call /robot_0/StartExploration 2

The most tricky part is how to activate the localization on the second robot. You can either add a joy_node and remote_controller to the "robot_1" namespace and do it manually by driving it around like in tutorial 4, or you set the action goal manually with:

rostopic pub /robot_1/Localize/goal nav2d_navigator/LocalizeActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  velocity: 0.5"

Just TAB after "nav2d_navigator/LocalizeActionGoal" to complete the message and change the velocity to something > 0. However this sometimes fails depending on the map. If the localization succeeded, you can start the second robot with:

rosservice call /robot_1/StartExploration 2

Now both robots will explore until the map is completely covered.