17#include <carma_ros2_utils/timers/ROSTimerFactory.hpp>
21 namespace std_ph = std::placeholders;
48 RCLCPP_INFO_STREAM(get_logger(),
"PlatooningTacticalPlugin Params" <<
config_);
54 auto error = update_params<bool>({
58 auto error2 = update_params<int>({
65 auto error3 = update_params<double>({
78 rcl_interfaces::msg::SetParametersResult result;
80 result.successful = !error && !error2 && !error3;
82 if (result.successful &&
worker_)
114 RCLCPP_INFO_STREAM(get_logger(),
"PlatooningTacticalPlugin Params" <<
config_);
120 std::make_shared<carma_ros2_utils::timers::ROSTimerFactory>(shared_from_this()));
123 return CallbackReturn::SUCCESS;
127 std::shared_ptr<rmw_request_id_t>,
128 carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req,
129 carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp)
134 worker_->plan_trajectory_cb(*req, *resp);
147#include "rclcpp_components/register_node_macro.hpp"
virtual carma_wm::WorldModelConstPtr get_world_model() final
Method to return the default world model provided as a convience by this base class If this method or...
ROS node for the PlatooningTacticalPlugin to initialize and configure parameters and publishers/subsc...
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > ¶meters)
Example callback for dynamic parameter updates.
std::shared_ptr< PlatooningTacticalPlugin > worker_
PlatooningTacticalPluginConfig config_
std::string get_version_id() override
Returns the version id of this plugin.
carma_ros2_utils::CallbackReturn on_configure_plugin()
This method should be used to load parameters and will be called on the configure state transition.
Node(const rclcpp::NodeOptions &)
Node constructor.
bool get_availability() override
Get the availability status of this plugin based on the current operating environment....
void plan_trajectory_callback(std::shared_ptr< rmw_request_id_t >, carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req, carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp) override
Extending class provided callback which should return a planned trajectory based on the provided traj...
Stuct containing the algorithm configuration values for the PlatooningTacticalPlugin.
double lateral_accel_limit
int speed_moving_average_window_size
bool enable_object_avoidance
double lat_accel_multiplier
int default_downsample_ratio
int turn_downsample_ratio
int curvature_moving_average_window_size
double trajectory_time_length
double max_accel_multiplier
double buffer_ending_downtrack
double curve_resample_step_size