Closed lueckhan closed 5 months ago
Hi @lueckhan,
I just tried the configuration below:
<robot type="thymio2" x="15" y="30" port="33334" nodeId="1"/>
<robot type="thymio2" x="45" y="60" port="33335" nodeId="2"/>
asebaswitch
asebaswitch -d "tcp:localhost;33335" "tcp:localhost;33334" -p 33333
ros2 launch thymio_driver main.launch device:="tcp:host=localhost;port=33333" single:=False simulation:=True
and things worked fine.
Maybe the two thymios had the same nodeId
in your setup? That would not work.
Note that there is an alternative to get the same result:
asebaswitch
ros2 launch thymio_driver main.launch device:="tcp:host=localhost;port=33334" single:=True simulation:=True name:=thymio_1
and
ros2 launch thymio_driver main.launch device:="tcp:host=localhost;port=33335" single:=True simulation:=True name:=thymio_2
Let me know if the above does not work.
Hey, Thank you for your answer!
I did exactly as you described, but it did not work. The first way resulted in the ros2 topics being created, but publishing via the cmd_vel topic did not work.
Unfortunately, The second way did not work because it says the port is busy. The Node ID is not the same for both robots.
I am using Ros2 humble and a VM with Ubuntu 2204 and the aseba version 2.4.0.
Could you tell me which versions you are using? Then I would create a fresh VM with the same versions as you.
Thank you so much for your help.
I don't know why the first is failing but I know how to solve the second :-): you need to specify a different port for the two ros2 drivers, like
ros2 launch thymio_driver main.launch device:="tcp:host=localhost;port=33334" single:=True simulation:=True name:=thymio_1
and
ros2 launch thymio_driver main.launch device:="tcp:host=localhost;port=33335" single:=True simulation:=True name:=thymio_2 port:=44445
Sorry, I forgot to add this param in my first reply.
If you want to further investigate the first failure, please post the ros2 log file.
Hi,
Thank you so much for your reply! You really helped me! Both versions do work now. The Multi-Driver Version just has a delay when reacting to the messages.
I just have another question: I want to use the ROS2 Thymio on real Thymios and only use the Simulation for debugging. Is there any difference between the two versions (Multi-Driver and multiple instances of the Single Driver) and what would you recommend when using many real Thymios?
Have a nice day!
Is there any difference between the two versions (Multi-Driver and multiple instances of the Single Driver) and what would you recommend when using many real Thymios?
It depends on the setup. If you have multiple wireless Thymios connected to the same dongle, then I would use the multi-driver. If the thymios are wired, or connected to different dongles, I would launch many instances of the single-driver. Mostly for simplicity and to avoid using asebaswitch
, as both option should be fine for real robots too.
All right, thank you very much for your help!
Hello, I followed your Tutorial/Documentation to use ROS2 with Thymio Robots. I used the aseba Playground simulation. With one robot everything worked (sending values over the cmd_vel topic via rqt or python script), but when I wanted to connect two robots, they did not respond. I used asebaswitch and the Thymio Multidriver to connect them. They get connected, the correct topics get created under two different namespaces (Thymio0 and Thymio1). Unfortunately whenever I sent values via thymio0/cmd_vel the robot does not respond. Is there any step I am missing when using multidriver? I would be very grateful for a reply! Kind regards