jeguzzi / ros-thymio

ROS driver for a Thymio robot running Aseba.
http://jeguzzi.github.io/ros-aseba/
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

ROS2 thymio with real robots #2

Open lueckhan opened 1 week ago

lueckhan commented 1 week ago

I already contacted you on GitHub a couple of months ago. I use your ROS package for my master thesis and it was working great, but I now face an issue. I use mutliple Thymios, all having their own Raspberry Pi and running a Thymio Single Driver each with an own namespace.

I start it using the following command: ros2 launch thymio_driver main.launch device:="ser:device=/dev/ttyACM0" simulation:=False name:=\thymio_1

When using up to 4 Thymios I did not have a problem but now when I want to use more, the nodes get unconnected as I add more nodes.

[thymio_driver-2] [INFO] [1730291137.111019461] [thymio_5.thymio_driver]: thymio-II is ready at namespace /thymio_5 [asebaros-1] [INFO] [1730291760.469661951] [asebaros]: Aseba node 1 unconnected [asebaros-1] [WARN] [1730291804.479210793] [thymio_5.asebaros.rclcpp]: failed to send response to /thymio_5/aseba/get_nodes (timeout): client will not receive response, at ./src/rmw_response.cpp:154, at ./src/rcl/service.c:314 [asebaros-1] [INFO] [1730292686.186657208] [asebaros]: Aseba node 1 unconnected [asebaros-1] [INFO] [1730292692.006251420] [asebaros]: Aseba node 1 unconnected

All the raspberry pis are connected to the same Wifi and I connect to them via ssh. It seems like they are kicking each other out when I have more than 4 connected. Do you have an idea how I could fix it?

I would really appreciate your help! Have a nice week!

jeguzzi commented 1 week ago

Your setup should be feasible. I had a similar setup with MightyThymios and never met this limitation, although it has been some time since I used them.

Are the RPi connected to the Thymios via USB cable or via the wireless dongle?

In ros2 launch thymio_driver main.launch device:="ser:device=/dev/ttyACM0" simulation:=False name:=\thymio_1 do you use different names for each Thymio?

I suggest to try to use a different value for the port parameter for each Thymio, like

and so on.

Let me know if this helps.

lueckhan commented 6 days ago

Thank you for your answer. The Raspberry Pis are connected via USB cable, every Thymio gets a different name. I tried your suggestion, but unfortunately they still get unconnected. The same setup worked in the simulation.

jeguzzi commented 6 days ago

At the moment, I don't see how launching an aseba/ros node on a different machine could cause a failure on the local aseba network.

If you load the complete logs of the 5 Thymios (if 5 is indeeed the tipping point), I will have a look.

You may also try to just test the aseba part, without ROS. For example, by launching

asebaswitch -d ser:device=/dev/ttyACM0  -p 44444

on the 5 RPi and checking for failures, although, as said, I don't see why it should fail.

If you don't know how to build the aseba commands, don't worry and just provide the logs, as anyway an isolated aseba failure seems very improbable to me, so this issue should have to do with ROS.