19 #ifndef TRAFFIC_SIMULATOR__VISUALIZATION__VISUALIZATION_COMPONENT_HPP_
20 #define TRAFFIC_SIMULATOR__VISUALIZATION__VISUALIZATION_COMPONENT_HPP_
28 #if defined _WIN32 || defined __CYGWIN__
30 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_EXPORT __attribute__((dllexport))
31 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_IMPORT __attribute__((dllimport))
33 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_EXPORT __declspec(dllexport)
34 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_IMPORT __declspec(dllimport)
36 #ifdef TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_BUILDING_DLL
37 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC \
38 TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_EXPORT
40 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC \
41 TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_IMPORT
43 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC_TYPE \
44 TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC
45 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_LOCAL
47 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_EXPORT __attribute__((visibility("default")))
48 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_IMPORT
50 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC __attribute__((visibility("default")))
51 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_LOCAL __attribute__((visibility("hidden")))
53 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC
54 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_LOCAL
56 #define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC_TYPE
63 #include <rclcpp/rclcpp.hpp>
66 #include <traffic_simulator_msgs/msg/entity_status_with_trajectory_array.hpp>
67 #include <unordered_map>
68 #include <visualization_msgs/msg/marker_array.hpp>
86 void entityStatusCallback(
87 const traffic_simulator_msgs::msg::EntityStatusWithTrajectoryArray::ConstSharedPtr msg);
93 const visualization_msgs::msg::MarkerArray generateDeleteMarker(
std::string ns);
98 const visualization_msgs::msg::MarkerArray generateDeleteMarker()
const;
106 int goal_pose_max_size = 0;
107 const visualization_msgs::msg::MarkerArray generateMarker(
109 const std::vector<geometry_msgs::msg::Pose> & goal_pose,
110 const traffic_simulator_msgs::msg::WaypointsArray & waypoints,
111 const traffic_simulator_msgs::msg::Obstacle & obstacle,
bool obstacle_find);
115 rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr marker_pub_;
119 rclcpp::Subscription<traffic_simulator_msgs::msg::EntityStatusWithTrajectoryArray>::SharedPtr
124 std::unordered_map<std::string, visualization_msgs::msg::MarkerArray> markers_;
ROS 2 component for visualizing simulation result.
Definition: visualization_component.hpp:76
TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC VisualizationComponent(const rclcpp::NodeOptions &)
Definition: visualization_component.cpp:58
std::string string
Definition: junit5.hpp:26
traffic_simulator_msgs::EntityStatus EntityStatus
Definition: helper_functions.hpp:32
#define TRAFFIC_SIMULATOR_VISUALIZATION_COMPONENT_PUBLIC
Definition: visualization_component.hpp:53