Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
#include <port_drayage_plugin.hpp>
Public Member Functions | |
PortDrayagePlugin (const rclcpp::NodeOptions &) | |
PortDrayagePlugin constructor. More... | |
bool | callSetActiveRouteClient (std::shared_ptr< carma_planning_msgs::srv::SetActiveRoute::Request > req) |
Calls the /guidance/set_active_route service client to set an active route. More... | |
void | publishMobilityOperation (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Publishes a Mobility Operation message to the outgoing mobility operation topic. More... | |
void | publishUIInstructions (const carma_msgs::msg::UIInstructions &msg) |
Publishes a UI Instructions message to the outgoing UI Instructions topic. More... | |
rcl_interfaces::msg::SetParametersResult | parameter_update_callback (const std::vector< rclcpp::Parameter > ¶meters) |
Callback for dynamic parameter updates. More... | |
carma_ros2_utils::CallbackReturn | handle_on_configure (const rclcpp_lifecycle::State &prev_state) |
Private Attributes | |
carma_ros2_utils::SubPtr< geometry_msgs::msg::PoseStamped > | pose_subscriber_ |
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::MobilityOperation > | inbound_mobility_operation_subscriber_ |
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::GuidanceState > | guidance_state_subscriber_ |
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::RouteEvent > | route_event_subscriber_ |
carma_ros2_utils::SubPtr< std_msgs::msg::String > | georeference_subscriber_ |
carma_ros2_utils::PubPtr< carma_v2x_msgs::msg::MobilityOperation > | outbound_mobility_operations_publisher_ |
carma_ros2_utils::PubPtr< carma_msgs::msg::UIInstructions > | ui_instructions_publisher_ |
carma_ros2_utils::ClientPtr< carma_planning_msgs::srv::SetActiveRoute > | set_active_route_client_ |
Config | config_ |
PortDrayageWorker | pdw_ |
Primary Port Drayage Plugin implementation class. Split into this class primarily concerned with the handling of ROS message processing and the PortDrayageWorker class responsible for handling the core business logic of the Port Drayage functionality.
Definition at line 43 of file port_drayage_plugin.hpp.
|
explicit |
PortDrayagePlugin constructor.
Definition at line 22 of file port_drayage_plugin.cpp.
References port_drayage_plugin::Config::cargo_id, port_drayage_plugin::Config::cmv_id, config_, port_drayage_plugin::Config::enable_port_drayage, and port_drayage_plugin::Config::starting_at_staging_area.
bool port_drayage_plugin::PortDrayagePlugin::callSetActiveRouteClient | ( | std::shared_ptr< carma_planning_msgs::srv::SetActiveRoute::Request > | req | ) |
Calls the /guidance/set_active_route service client to set an active route.
req | The service request being used to call the service client |
Definition at line 110 of file port_drayage_plugin.cpp.
References set_active_route_client_.
carma_ros2_utils::CallbackReturn port_drayage_plugin::PortDrayagePlugin::handle_on_configure | ( | const rclcpp_lifecycle::State & | prev_state | ) |
Definition at line 63 of file port_drayage_plugin.cpp.
References port_drayage_plugin::Config::cargo_id, port_drayage_plugin::Config::cmv_id, config_, port_drayage_plugin::Config::enable_port_drayage, georeference_subscriber_, guidance_state_subscriber_, inbound_mobility_operation_subscriber_, port_drayage_plugin::PortDrayageWorker::onGuidanceState(), port_drayage_plugin::PortDrayageWorker::onInboundMobilityOperation(), port_drayage_plugin::PortDrayageWorker::onNewGeoreference(), port_drayage_plugin::PortDrayageWorker::onNewPose(), port_drayage_plugin::PortDrayageWorker::onRouteEvent(), outbound_mobility_operations_publisher_, parameter_update_callback(), pdw_, pose_subscriber_, route_event_subscriber_, set_active_route_client_, port_drayage_plugin::PortDrayageWorker::setCargoID(), port_drayage_plugin::PortDrayageWorker::setEnablePortDrayageFlag(), port_drayage_plugin::PortDrayageWorker::setStartingAtStagingAreaFlag(), port_drayage_plugin::PortDrayageWorker::setVehicleID(), port_drayage_plugin::Config::starting_at_staging_area, and ui_instructions_publisher_.
rcl_interfaces::msg::SetParametersResult port_drayage_plugin::PortDrayagePlugin::parameter_update_callback | ( | const std::vector< rclcpp::Parameter > & | parameters | ) |
Callback for dynamic parameter updates.
Definition at line 39 of file port_drayage_plugin.cpp.
References port_drayage_plugin::Config::cargo_id, port_drayage_plugin::Config::cmv_id, config_, port_drayage_plugin::Config::enable_port_drayage, pdw_, port_drayage_plugin::PortDrayageWorker::setCargoID(), port_drayage_plugin::PortDrayageWorker::setEnablePortDrayageFlag(), port_drayage_plugin::PortDrayageWorker::setStartingAtStagingAreaFlag(), port_drayage_plugin::PortDrayageWorker::setVehicleID(), and port_drayage_plugin::Config::starting_at_staging_area.
Referenced by handle_on_configure().
void port_drayage_plugin::PortDrayagePlugin::publishMobilityOperation | ( | const carma_v2x_msgs::msg::MobilityOperation & | msg | ) |
Publishes a Mobility Operation message to the outgoing mobility operation topic.
msg | The Mobility Operation message to be published |
Definition at line 136 of file port_drayage_plugin.cpp.
References outbound_mobility_operations_publisher_.
void port_drayage_plugin::PortDrayagePlugin::publishUIInstructions | ( | const carma_msgs::msg::UIInstructions & | msg | ) |
Publishes a UI Instructions message to the outgoing UI Instructions topic.
msg | The UI Instructions message to be published |
Definition at line 141 of file port_drayage_plugin.cpp.
References ui_instructions_publisher_.
|
private |
Definition at line 62 of file port_drayage_plugin.hpp.
Referenced by PortDrayagePlugin(), handle_on_configure(), and parameter_update_callback().
|
private |
Definition at line 52 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 50 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 49 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 55 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure(), and publishMobilityOperation().
|
private |
Definition at line 65 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure(), and parameter_update_callback().
|
private |
Definition at line 48 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 51 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 59 of file port_drayage_plugin.hpp.
Referenced by callSetActiveRouteClient(), and handle_on_configure().
|
private |
Definition at line 56 of file port_drayage_plugin.hpp.
Referenced by handle_on_configure(), and publishUIInstructions().