Function navmap_ros::io::load_msg_from_file

Function Documentation

bool navmap_ros::io::load_msg_from_file(const std::string &path, navmap_ros_interfaces::msg::NavMap &out_msg, std::error_code *ec = nullptr)

Load a NavMap message from a file created by this saver.

The loader first tries to parse the header; if the magic header is missing, it falls back to treating the whole file as a raw CDR payload.

Parameters:
  • path[in] Source file path.

  • out_msg[out] Output message deserialized from file.

  • ec[out] Optional error code; if not null, it will be set on failure.

Returns:

true on success, false otherwise (and ec is set if provided).