lanelet2_map_server v1.2.3
Loading...
Searching...
No Matches
lanelet2_display.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4#ifndef LANELET2_DISPLAY_HPP_
5#define LANELET2_DISPLAY_HPP_
6
7#include <memory>
8
9#include "rviz_common/display.hpp"
10#include "rviz_common/properties/bool_property.hpp"
11#include "rviz_common/properties/color_property.hpp"
12#include "rviz_common/properties/float_property.hpp"
13#include "rviz_common/properties/string_property.hpp"
14
17
24
25class Lanelet2Display : public rviz_common::Display {
26 Q_OBJECT
27
28 public:
33
37 ~Lanelet2Display() override;
38
43
48
53
58
59 // Overrides from Display
63 void onInitialize() override;
64
71 void update(float dt, float ros_dt) override;
72
73 private Q_SLOTS:
74
75 void updateServerName();
76
86 void updateIdRendering();
87 void updateColor();
88 void updateStyle();
89 void update3D();
90
91 private: // NOLINT(readability-redundant-access-specifiers)
97 void initializeMapInterface(rclcpp::Node& parent_node);
98
104 bool visualizeMap();
105
109 void updateVisualization();
110
114 void updateVisibility();
115
116 std::unique_ptr<Lanelet2MapInterface> lanelet2_map_interface_;
117 rclcpp::Node::SharedPtr rviz_node_;
118
119 bool viz_init_ = false;
120
121 std::unique_ptr<rviz_rendering::Lanelet2Map> map_; // Handles actually drawing the ll2-map
123
124 rviz_common::properties::StringProperty* ll2_server_name_property_;
125 rviz_common::properties::BoolProperty *viz_linestring_property_, *viz_separators_property_, *three_d_property_,
128 rviz_common::properties::FloatProperty* alpha_property_;
129 rviz_common::properties::ColorProperty *ll_left_col_property_, *ll_right_col_property_, *separators_col_property_,
134};
135
136} //namespace lanelet2_rviz_display
137
138#endif // LANELET2_DISPLAY_HPP_
rviz_common::properties::ColorProperty * parking_col_property_
void onInitialize() override
Initializes the display once RViz has provided the rendering context.
bool visualizeMap()
Creates the RViz rendering object for the currently loaded map.
rviz_common::properties::StringProperty * ll2_server_name_property_
rviz_common::properties::BoolProperty * viz_sidewalk_property_
rviz_common::properties::BoolProperty * viz_lane_fill_property_
rviz_common::properties::BoolProperty * fill_parking_property_
rviz_common::properties::ColorProperty * stop_line_col_property_
rviz_common::properties::ColorProperty * ll_right_col_property_
Lanelet2Display & operator=(const Lanelet2Display &)=delete
Copy assignment is disabled because the display owns RViz resources.
rviz_common::properties::FloatProperty * area_width_property_
std::unique_ptr< Lanelet2MapInterface > lanelet2_map_interface_
rviz_common::properties::BoolProperty * viz_separators_property_
rviz_common::properties::FloatProperty * char_height_property_
rviz_common::properties::ColorProperty * sidewalk_col_property_
rviz_common::properties::BoolProperty * viz_traffic_light_property_
rviz_common::properties::ColorProperty * area_col_property_
rviz_common::properties::ColorProperty * separators_col_property_
void initializeMapInterface(rclcpp::Node &parent_node)
Creates the map interface used to fetch map data from the server node.
rviz_common::properties::BoolProperty * viz_id_property_
~Lanelet2Display() override
Destroys the RViz display and releases its map visualization resources.
Lanelet2Display & operator=(Lanelet2Display &&)=delete
Move assignment is disabled because RViz owns the display lifecycle.
rviz_common::properties::FloatProperty * stop_line_width_property_
rviz_common::properties::BoolProperty * viz_crosswalk_property_
std::unique_ptr< rviz_rendering::Lanelet2Map > map_
Lanelet2Display(Lanelet2Display &&)=delete
Move construction is disabled because RViz owns the display lifecycle.
void updateVisibility()
Applies visibility toggles to the existing rendered map objects.
rviz_common::properties::BoolProperty * viz_stop_line_property_
void update(float dt, float ros_dt) override
Periodically updates the display and refreshes the rendered map when needed.
rviz_common::properties::FloatProperty * traffic_light_height_property_
rviz_common::properties::ColorProperty * traffic_light_col_property_
rviz_common::properties::FloatProperty * linestring_width_property_
Lanelet2Display(const Lanelet2Display &)=delete
Copy construction is disabled because the display owns RViz resources.
rviz_common::properties::FloatProperty * alpha_property_
rviz_common::properties::FloatProperty * separators_width_property_
rviz_common::properties::ColorProperty * id_col_property_
rviz_common::properties::ColorProperty * lane_fill_col_property_
rviz_common::properties::ColorProperty * ll_left_col_property_
rviz_common::properties::FloatProperty * parking_width_property_
Lanelet2Display()
Creates the RViz display and initializes its configurable properties.
rviz_common::properties::BoolProperty * viz_parking_property_
void updateVisualization()
Rebuilds the rendered map using the current rendering options.
rviz_rendering::Lanelet2Map::RenderingOptions rendering_options_
rviz_common::properties::BoolProperty * three_d_property_
rviz_common::properties::BoolProperty * viz_linestring_property_
rviz_common::properties::BoolProperty * fill_area_property_
rviz_common::properties::BoolProperty * viz_area_property_
rviz_common::properties::ColorProperty * crosswalk_col_property_