19#include <rclcpp/rclcpp.hpp>
21#include <std_msgs/msg/string.hpp>
22#include <carma_ros2_utils/carma_lifecycle_node.hpp>
25#include <visualization_msgs/msg/marker_array.hpp>
26#include <carma_v2x_msgs/msg/mobility_path.hpp>
27#include <unordered_map>
28#include <lanelet2_extension/projection/local_frame_projector.h>
71 geometry_msgs::msg::Point
ECEFToMapPoint(
const carma_v2x_msgs::msg::LocationECEF& ecef_point)
const;
80 visualization_msgs::msg::MarkerArray
composeLabelMarker(
const visualization_msgs::msg::MarkerArray& host_marker,
const std::vector<visualization_msgs::msg::MarkerArray>& cav_markers)
const;
91 std::vector<visualization_msgs::msg::MarkerArray>
matchTrajectoryTimestamps(
const visualization_msgs::msg::MarkerArray& host_marker,
92 const std::vector<visualization_msgs::msg::MarkerArray>& cav_markers)
const;
rclcpp::TimerBase::SharedPtr timer_
carma_ros2_utils::PubPtr< visualization_msgs::msg::MarkerArray > label_marker_pub_
visualization_msgs::msg::MarkerArray composeLabelMarker(const visualization_msgs::msg::MarkerArray &host_marker, const std::vector< visualization_msgs::msg::MarkerArray > &cav_markers) const
Compose a label marker that displays whether if any of the cav's path cross with that of host (respec...
std::unordered_map< std::string, carma_v2x_msgs::msg::MobilityPath > latest_cav_mob_path_msg_
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::MobilityPath > cav_mob_path_sub_
carma_ros2_utils::SubPtr< std_msgs::msg::String > georeference_sub_
visualization_msgs::msg::MarkerArray host_marker_
std::vector< visualization_msgs::msg::MarkerArray > matchTrajectoryTimestamps(const visualization_msgs::msg::MarkerArray &host_marker, const std::vector< visualization_msgs::msg::MarkerArray > &cav_markers) const
Matches timestamps of CAV's individual points of cav_markers to that of host_marker and interpolates ...
std::unordered_map< std::string, size_t > prev_marker_list_size_
carma_ros2_utils::PubPtr< visualization_msgs::msg::MarkerArray > cav_marker_pub_
visualization_msgs::msg::MarkerArray label_marker_
bool host_marker_received_
MobilityPathVisualizer(const rclcpp::NodeOptions &)
Constructor.
std::vector< visualization_msgs::msg::MarkerArray > cav_markers_
carma_ros2_utils::CallbackReturn handle_on_activate(const rclcpp_lifecycle::State &)
geometry_msgs::msg::Point ECEFToMapPoint(const carma_v2x_msgs::msg::LocationECEF &ecef_point) const
Accepts ECEF point in cm to convert to a point in map in meters.
visualization_msgs::msg::MarkerArray composeVisualizationMarker(const carma_v2x_msgs::msg::MobilityPath &msg, const MarkerColor &color)
Compose a visualization marker for mobilitypath messages.
void callbackMobilityPath(carma_v2x_msgs::msg::MobilityPath::UniquePtr msg)
std::shared_ptr< lanelet::projection::LocalFrameProjector > map_projector_
void georeferenceCallback(std_msgs::msg::String::UniquePtr msg)
Callback for map projection string to define lat/lon -> map conversion.
std::string georeference_
carma_ros2_utils::PubPtr< visualization_msgs::msg::MarkerArray > host_marker_pub_
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::MobilityPath > host_mob_path_sub_
Stuct containing the algorithm configuration values for <package_name>