17#ifndef NAVMAP_ROS__NAVMAP_IO_HPP_
18#define NAVMAP_ROS__NAVMAP_IO_HPP_
41#include <system_error>
45#include "navmap_ros_interfaces/msg/nav_map.hpp"
79 const navmap_ros_interfaces::msg::NavMap & msg,
80 const std::string & path,
81 const SaveOptions & options = {},
82 std::error_code * ec =
nullptr);
96 const std::string & path,
97 navmap_ros_interfaces::msg::NavMap & out_msg,
98 std::error_code * ec =
nullptr);
115 const std::string & path,
116 const SaveOptions & options = {},
117 std::error_code * ec =
nullptr);
132 const std::string & path,
133 navmap::NavMap & out_map,
134 std::error_code * ec =
nullptr);
Core container and data structures for EasyNav navigable meshes.
Main container for navigable surfaces, geometry, and layers.
Definition NavMap.hpp:465
IO helpers to persist NavMap objects to/from disk.
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.
Definition navmap_io.cpp:87
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.
Definition navmap_io.cpp:142
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.
Definition navmap_io.cpp:152
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.
Definition navmap_io.cpp:48
Save options.
Definition navmap_io.hpp:60
bool binary
If true, save in binary (CDR). Reserved for future options.
Definition navmap_io.hpp:62