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

Setting up a multirobot system and navigation stack (Turtlebots in Gazebo and Rviz)

asked 2017-01-21 06:55:25 -0500

ECB gravatar image

updated 2017-01-21 08:18:16 -0500

Hello all,

I recently took a Robotics course in Istanbul Technical University and worked on setting up a multi-robot system as my term project. I found the resources on that subject very limited (especially for beginners like me). Therefore, I am posting my answer to "how to set up a multi-robot system and navigation stack" here, hoping it might give some insight to people who are willing to work on this subject.

Thanks Jakub on the great QA here, I built my work on top of his. And special thanks to Damien Jade Duff for teaching and assisting me debugging the system.

The system was implemented and tested on Ubuntu 16.04 with Ros Kinetic. You can download the files here.

edit retag flag offensive close merge delete

Comments

1

Where you able to fix the transform issue between map & base_link?

Kishore Kumar gravatar image Kishore Kumar  ( 2018-03-16 19:59:36 -0500 )edit
1

Yes @Kishore, check out the tftree after launching the system.

ECB gravatar image ECB  ( 2018-04-09 05:30:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-01-21 06:53:17 -0500

ECB gravatar image

updated 2017-01-21 08:20:10 -0500

Implementation

Implementation of the system is explained in the following list (bulleted list explains what is all included in that particular element of the numbered list):

  1. gazebo_multirobot.launch

    • empty_world.launch (starts Gazebo with empty_world)
    • view_navigation.launch (starts Rviz)
    • multirobot.launch (explained in the 2nd element below)
  2. multirobot.launch (Launching one_robot.launch with different namespaces multiple times. One might include as many robots as he/she wants as long as the hardware allows)

    • one_robot.launch (launches a single robot with a given namespace. Details about what it all includes are given in the 3rd element)
  3. one_robot.launch

    • kobuki.launch.xml (describes a kobuki robot and what its pose should be in the world)
    • tf (for necessary transforms between /world and robot_namespace/map)
    • map_server (loading the map file for a robot)
    • robot_state_publisher (publishes the state of the robot to tf with given frequency)
    • move_base_gazebo.launch (starts move_base node with given costmap config files)
    • amcl.launch.xml (starts amcl node)
    • laserscan_nodelet_manager (generating fake laserscan messages)

Running the System

Once you have the "multirobot" file in your workspace, open a terminal window and type:

roslaunch multirobot gazebo_multirobot.launch

This should start Gazebo and Rviz with 2 turtlebots unless you edit launch files.

I added 3 navigation buttons in Rviz to easily assign 2D Nav Goal for up to 3 robots. If you need more robots in the system, you can either check 'multirobot->rviz->navigation.rviz' to add more buttons or simply right click on 2d nav goal and check 'tool properties'

edit flag offensive delete link more

Comments

1

Hello there Just want to ask, does this package compatible with ROS Indigo ?

Thanks

Foo gravatar image Foo  ( 2017-06-28 04:07:18 -0500 )edit
1

Hi there. I'm trying to launch the simulation. However, gazebo got stuck and rviz cannot find a "world" frame. What could be the reason? Can you offer all the packages that is needed to be installed for multirobot to work?

Thanks

Edit: Waiting like 2 minutes resolved the issue. Great app!

tahsinkose gravatar image tahsinkose  ( 2017-07-27 09:08:40 -0500 )edit
1

Sorry, for the late reply. I will need to review my email settings I guess. @Foo: Unfortunately, I haven't tried. But, if you have Indigo installed, give it a try and let me know the results. If you face any errors, I could try to help you debug it. @tahsinkose: Glad it worked for you.

ECB gravatar image ECB  ( 2017-10-11 07:55:37 -0500 )edit
1

Hello, I am confused about the line 2 in the 3rd element. "tf (for necessary transforms between /world and robot_namespace/map)" Could you please give me some explanations for this and how can I do it? I hope this can fix my problem. Thank you in advanced!

nightwish gravatar image nightwish  ( 2018-06-05 10:57:13 -0500 )edit
1

@nightwish: 1)

Hi, Let's say you have a system with 2 robots. In simplest terms, if we were to show each robot the same point on the map and ask them what the coordinates for this point were, each answer would be different. This is because their coordinate frames are different.

ECB gravatar image ECB  ( 2018-10-24 06:34:27 -0500 )edit
1

@nightwish: 2)

E.g. Robot1 says where it stands is the origin, Robot2 says where Robot1 is standing is P(-400,359). So, you have 3 different coordinate frames in such a scenario; Robot1's frame, Robot2's frame, and world frame. I think of the world frame as an observer's view from outside.

ECB gravatar image ECB  ( 2018-10-24 06:36:19 -0500 )edit
1

@nightwish: 3)

tf does translations between coordinate frames. E.g. Robot1 says it is standing at Point(3,5). I want Robot2 to go to that point which according to Robot1 is Point(3,5). So, I will ask tf to tell me what Robot2 calls that point in its own coordinate frame. So, I can send Robot2 there

ECB gravatar image ECB  ( 2018-10-24 06:38:34 -0500 )edit
1

@nightwish: 4)

I strongly suggest you to check the official documentation here. And follow the tutorials there for a better understanding of tf. Take care.

ECB gravatar image ECB  ( 2018-10-24 06:39:40 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-01-21 06:42:01 -0500

Seen: 2,519 times

Last updated: Jan 21 '17