Unable to call service over network (ROS2 galactic)

asked 2022-06-20 09:18:06 -0600

wawanbreton gravatar image

Hi everyone, I'm struggling with a service call which won't work over a network. Here is my configuration : * Work station : Laptop / Ubuntu 20.04 / Wifi only * Robot : Raspberry PI4 / Yocto custom / Wifi only (USB dongle)

On the robot, a few nodes are running, especially the one I developped, based on rclcpp. It has a few subscriptions, publishers and also services to trigger some actions.

Now, when I run the node on my PC, I can communicate with it properly, call the services and get the answers. However, when running the node on the RPI, I can't get everything to work. It seems that topic communication properly works (for example, I can control the robot using /cmd_vel) but I can't call the services, or more precisely, I can't get the answer of the call. I can see in the console the log of the C++ callback being actually called, but I never receive the answer on the PC.

I have tried to simplify my configuration as much as possible, specify the network interfaces to be used via an XML file for Cyclone DDS, changing the domain ID, but nothing I have tried seems to have an effect on this. I also checked the ros2 multicast send/receive command, but they work with no problem.

Please tell me what more I can check to make this work, I would really like to identify the root cause of this.

Thanks

edit retag flag offensive close merge delete

Comments

Have you tried on a different RMW (such as FastRTPS / FastDDS) ?

vinny gravatar image vinny  ( 2022-06-20 14:29:19 -0600 )edit

No, I wanted to but Yocto/poky ships only Cyclone DDS by default. I will try a bit harder.

wawanbreton gravatar image wawanbreton  ( 2022-06-21 02:05:15 -0600 )edit

The actual service call works well with FastRTPS. However it generates linking errors with other nodes, even standard ones likes robot_state_publisher. I will try to fix these to have a properly working FastRTPS stack. But this is a workaround, Cyclone DDS should work too, especially because it is the default DDS.

wawanbreton gravatar image wawanbreton  ( 2022-06-21 02:52:03 -0600 )edit

FIY, I have opened an issue to fix the errors I encountered with FastRTPS integration on Yocto. Should I open a bug report somewhere for my problem with services and Cyclone DDS ? If so, where would be the best place ?

wawanbreton gravatar image wawanbreton  ( 2022-06-23 04:14:01 -0600 )edit