17#ifndef NAVMAP_ROS__NAVMAP_IO_HPP_
18#define NAVMAP_ROS__NAVMAP_IO_HPP_
41#include <system_error>
46#include "navmap_ros_interfaces/msg/nav_map.hpp"
80 const navmap_ros_interfaces::msg::NavMap & msg,
81 const std::string & path,
82 const SaveOptions & options = {},
83 std::error_code * ec =
nullptr);
97 const std::string & path,
98 navmap_ros_interfaces::msg::NavMap & out_msg,
99 std::error_code * ec =
nullptr);
116 const std::string & path,
117 const SaveOptions & options = {},
118 std::error_code * ec =
nullptr);
133 const std::string & path,
134 navmap::NavMap & out_map,
135 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:434
Conversions between the core NavMap representation and ROS messages.
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:61
bool binary
If true, save in binary (CDR). Reserved for future options.
Definition navmap_io.hpp:63