gestom / CosPhi

Artificial pheromone system
31 stars 14 forks source link

ROS_Bridge #6

Open gemad opened 8 years ago

gemad commented 8 years ago

hello MR @gestom , i am creating a small node that would listen to the TCP output of CosPhi and republish it as a ROS message , i am don with it , taking the port data and republish it as ros messge of type "String" , i want to convert the output to the standred "geometry_msgs/Pose2D.msg" to do that i need to create a parser ( i am using python), what do you think is the best way to distinguish the robot Pose2D from the other robots : 1) create a custom ros message say Pos2D_ID and add a field for the iD 2) create a custom messge of Pos2D_Array and the index of the array is sorted by the robots ids for robot 1 i=1
say array[i]->pose2D.x , array[i+1]->pose2D.y, array[i+2]->pose2D.theta
3) something with the stranded messages <but have no idea!!>

any ideas ? thanks in advance

gestom commented 8 years ago

Hi,

I would recommend option 1 because during your experiments, the robots might have arbitrary IDs, e.g. 1,3,4 instead of 0,1,2. Moreover, having an array assumes that all robots are always detected, which is not always the case.

Best,

Tom

gemad commented 8 years ago

thanks for the quick reply , what about the robots side, does all the robots receive all of messages and check if the id == their id , is that convenient -as that will be waste of traffic and processing- ?

gestom commented 8 years ago

Hi @gemad, would you mind to write a short README for the ROS node ? Thanks, Tom

gemad commented 8 years ago

hello @gestom

done i added a README file https://github.com/gemad/CosPhi/blob/master/cosphi_ros_bridge/README.md