rmw_iceoryx icon indicating copy to clipboard operation
rmw_iceoryx copied to clipboard

ROS2 Action cannot receive response

Open fbkfbkfbkfbk opened this issue 2 years ago • 1 comments

Hello, I am using the humble version of ROS2 with rmw_iceoryx. When I use Action mode, I find that all asnyc_send_goal cannot receive responses callbacks, but another DDS can. I want to confirm whether ROS2-Action is supported. Thank you.

fbkfbkfbkfbk avatar May 22 '23 08:05 fbkfbkfbkfbk

@fbkfbkfbkfbk Thanks for reporting the issue and apologies for the late answer!

ROS 2 actions use request/response and topic communication under the hood. So, in theory, everything should work out of the box with rmw_iceoryx.

However, there is a known limitation requiring users to call rmw_take_request and rmw_send_response after each other and not doing another request in the meantime. It might be possible that with ROS 2 actions you run into this limitation.

I just gave it a try using Humble using the fibonacci_action_client.cpp and fibonacci_action_server.cpp and can confirm the issue:

#### 1st terminal
iox-roudi -l verbose

#### 2nd terminal
RMW_IMPLEMENTATION=rmw_iceoryx_cpp ros2 run action_tutorials_cpp fibonacci_action_client 
Log level set to: [Warning]
2024-01-03 16:19:20.693 [Warning]: Requested queue capacity 1000 exceeds the maximum possible one for this subscriber, limiting from 1000 to 256
[INFO] [1704295164.197103410] [fibonacci_action_client]: Sending goal
[INFO] [1704295164.198455895] [fibonacci_action_client]: Goal accepted by server, waiting for result
[ros2run]: Segmentation fault

#### 3rd terminal
RMW_IMPLEMENTATION=rmw_iceoryx_cpp ros2 run action_tutorials_cpp fibonacci_action_server 
Log level set to: [Warning]
2024-01-03 16:18:33.692 [Warning]: Requested queue capacity 1000 exceeds the maximum possible one for this subscriber, limiting from 1000 to 256
[INFO] [1704295164.197833090] [fibonacci_action_server]: Received goal request with order 10
[INFO] [1704295164.198529641] [fibonacci_action_server]: Executing goal
[INFO] [1704295164.198846791] [fibonacci_action_server]: Publish feedback
[INFO] [1704295165.198991136] [fibonacci_action_server]: Publish feedback
[INFO] [1704295166.199014623] [fibonacci_action_server]: Publish feedback
[INFO] [1704295167.198977386] [fibonacci_action_server]: Publish feedback
[INFO] [1704295168.198981477] [fibonacci_action_server]: Publish feedback
[INFO] [1704295169.198988378] [fibonacci_action_server]: Publish feedback
[INFO] [1704295170.199011575] [fibonacci_action_server]: Publish feedback
[INFO] [1704295171.198899453] [fibonacci_action_server]: Publish feedback
[INFO] [1704295172.199020197] [fibonacci_action_server]: Publish feedback
2024-01-03 16:19:33.199 [Warning]: Could not deliver to client! Client not available anymore!
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  rmw_send_response send error!, at /home/username/ros2_humble/src/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_response.cpp:179, at /home/username/ros2_humble/src/ros2/rcl/rcl/src/rcl/service.c:314
[ros2run]: Aborted

After a short glimpse, I think it is due to the two functions not being implemented:

  1. rmw_client_set_on_new_response_callback
  2. rmw_service_set_on_new_request_callback

See #88

I created #105 to address the known limitation.

I'll have a closer look in the upcoming months.

mossmaurice avatar Jan 03 '24 16:01 mossmaurice