[Solved] Communication between two Rosbot

Hi.

The reason why I am opening this topic is because I would like to know if there is any tutorial on how to exchange information between Rosbots?, Since
so far i haven’t found anything about this, I have been trying to use sockets with Python but I don’t know if I have taken the best option.

Regards.

Hello @Yams

If the robots stay in the same local network or in the Husarnet network (just like robot-computer cooperation), their ROS systems see each other the same topics and services and the entire ROS architecture. This sounds like a solution to your doubts, but also the cause of the problem of controlling two robots at the same time from a keyboard with teleop_twist_keyboard for example.

I also don’t know what specific information you want to send between ROSbots, but it’s probably best to create your own nodes and topics that will take care of communication.

Best regards
Jan Brzyk

Sounds like I have the same issue, which I logged here. The laptop I’m using is on the same LAN as our ROSbot 2R, but I can’t communicate with it from the laptop other than via ssh or the mapping and navigation examples. For example, I can’t run “ros2 topic list” on the laptop and see the topics.

We also have an iRobot Create3 on the same LAN, and from the same laptop its topics, etc., are visible and accessible.

I finally gave up and have been waiting for updated Husarion ROS2 tutorials as noted here, hoping a revised version of “Running ROS on multiple machines” would help. Frustrating.

Steve

Hi.

Thank you both for your help, what I want is a ROSbot to be able to use the odom and IMU measurements of another ROSbot to then create a swarm. For this reason I wanted to know if there is already a way or is the use of sockets the best option?.

Regards.

@Yams

Before we get to the topic of the swarm, let me know if you have any problems with wireless communication between your laptop and one of the robots? I think we may just be dealing with network issues.

Best regards
Jan Brzyk

Hi.

Thanks for answering, I’m using ssh husarion@ + ip, and I manage to run the .launch from my laptop or do you mean to other communication way?.

Regards.

Hi,

So, being on the same Wi-Fi network with a laptop and 2 ROSbots, you can see the ROS messages/topics of one ROSbot in the laptop, but you don’t see the ROSbots’ messages/topics in the other ROSbot in the same way?

Best regards
Jan Brzyk

Hi.

Thank you for answering. I can see the messages/topics of each Rosbot in its corresponding terminal from my laptop when executing a .launch.

Regards.

Hi,

I understand. The question is, can you see messages / in terminals of other devices that are on the same network as the device sending / publishing these messages?

Best regards
Jan Brzyk

Hi.

no, i can’t see them, could you help me to solve this problem please?.

Regards.

Hi,

If you can’t see the ROSbot message from your laptop while connected via wireless Wi-Fi, try again, but this time via Ethernet cable. If it works, network problems can be clearly identified. Then, probably the change of DDS configuration will be needed.

As for the swarm issue, the problem to solve will be the collision of ROS message names when connecting at least two robots. Unfortunately, I don’t see any ready-made example for ROSbot at the moment. The quickest solution to this seems to me to be domain bridge and uploading the remapped topics you need. However, in this case, we need to finish modifying the microros so that the Domain ID can be changed. I will let you know in this thread if there are any updates from our side.

Best regards
Jan Brzyk

Hi.

Thank you for your help and the information, the problem was solved using sockets.

Regards.

1 Like