-
Notifications
You must be signed in to change notification settings - Fork 292
Description
Description
In ROS1, recording services was not implemented. However, actions were implemented on top of messages.
This made it possible to debug/enhance/test a system by recording just messages and replaying them. In ROS2, server client handshake is done over services. Would it be possible to implement a rosbag record of the sent goals?
Related Issues
ROS1: ros/ros_comm#250
Completion Criteria
Successful trigger of action by following this sequence:
- ros2 run action_tutorials_py fibonacci_action_server
- ros2 bag record -a --include-hidden # or any other flag
- ros2 run action_tutorials_py fibonacci_action_client
- Close all nodes
- ros2 run action_tutorials_py fibonacci_action_server
- ros2 bag play rosbag2_
- Wait to see if server responds
This sequence with ROS1 works if the goal messages are recorded. If this also works with ROS2, we can consider this feature as "ready"
Implementation Notes / Suggestions
On the interface, we can have 3 different behaviors, all of which make sense from a certain perspective:
ros2 bag record --include-actionsorros2 bag record --include-servicesto allow replaying of service requests (most sensible, keeps concerns separate)- Make it default behavior to record action goal/cancellations but not services (same behavior from ROS1)
- Extend the existing
ros2 bag record --include-hidden-topics(better if not done this way)
Since the services and topics are implemented similarly at a RMW level, it should be possible to record the data sent via services.
On the other hand, just because all current RMW implementations use the same mechanism for topic and service communication, this might not hold true in future.
Testing Notes / Suggestions
The integrated testing for this would be quite simple:
- start service/action server
- start recording
- call service/action
- stop recording and play the bag
- expect a call for the service/action
I don't know how it'd be unit tested