rclpy.serialization module

rclpy.serialization.deserialize_message(serialized_message: bytes, message_type)

Deserialize a ROS message.

Parameters:
  • serialized_message – The ROS message to deserialize.

  • message_type – The type of the serialized ROS message.

Returns:

The deserialized ROS message.

rclpy.serialization.serialize_message(message) bytes

Serialize a ROS message.

Parameters:

message – The ROS message to serialize.

Returns:

The serialized bytes.