Interaction between multiple rosbots [closed]

asked 2012-07-11 12:42:20 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello! We are working on a project which needs to have multiple netbooks on top of (basically) turtlebots, to communicate over a network and share information.

Here is a basic scenario. Robot #1 publishes a topic which Robot #2 is subscribed to. Robot #1 notices a change in the environment and alters the topic being published to suit. Robot #2 notices this change and reacts accordingly.

There seem to be several parts to this problem:

Communication- our computers are connected via TCP over a local wireless network.

Publishing- This is our main issue. We've read a bunch of things, but aren't sure what to do. How do srv's (which seem to be pre-formatted for publishing data and responding) come into play? Right now we've got self.chatterPub.publish(packetMore), where self.chatterPub = rospy.Publisher('decisionPacket', DecisionPacket), and packetMore = DecisionPacket() where DecisionPacket is a .msg file, containing the information we want to share. However, all this is being done in the driver files currently, and changes made to the DecisionPacket in the code are thus unable to make modifications to the packet. Feel free to link us to the moon, we'll read anything again and get back with follow up questions :)

Subscribing- We seem to be ok with this, using a line like such rospy.Subscriber('decisionPacket', DecisionPacket, HandleData.handle_decision_data) and then HandleData provides the link for actually modifying data for our programs code.

Hopefully I've somewhat explained our situation, let me know if further elucidation would be helpful!


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-26 18:22:00.301018