How to get and send serialized Request and Response in rclcpp ROS2

asked 2020-05-26 14:48:54 -0500

shuodo gravatar image

There are sample ROS2 codes for serialized publisher and subscriber:

https://github.com/ros2/demos/blob/ma... https://github.com/ros2/demos/blob/ma...

They demonstrate how to receive and publish serialize message for topics.

I want to do something similar in my service and client code using rclcpp (ROS2).

  1. In rclcpp, is there a way to send and receive serialize Request and Response?

  2. If 1 is not possible, is there an API to call ros middle-ware (rmw) to perform serialization and de-serialization?

Thanks,

Shuo

edit retag flag offensive close merge delete