-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Originally discussed on #484
ROS 2 services and actions are constructed with topics, so technically having all topics under namespace rt, rq and rr would support the ROS 2 service and action communication.
- ROS 2 Service
- rq/xxxxxxRequest
- rr/xxxxxxReply
- ROS 2 Action
- rq/xxxxxx/_action/send_goalRequest
- rr/xxxxxx/_action/send_goalReply
- rq/xxxxxx/_action/cancel_goalRequest
- rr/xxxxxx/_action/cancel_goalReply
- rq/xxxxxx/_action/get_resultRequest
- rr/xxxxxx/_action/get_resultReply
- rt/xxxxxx/_action/feedback
- rt/xxxxxx/_action/status
But actually this is not straight-forward like this, because there needs to be the process to associate request/response identification (DDS Writer/Reader GUID, Goal ID) for ROS 2 service and action.
the followings are where ROS 2 system filters out unconcerned response or message on the requester side.
the service responses are filtered out here to check if the response data writer guid matches with either request data reader or writer here. this part is actually implemented with RMW CustomClientInfo, this mechanism needs to be implemented in DDS Router.
https://github.com/ros2/rclcpp/blob/rolling/rclcpp_action/include/rclcpp_action/client.hpp#L714-L719 and https://github.com/ros2/rclcpp/blob/rolling/rclcpp_action/include/rclcpp_action/client.hpp#L751-L756
it does the almost same thing here, to make sure the goal id matches the action client request. the difference from service is that goal id is on the message, so that this is done by rclcpp application layer, not in the RMW implementation. that said, DDS router can just proxy the topics for actions without filtering process.