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

multirobot interaction using turtlebot

asked 2013-04-15 20:56:21 -0600

joy gravatar image

updated 2014-01-28 17:16:11 -0600

ngrennan gravatar image

Hello everybody,

I have a very basic question regarding multi-robot interaction. How can I make two robots share the same roscore?

My basic job is to interact between two robots via some topic. The multi-robot example given in ROS wiki makes one of the system the workstation and the other the actual robot. What I am really trying is to have a single workstation with multiple robot connected to it to interact via topic. So how is the ROS_MASTER_URI coupled? Also if the robots are sharing the same environment how is data sent to a topic by a robot resolved by the workstation?

I also looked at alternate ways like foreign_relay and it suits my need best. But the documentation in wiki for it is really the heading and nothing else! :( Any pointers on how I could learn more about this would be great. (I am not a network guy so I guess I am having hard time figuring out the code given multimaster experimental package)

Any help regarding this matter would be greatly appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2013-04-17 00:38:40 -0600

updated 2013-04-18 04:36:51 -0600

If you simply want two robots and one worksstation PC to communicate via network, and you can guarantee full network connectivity at all times between all involved PCs, you don't need multimaster. Instead, you can just use the built-in ROS functionality. There's a tutorial here.

UPDATE1: To avoid name conflicts, you need to remap everything related to a specific robot into a namespace. So robot1 would receive commands on the topic /robot1/cmd_vel, robot2 likewise on the topic /robot2/cmd_vel, and both could exchange messages via some topic, say /shared_topic. The master needs to run on one of those robots (or on an entirely different PC), it doesn't really matter where it runs. The only important thing is that there is exactly one master, and all other PCs connect to it.

edit flag offensive delete link more

Comments

In this tutorial one of them is a workstation and other a turtlebot. The workstation system does'nt function normally like a turtlebot. Say I want to move one turtlebot, then pass message to the other turtlebot(here a workstation) which starts moving after receiving the message.How to do that?

joy gravatar image joy  ( 2013-04-17 09:57:32 -0600 )edit

I don't think I understood what you want to do exactly. Where the involved PCs are mounted (as a workstation or on a robot) doesn't matter. You can easily run the rosmaster on one turtlebot and connect from the other turtlebot, if you want.

Martin Günther gravatar image Martin Günther  ( 2013-04-18 01:20:33 -0600 )edit

Sorry let me rephrase. I am trying to share all /topic between two robots. However if one robot acts as master it is not really performing any robot function. Say I pass a value to /cmd_vel how will the robots resolve which needs to move?

joy gravatar image joy  ( 2013-04-18 02:44:06 -0600 )edit

So basically I am trying to co-ordinate movement between two robot by publishing message over /topic. Position of the robots is not important here. Simple message can be communicated but if both robots need to move and if one of them is the master it is not functioning as a normal robot!

joy gravatar image joy  ( 2013-04-18 02:48:00 -0600 )edit

Okay, now I think I understand. I'll update the answer (UPDATE1).

Martin Günther gravatar image Martin Günther  ( 2013-04-18 04:33:17 -0600 )edit

Yes this is exactly what I needed. Thank you so much for bearing with me! :)

joy gravatar image joy  ( 2013-04-18 15:44:55 -0600 )edit

No problem! Nice to see I solved your problem. :-)

Martin Günther gravatar image Martin Günther  ( 2013-04-19 02:03:06 -0600 )edit

Hi, I am trying to implement this to move two turtlebots as well, sorry I am very new, how can I "need to remap everything related to a specific robot into a namespace"? I followed the example in the link, but how can I do roslaunch turtlebot_bringup minimal.launch in both without conflicts?

Rafael gravatar image Rafael  ( 2013-06-11 14:50:39 -0600 )edit

Question Tools

Stats

Asked: 2013-04-15 20:56:21 -0600

Seen: 1,455 times

Last updated: Apr 18 '13