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.
|
The DriverManager serves as a component to manage CARMA required ROS1 Drivers. More...
#include <driver_manager.hpp>
Public Member Functions | |
DriverManager () | |
Default constructor for DriverManager with driver_timeout_ = 1000ms. More... | |
DriverManager (const std::vector< std::string > &critical_driver_names, const std::vector< std::string > &camera_entries, const long driver_timeout) | |
Constructor for DriverManager. More... | |
void | update_driver_status (const carma_driver_msgs::msg::DriverStatus::SharedPtr msg, long current_time) |
Update driver status. More... | |
std::string | are_critical_drivers_operational (long current_time) |
Check if all critical drivers are operational. More... | |
void | evaluate_sensor (int &sensor_input, bool available, long current_time, long timestamp, long driver_timeout) |
Evaluate if the sensor is available. More... | |
carma_msgs::msg::SystemAlert | handle_spin (long time_now, long start_up_timestamp, long startup_duration) |
Handle the spin and publisher. More... | |
Protected Member Functions | |
FRIEND_TEST (DriverManagerTest, testCarTruckHandleSpinFatalUnknown) | |
Protected Attributes | |
std::vector< std::string > | critical_drivers_ |
std::vector< std::string > | camera_entries_ |
std::shared_ptr< EntryManager > | em_ |
Entry manager to keep track of detected plugins. More... | |
long | driver_timeout_ = 1000 |
bool | starting_up_ = true |
The DriverManager serves as a component to manage CARMA required ROS1 Drivers.
Definition at line 44 of file driver_manager.hpp.
subsystem_controllers::DriverManager::DriverManager | ( | ) |
Default constructor for DriverManager with driver_timeout_ = 1000ms.
Definition at line 29 of file driver_manager.cpp.
subsystem_controllers::DriverManager::DriverManager | ( | const std::vector< std::string > & | critical_driver_names, |
const std::vector< std::string > & | camera_entries, | ||
const long | driver_timeout | ||
) |
Constructor for DriverManager.
critical_driver_names | The set of drivers which will be treated as required. A failure in these plugins will result in an exception |
camera_entries | The set of camera drivers. |
driver_timeout | The timeout threshold for essential drivers |
Definition at line 31 of file driver_manager.cpp.
References em_.
std::string subsystem_controllers::DriverManager::are_critical_drivers_operational | ( | long | current_time | ) |
Check if all critical drivers are operational.
Definition at line 108 of file driver_manager.cpp.
References critical_drivers_, driver_timeout_, em_, evaluate_sensor(), and process_bag::i.
Referenced by handle_spin().
void subsystem_controllers::DriverManager::evaluate_sensor | ( | int & | sensor_input, |
bool | available, | ||
long | current_time, | ||
long | timestamp, | ||
long | driver_timeout | ||
) |
Evaluate if the sensor is available.
Definition at line 94 of file driver_manager.cpp.
Referenced by are_critical_drivers_operational().
|
protected |
carma_msgs::msg::SystemAlert subsystem_controllers::DriverManager::handle_spin | ( | long | time_now, |
long | start_up_timestamp, | ||
long | startup_duration | ||
) |
Handle the spin and publisher.
Definition at line 44 of file driver_manager.cpp.
References are_critical_drivers_operational(), arbitrator::SHUTDOWN, and starting_up_.
void subsystem_controllers::DriverManager::update_driver_status | ( | const carma_driver_msgs::msg::DriverStatus::SharedPtr | msg, |
long | current_time | ||
) |
Update driver status.
Definition at line 84 of file driver_manager.cpp.
References em_.
|
protected |
Definition at line 91 of file driver_manager.hpp.
|
protected |
Definition at line 88 of file driver_manager.hpp.
Referenced by are_critical_drivers_operational().
|
protected |
Definition at line 97 of file driver_manager.hpp.
Referenced by are_critical_drivers_operational().
|
protected |
Entry manager to keep track of detected plugins.
Definition at line 94 of file driver_manager.hpp.
Referenced by DriverManager(), are_critical_drivers_operational(), and update_driver_status().
|
protected |
Definition at line 99 of file driver_manager.hpp.
Referenced by handle_spin().