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

Which way should I choose to broadcast a topic in ROCON?

asked 2014-09-03 22:47:31 -0600

scopus gravatar image

updated 2014-09-03 23:07:46 -0600

Hi, all! I am establishing a multi-robot system with several turtlebots. Every robot is an individual intelligent agent and same with each other. Then I want every robot in this multi-robot system to share their position. That is every robot has to broadcast its own position to other robots. I think it is easy to achieve this by using the pacakge rocon_multimaster

Since every robot in our multi-robot system is same to each other, we has implemented a message topic /position_share which contains the information of robot_id and related information about the robot which publishes the topic /position_share. Every robot in this multi-robot system listens to topic /position_share and judges which robots the current message is from and do subsequent actions.

However, checking the communication mechanism of advertisment in rocon_multimaster, I am confused on how to broadcast this topic message. Because for the same channel(also topic) /position_share. Every robot (move_base node) has a publisher and subscriber on it. So there is two ways to do this.

 default_advertisements:
         - name: /position_share
           node: move_base
          type: publisher
  default_advertisements:
          -name: /position_share
           node: move_base
           type: subscriber

Which way should a robot choose to broadcast its own topic /position_share? As a subscriber or a publisher?

Obviously, for a receiver, it also has two ways:

  default_pulls:
        - gateway: robot_id
          rule:
             name:/position_share
             node: move_base
             type: publisher

   default_pulls:
        - gateway: robot_id
          rule:
             name:/position_share
             node: move_base
             type: subscriber

Of course, here I think I should add many gateways in which each of them represent a robot.

Here I am also confused about the type. What should a robot to choose between "subscriber“ and "publisher" to receive the message /position_share from other robots ? Looking forward to helpful advice, thank you!

edit retag flag offensive close merge delete

Comments

I think one gateway should suffice: http://wiki.ros.org/rocon_multimaster... .

joq gravatar image joq  ( 2014-09-04 10:28:15 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2014-09-10 00:01:10 -0600

Daniel Stonier gravatar image

Even in a multi-turtlebot individual agent scenario I'd still prefer the route of having a central master (e.g. on a pc). Note that this master doesn't stop p2p communications, it's just a landing bay for communication registrations that make it easy to introspect the robot to robot communications. There you can use all the usual tools like rostopic, rviz, rqt_graph, etc. In this case:

1) For sending messages via the central master registry, have every robot flip a publisher to the central share.

2) For listening to messages landing via the central master registry, have every robot flip a subscriber to the central share

Without the central master I imagine you'll have to do alot of ssh'ing around.

1) For broadcasting to all its own position share, you'd advertise your own publisher.

2) For listening to another robot_id's position share, you'd pull their publisher in.

You could feasibly achieve the same effect with subscribers instead, but it doesn't feel as intuitive. Publishers are also problem free - subscribers come with some fine print with regards to multimaster usage.

edit flag offensive delete link more

Comments

Thank you very much! I will try your advices!

scopus gravatar image scopus  ( 2014-09-10 03:19:22 -0600 )edit
1

answered 2014-09-04 20:17:09 -0600

jihoonl gravatar image

Either way should work.

You can flip the position_share publisher from robot A to system X, or you can flip position_share subscriber from system X to robot A.

In this case, a position_share subscriber node in the system X will receive position of robot A.

edit flag offensive delete link more

Comments

Thank you for your advice and attention!

scopus gravatar image scopus  ( 2014-09-10 03:20:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-03 22:47:31 -0600

Seen: 493 times

Last updated: Sep 10 '14