Template Function pyToCppMsg
Defined in File roboplan_ros_cpp_bindings.hpp
Function Documentation
-
template<typename ROSMsgType>
ROSMsgType pyToCppMsg(nb::handle py_msg) Template for converting Python ROS 2 message types to their C++ equivalents.
Conversion is done using rclcpp’s serialization utility, which converts messages to raw bytes and back.
- Parameters:
py_msg – The python ROS 2 message.
- Returns:
An equivalent C++ ROS 2 message.