Page tree
Skip to end of metadata
Go to start of metadata

The move_base package is a fairly complex application with a variety of options that can be specified by the user.  Building our example of using amcl navigation to simultaneously localize two robots (see Assignment 7: Leader Follower and RFID (19-3)), we'd like to be able to add two move_base nodes to the system and be able to command each robot to go to a different pose (position and attitude) relative to the map.

As you might expect, this requires that we launch two move_base nodes, one within the namespace and tf_prefix that corresponds to each of our turtlebots.  For our example we use the same string for both the namespace and tf_prefix: tb3_0  and tb3_1

Example

We have an example in the turtlebot3_nps ROS package.

  1. Start by following the instructions at Assignment 7: Leader Follower and RFID (19-3) to bring up the robots and all the nodes on the laptop (two robot_state_publishers, two amcl nodes, etc.)
  2. Then we can start two move_base nodes

     roslaunch turtlebot3_nps move_base_two.launch 

    If you look  at this launch file (move_base_two.launch) you will see that it calls the same launch file twice (move_base_namepsace.launch), setting the appropriate configuration values for the namespace and tf_prefix of tb3_0  and tb3_1.

  3. You may also notice that RVIX has two menu buttons for setting the 2D Nav Goal

    The one on the left sends a message on the  tb3_0/move_base_simple/goal  topic, while the one on the left sends a message on the tb3_1/move_base_simple/goal  topic.
  4. Note that the move_base status and result messages (e.g., rostopic echo /tb3_0/move_base/status) are published by each node.


  • No labels