-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 22.04
- Installation type:
- source build
- Version or commit hash:
- DDS implementation:
- rmw_fastrtps, rmw_cyclonedds (but rmw_connextdds)
- Client library (if applicable):
- rcl
Steps to reproduce issue
### Terminal-1 start example
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 launch demo_nodes_cpp introspect_services_launch.py
### Terminal-2 enable service introspection and echo the events
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param set /introspection_client client_configure_introspection "contents"
Set parameter successful
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param set /introspection_service service_configure_introspection "contents"
Set parameter successful
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 topic echo /add_two_ints/_service_event --flow-style
...<snip>
---
info:
event_type: 0
stamp:
sec: 1692984132
nanosec: 971129256
client_gid: [1, 15, 96, 219, 167, 4, 119, 93, 0, 0, 0, 0, 0, 0, 21, 3]
sequence_number: 53
request: [{a: 2, b: 3}]
response: []
---
info:
event_type: 1
stamp:
sec: 1692984132
nanosec: 971575657
client_gid: [1, 15, 96, 219, 167, 4, 119, 93, 0, 0, 0, 0, 0, 0, 20, 4]
sequence_number: 53
request: [{a: 2, b: 3}]
response: []
---
info:
event_type: 2
stamp:
sec: 1692984132
nanosec: 971884575
client_gid: [1, 15, 96, 219, 167, 4, 119, 93, 0, 0, 0, 0, 0, 0, 20, 4]
sequence_number: 53
request: []
response: [{sum: 5}]
---
info:
event_type: 3
stamp:
sec: 1692984132
nanosec: 972157308
client_gid: [1, 15, 96, 219, 167, 4, 119, 93, 0, 0, 0, 0, 0, 0, 21, 3]
sequence_number: 53
request: []
response: [{sum: 5}]
---
Expected behavior
service introspection event message requires gid must be unique during transaction.
which uniquely identify a single request-reponse pair.
see more details for https://github.com/ros-infrastructure/rep/pull/360/files#diff-7739b7ffccd3276874ea9014c4cd07872efa4e2d60d7c31896e56929ad424455R144-R149.
Actual behavior
service introspection event message IS NOT unique so it does not identify a single request-reponse pair.
Additional information
Related Issue/PR: ros2/rosbag2#1414 (rosbag2 service record/play feature enhancement.)
- without this uniqueness capability during a single request-reponse pair, it cannot tell which request is mapped to which response, so that rosbag2 cannot know which message needs to play.
- this depends on the rmw implementation,
rmw_fastrtpsandrmw_cycloneddscan reproduce this issue. (butrmw_connextdds) - according to rmw_fastrtps code, https://github.com/ros2/rmw_fastrtps/blob/b45e73500bc0a2056fdc31197a6f94434b327d55/rmw_fastrtps_shared_cpp/src/rmw_request.cpp#L111-L117, this is just unexpected behavior because request_header is overwritten and reused from rmw_take_request to rmw_send_response.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working