ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
zenoh_message_bridge.utils Namespace Reference

Functions

def load_msg_type (str msg_type_str)
 
bytes msg_to_bytes (msg)
 
def bytes_to_msg (bytes data, msg_type)
 
bytes msg_to_json (msg, str ros_type)
 
def json_to_msg (bytes data, msg_type)
 
bytes msg_to_cdr_json (msg, str ros_type)
 
def cdr_json_to_msg (bytes data, msg_type)
 

Function Documentation

◆ bytes_to_msg()

def zenoh_message_bridge.utils.bytes_to_msg ( bytes  data,
  msg_type 
)

◆ cdr_json_to_msg()

def zenoh_message_bridge.utils.cdr_json_to_msg ( bytes  data,
  msg_type 
)
Deserialize a CDR std_msgs/msg/String containing JSON back into msg_type.

◆ json_to_msg()

def zenoh_message_bridge.utils.json_to_msg ( bytes  data,
  msg_type 
)
Deserialize raw JSON bytes to a ROS message, stripping metadata fields.

◆ load_msg_type()

def zenoh_message_bridge.utils.load_msg_type ( str  msg_type_str)

◆ msg_to_bytes()

bytes zenoh_message_bridge.utils.msg_to_bytes (   msg)

◆ msg_to_cdr_json()

bytes zenoh_message_bridge.utils.msg_to_cdr_json (   msg,
str  ros_type 
)
Serialize to CDR-encoded std_msgs/msg/String whose data field is JSON with datatype metadata.
Consumable by native rmw_zenoh_cpp subscribers via ros2 topic echo.

◆ msg_to_json()

bytes zenoh_message_bridge.utils.msg_to_json (   msg,
str  ros_type 
)
Serialize to raw JSON bytes with datatype metadata. Bridge-to-bridge only.