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 <drivers_controller_node.hpp>
Public Member Functions | |
DriversControllerNode ()=delete | |
~DriversControllerNode ()=default | |
DriversControllerNode (const rclcpp::NodeOptions &options) | |
Constructor. Set explicitly to support node composition. More... | |
Public Member Functions inherited from subsystem_controllers::BaseSubsystemController | |
BaseSubsystemController ()=delete | |
BaseSubsystemController (const rclcpp::NodeOptions &options) | |
Constructor. Set explicitly to support node composition. More... | |
~BaseSubsystemController ()=default | |
void | set_config (BaseSubSystemControllerConfig config) |
virtual void | on_system_alert (const carma_msgs::msg::SystemAlert::UniquePtr msg) |
virtual carma_ros2_utils::CallbackReturn | handle_on_configure (const rclcpp_lifecycle::State &prev_state) |
virtual carma_ros2_utils::CallbackReturn | handle_on_activate (const rclcpp_lifecycle::State &prev_state) |
virtual carma_ros2_utils::CallbackReturn | handle_on_deactivate (const rclcpp_lifecycle::State &prev_state) |
virtual carma_ros2_utils::CallbackReturn | handle_on_cleanup (const rclcpp_lifecycle::State &prev_state) |
virtual carma_ros2_utils::CallbackReturn | handle_on_error (const rclcpp_lifecycle::State &prev_state, const std::string &exception_string) |
virtual carma_ros2_utils::CallbackReturn | handle_on_shutdown (const rclcpp_lifecycle::State &prev_state) |
Private Member Functions | |
void | driver_discovery_cb (const carma_driver_msgs::msg::DriverStatus::SharedPtr msg) |
void | critical_drivers_check_callback () |
Timer callback function to check status of required ros1 drivers. More... | |
carma_ros2_utils::CallbackReturn | handle_on_configure (const rclcpp_lifecycle::State &prev_state) |
carma_ros2_utils::CallbackReturn | handle_on_activate (const rclcpp_lifecycle::State &prev_state) |
Private Attributes | |
std::shared_ptr< SSCDriverManager > | ssc_driver_manager_ |
DriversControllerConfig | config_ |
Config for user provided parameters. More... | |
carma_ros2_utils::SubPtr< carma_driver_msgs::msg::DriverStatus > | driver_status_sub_ |
ROS handles. More... | |
std::vector< std::string > | ros1_ssc_driver_name_ |
ROS parameters. More... | |
long | start_up_timestamp_ |
rclcpp::TimerBase::SharedPtr | ssc_status_check_timer_ |
boost::optional< carma_msgs::msg::SystemAlert > | prev_alert |
Additional Inherited Members | |
Protected Member Functions inherited from subsystem_controllers::BaseSubsystemController | |
std::vector< std::string > | get_nodes_in_namespace (const std::string &node_namespace) const |
Returns the list of fully qualified node names for all ROS2 nodes in the provided namespace. More... | |
std::vector< std::string > | get_non_intersecting_set (const std::vector< std::string > &set_a, const std::vector< std::string > &set_b) const |
Returns all elements of the provided set_a which are NOT contained in the provided set_b. More... | |
Protected Attributes inherited from subsystem_controllers::BaseSubsystemController | |
ros2_lifecycle_manager::Ros2LifecycleManager | lifecycle_mgr_ |
Lifecycle Manager which will track the managed nodes and call their lifecycle services on request. More... | |
rclcpp::Subscription< carma_msgs::msg::SystemAlert >::SharedPtr | system_alert_sub_ |
The subscriber for the system alert topic. More... | |
BaseSubSystemControllerConfig | base_config_ |
The configuration struct. More... | |
bool | trigger_managed_nodes_configure_from_base_class_ = true |
Collection of flags which, if true, will cause the base class to make lifecycle service calls to managed nodes. More... | |
bool | trigger_managed_nodes_activate_from_base_class_ = true |
bool | trigger_managed_nodes_deactivate_from_base_class_ = true |
bool | trigger_managed_nodes_cleanup_from_base_class_ = true |
Definition at line 33 of file drivers_controller_node.hpp.
|
delete |
|
default |
|
explicit |
Constructor. Set explicitly to support node composition.
options | The node options to use for configuring this node |
Definition at line 22 of file drivers_controller_node.cpp.
References config_, subsystem_controllers::DriversControllerConfig::driver_timeout_, subsystem_controllers::DriversControllerConfig::excluded_namespace_nodes_, subsystem_controllers::DriversControllerConfig::ros1_ssc_driver_name_, subsystem_controllers::DriversControllerConfig::startup_duration_, and subsystem_controllers::BaseSubsystemController::trigger_managed_nodes_configure_from_base_class_.
|
private |
Timer callback function to check status of required ros1 drivers.
Definition at line 129 of file drivers_controller_node.cpp.
References config_, prev_alert, ssc_driver_manager_, start_up_timestamp_, and subsystem_controllers::DriversControllerConfig::startup_duration_.
Referenced by handle_on_configure().
|
private |
Definition at line 153 of file drivers_controller_node.cpp.
References ssc_driver_manager_.
Referenced by handle_on_configure().
|
privatevirtual |
Reimplemented from subsystem_controllers::BaseSubsystemController.
Definition at line 107 of file drivers_controller_node.cpp.
References subsystem_controllers::BaseSubsystemController::handle_on_activate(), and subsystem_controllers::BaseSubsystemController::trigger_managed_nodes_configure_from_base_class_.
|
privatevirtual |
Reimplemented from subsystem_controllers::BaseSubsystemController.
Definition at line 41 of file drivers_controller_node.cpp.
References subsystem_controllers::BaseSubsystemController::base_config_, subsystem_controllers::BaseSubSystemControllerConfig::call_timeout_ms, config_, critical_drivers_check_callback(), driver_discovery_cb(), driver_status_sub_, subsystem_controllers::DriversControllerConfig::driver_timeout_, subsystem_controllers::DriversControllerConfig::excluded_namespace_nodes_, subsystem_controllers::BaseSubsystemController::get_non_intersecting_set(), subsystem_controllers::BaseSubsystemController::handle_on_configure(), subsystem_controllers::BaseSubsystemController::lifecycle_mgr_, subsystem_controllers::DriversControllerConfig::ros1_ssc_driver_name_, subsystem_controllers::BaseSubSystemControllerConfig::service_timeout_ms, ssc_driver_manager_, ssc_status_check_timer_, start_up_timestamp_, and subsystem_controllers::DriversControllerConfig::startup_duration_.
|
private |
Config for user provided parameters.
Definition at line 52 of file drivers_controller_node.hpp.
Referenced by DriversControllerNode(), critical_drivers_check_callback(), and handle_on_configure().
|
private |
ROS handles.
Definition at line 55 of file drivers_controller_node.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 75 of file drivers_controller_node.hpp.
Referenced by critical_drivers_check_callback().
|
private |
ROS parameters.
Definition at line 67 of file drivers_controller_node.hpp.
|
private |
Definition at line 49 of file drivers_controller_node.hpp.
Referenced by critical_drivers_check_callback(), driver_discovery_cb(), and handle_on_configure().
|
private |
Definition at line 72 of file drivers_controller_node.hpp.
Referenced by handle_on_configure().
|
private |
Definition at line 70 of file drivers_controller_node.hpp.
Referenced by critical_drivers_check_callback(), and handle_on_configure().