Function navmap_ros::from_msg(const navmap_ros_interfaces::msg::NavMap&)

Function Documentation

navmap::NavMap navmap_ros::from_msg(const navmap_ros_interfaces::msg::NavMap &msg)

Reconstruct a core navmap::NavMap from the ROS transport message.

  • Intended to be the inverse of navmap_ros::to_msg for a round-trip without loss.

  • Assumes that the message is internally consistent (sizes and indices match).

Parameters:

msg[in] Input navmap_ros_interfaces::msg::NavMap message.

Returns:

A core navmap::NavMap equivalent to the content of msg.

Throws:

std::runtime_error – If the message describes inconsistent geometry or layer sizes.