NavMap
|
Save/Load utilities for NavMap to/from disk using ROS 2 CDR serialization. More...
#include <string>
#include <system_error>
#include "navmap_core/NavMap.hpp"
#include "navmap_ros/conversions.hpp"
#include "navmap_ros_interfaces/msg/nav_map.hpp"
Go to the source code of this file.
Classes | |
struct | SaveOptions |
Save options. More... | |
Namespaces | |
namespace | navmap_ros |
Conversions between core NavMap and ROS-level structures. | |
namespace | navmap_ros::io |
IO helpers to persist NavMap objects to/from disk. | |
Functions | |
bool | load_from_file (const std::string &path, navmap::NavMap &out_map, std::error_code *ec=nullptr) |
Load a navmap::NavMap by deserializing a message and converting to core. | |
bool | 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. | |
bool | save_msg_to_file (const navmap_ros_interfaces::msg::NavMap &msg, const std::string &path, const SaveOptions &options={}, std::error_code *ec=nullptr) |
Save a NavMap message to disk using ROS 2 CDR serialization. | |
bool | save_to_file (const navmap::NavMap &map, const std::string &path, const SaveOptions &options={}, std::error_code *ec=nullptr) |
Save a navmap::NavMap by converting it to a message and serializing to disk. | |
Save/Load utilities for NavMap to/from disk using ROS 2 CDR serialization.
Two API layers: 1) Message-level: save/load navmap_ros_interfaces::msg::NavMap
directly. 2) Core-level (optional): save/load navmap::NavMap
if the core headers are available, using navmap_ros::to_msg
/ navmap_ros::from_msg
.
If the magic header is not present, the loader falls back to interpreting the whole file as a raw CDR payload.