.. _program_listing_file__tmp_ws_src_mrpt_navigation_mrpt_map_include_mrpt_map_map_server_node.hpp: Program Listing for File map_server_node.hpp ============================================ |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/mrpt_navigation/mrpt_map/include/mrpt_map/map_server_node.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* +------------------------------------------------------------------------+ | mrpt_navigation | | | | Copyright (c) 2014-2023, Individual contributors, see commit authors | | See: https://github.com/mrpt-ros-pkg/mrpt_navigation | | All rights reserved. Released under BSD 3-Clause license. See LICENSE | +------------------------------------------------------------------------+ */ #pragma once #include #include #include "nav_msgs/msg/map_meta_data.hpp" #include "nav_msgs/msg/occupancy_grid.hpp" #include "nav_msgs/srv/get_map.hpp" #include "rclcpp/rclcpp.hpp" class MapServer : public rclcpp::Node { public: MapServer(); ~MapServer(); void init(); void loop(); private: // member variables double m_frequency{0}; bool m_debug{true}; // params that come from launch file std::string m_pub_metadata_str; std::string m_pub_map_ros_str; std::string m_service_map_str; // publishers and services rclcpp::Publisher::SharedPtr m_pub_map_ros; rclcpp::Publisher::SharedPtr m_pub_metadata; rclcpp::Service::SharedPtr m_service_map; nav_msgs::srv::GetMap::Response m_response_ros; mrpt::maps::CMultiMetricMap::Ptr m_metric_map; void publish_map(); bool map_callback( const std::shared_ptr req, const std::shared_ptr res); };