19#include <rclcpp/rclcpp.hpp>
21#include <boost/uuid/uuid_generators.hpp>
22#include <boost/uuid/uuid_io.hpp>
23#include <boost/shared_ptr.hpp>
24#include <lanelet2_extension/projection/local_frame_projector.h>
25#include <bsm_helper/bsm_helper.h>
26#include <std_msgs/msg/string.hpp>
27#include <carma_planning_msgs/msg/trajectory_plan.hpp>
28#include <carma_planning_msgs/msg/guidance_state.hpp>
29#include <carma_v2x_msgs/msg/mobility_path.hpp>
30#include <carma_v2x_msgs/msg/bsm.hpp>
32#include <carma_ros2_utils/carma_lifecycle_node.hpp>
49 carma_ros2_utils::SubPtr<carma_planning_msgs::msg::TrajectoryPlan>
traj_sub_;
50 carma_ros2_utils::SubPtr<carma_v2x_msgs::msg::BSM>
bsm_sub_;
57 carma_ros2_utils::PubPtr<carma_v2x_msgs::msg::MobilityPath>
path_pub_;
94 void trajectory_cb(
const carma_planning_msgs::msg::TrajectoryPlan::UniquePtr msg);
100 void bsm_cb(
const carma_v2x_msgs::msg::BSM::UniquePtr msg);
106 void guidance_state_cb(
const carma_planning_msgs::msg::GuidanceState::UniquePtr msg);
120 carma_v2x_msgs::msg::Trajectory
trajectory_plan_to_trajectory(
const std::vector<carma_planning_msgs::msg::TrajectoryPlanPoint>& traj_points)
const;
127 carma_v2x_msgs::msg::LocationECEF
trajectory_point_to_ECEF(
const carma_planning_msgs::msg::TrajectoryPlanPoint& traj_point)
const;
The class responsible for publishing MobilityPath messages based on the latest trajectory plan.
std::string georeference_
void georeference_cb(const std_msgs::msg::String::UniquePtr msg)
Callback for map projection string to define lat/lon -> map conversion.
void guidance_state_cb(const carma_planning_msgs::msg::GuidanceState::UniquePtr msg)
Callback for the Guidance State.
rclcpp::TimerBase::SharedPtr path_pub_timer_
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::GuidanceState > guidance_state_sub_
void trajectory_cb(const carma_planning_msgs::msg::TrajectoryPlan::UniquePtr msg)
Callback for the trajectory plan subscriber, which stores the latest trajectory plan locally and stor...
carma_ros2_utils::SubPtr< std_msgs::msg::String > georeference_sub_
carma_v2x_msgs::msg::MobilityHeader compose_mobility_header(uint64_t time)
Generates a MobilityHeader to be used for a published MobilityPath message.
carma_planning_msgs::msg::TrajectoryPlan latest_trajectory_
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::TrajectoryPlan > traj_sub_
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > ¶meters)
Function callback for dynamic parameter updates.
carma_v2x_msgs::msg::LocationECEF trajectory_point_to_ECEF(const carma_planning_msgs::msg::TrajectoryPlanPoint &traj_point) const
Converts Trajectory Plan Point to ECEF (accepts meters and outputs in cm)
std::shared_ptr< lanelet::projection::LocalFrameProjector > map_projector_
std::string sender_bsm_id
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
carma_v2x_msgs::msg::MobilityPath latest_mobility_path_
carma_ros2_utils::CallbackReturn handle_on_activate(const rclcpp_lifecycle::State &)
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::BSM > bsm_sub_
carma_ros2_utils::PubPtr< carma_v2x_msgs::msg::MobilityPath > path_pub_
MobilityPathPublication(const rclcpp::NodeOptions &)
MobilityPathPublication constructor.
bool spin_callback()
Spin callback, which will be called frequently based on the configured spin rate.
void bsm_cb(const carma_v2x_msgs::msg::BSM::UniquePtr msg)
Callback for the BSM subscriber, which stores the BSM's BSMCoreData locally.
carma_v2x_msgs::msg::BSMCoreData bsm_core_
carma_v2x_msgs::msg::MobilityPath mobility_path_message_generator(const carma_planning_msgs::msg::TrajectoryPlan &trajectory_plan)
Generates a MobilityPath message from a TrajectoryPlan.
carma_v2x_msgs::msg::Trajectory trajectory_plan_to_trajectory(const std::vector< carma_planning_msgs::msg::TrajectoryPlanPoint > &traj_points) const
Converts a Trajectory Plan to a (Mobility) Trajectory.
Stuct containing the algorithm configuration values for mobilitypath_publisher.