4#include "rclcpp/rclcpp.hpp"
6#include <lanelet2_core/LaneletMap.h>
7#include <lanelet2_io/Io.h>
8#include <lanelet2_io/Projection.h>
9#include <lanelet2_projection/UTM.h>
63 double origin_lat_ = std::numeric_limits<double>::quiet_NaN();
64 double origin_lon_ = std::numeric_limits<double>::quiet_NaN();
std::shared_ptr< lanelet::Projector > getProjectorPtr()
Returns the projector used to interpret the loaded map coordinates.
void serviceParamsCallback(std::shared_future< std::vector< rclcpp::Parameter > > future)
Handles the asynchronous response of an initial parameter fetch.
bool validateParams()
Validates that the required map parameters are available and usable.
Lanelet2MapInterface(rclcpp::Node &parent_node, std::string map_server_name)
Creates a client-side interface for retrieving Lanelet2 map parameters from a map server node.
std::string map_frame_id_
lanelet::LaneletMapPtr getNonConstMapPtr()
Returns the currently loaded mutable Lanelet2 map.
bool loadMap()
Loads and parses the map from the currently cached parameters.
rclcpp::Node * parent_node_
std::shared_ptr< rclcpp::AsyncParametersClient > parameter_client_
void updateParamsCallback(const rclcpp::Parameter &p)
Reacts to a single parameter event from the map server.
lanelet::LaneletMapPtr mapPtr_
std::shared_ptr< rclcpp::ParameterCallbackHandle > origin_lon_callback_handle_
void findMapServer()
Checks for the configured map server and, once available, requests initial parameters and installs su...
std::string map_contents_
std::shared_ptr< rclcpp::ParameterCallbackHandle > origin_lat_callback_handle_
std::shared_ptr< lanelet::Projector > utmProjectorPtr_
std::vector< rclcpp::Parameter > map_params_
std::string map_filepath_
void updateMapParam(rclcpp::Parameter param)
Updates one cached map parameter from a value received from the map server.
std::shared_ptr< rclcpp::ParameterCallbackHandle > contents_callback_handle_
std::shared_ptr< rclcpp::ParameterCallbackHandle > frame_id_callback_handle_
std::shared_ptr< rclcpp::ParameterEventHandler > parameter_sub_
std::string map_server_name_
rclcpp::TimerBase::SharedPtr startup_timer_
lanelet::LaneletMapConstPtr getMapPtr()
Returns the currently loaded immutable Lanelet2 map.