#include <driver_base.hpp>
|
| virtual | ~DriverBase ()=default |
| |
| virtual void | initialize (const rclcpp::Node::SharedPtr &node) |
| | Initialize the driver.
|
| |
| virtual void | deinitialize ()=0 |
| | Deinitialize the driver.
|
| |
| virtual std::string | getName () const |
| | Get the name of the driver.
|
| |
| virtual void | test () |
| | Test the driver.
|
| |
| void | check_directory (std::string folder_name) |
| | Check if the test directory exists, create it if not.
|
| |
| const std::filesystem::path | check_file (const std::string &file_name) |
| |
|
| void | initialize_base (const rclcpp::Node::SharedPtr &node) |
| | Initializer base driver in place of constructor due to plugin semantics.
|
| |
| bool | diagnostics_enabled () const |
| |
| void | enable_diagnostics (const std::string &hardware_id, const std::string &task_name, std::function< void(diagnostic_updater::DiagnosticStatusWrapper &)> task, std::chrono::milliseconds period=std::chrono::seconds(1)) |
| |
| void | disable_diagnostics () |
| |
|
| rclcpp::Node::SharedPtr | node_ |
| | ROS node for the driver.
|
| |
| std::string | name_ |
| | Name of the driver.
|
| |
| std::mutex | buffer_mutex_ |
| | Mutex to protect access to the driver data.
|
| |
| std::condition_variable | buffer_cv_ |
| | Condition variable to notify when new data is available.
|
| |
| std::atomic< bool > | is_running_ { false } |
| | Flag to indicate if the driver thread is running.
|
| |
| bool | diagnostics_enabled_ { false } |
| | Flag to enable standard ROS diagnostics publishing.
|
| |
| std::unique_ptr< diagnostic_updater::Updater > | diagnostics_updater_ |
| |
| rclcpp::TimerBase::SharedPtr | diagnostics_timer_ |
| |
◆ ~DriverBase()
| virtual fp_perception::DriverBase::~DriverBase |
( |
| ) |
|
|
virtualdefault |
◆ check_directory()
| void fp_perception::DriverBase::check_directory |
( |
std::string |
folder_name | ) |
|
|
inline |
Check if the test directory exists, create it if not.
This function checks if a directory named "test" exists in the current working directory. If it does not exist, it creates the directory.
- Parameters
-
| folder_name | The name of the folder to check or create. |
◆ check_file()
| const std::filesystem::path fp_perception::DriverBase::check_file |
( |
const std::string & |
file_name | ) |
|
|
inline |
◆ deinitialize()
| virtual void fp_perception::DriverBase::deinitialize |
( |
| ) |
|
|
pure virtual |
◆ diagnostics_enabled()
| bool fp_perception::DriverBase::diagnostics_enabled |
( |
| ) |
const |
|
inlineprotected |
◆ disable_diagnostics()
| void fp_perception::DriverBase::disable_diagnostics |
( |
| ) |
|
|
inlineprotected |
◆ enable_diagnostics()
| void fp_perception::DriverBase::enable_diagnostics |
( |
const std::string & |
hardware_id, |
|
|
const std::string & |
task_name, |
|
|
std::function< void(diagnostic_updater::DiagnosticStatusWrapper &)> |
task, |
|
|
std::chrono::milliseconds |
period = std::chrono::seconds(1) |
|
) |
| |
|
inlineprotected |
◆ getName()
| virtual std::string fp_perception::DriverBase::getName |
( |
| ) |
const |
|
inlinevirtual |
Get the name of the driver.
- Returns
- std::string The name of the driver
◆ initialize()
| virtual void fp_perception::DriverBase::initialize |
( |
const rclcpp::Node::SharedPtr & |
node | ) |
|
|
inlinevirtual |
◆ initialize_base()
| void fp_perception::DriverBase::initialize_base |
( |
const rclcpp::Node::SharedPtr & |
node | ) |
|
|
inlineprotected |
Initializer base driver in place of constructor due to plugin semantics.
- Parameters
-
| node | shared pointer to the ROS node. |
◆ test()
| virtual void fp_perception::DriverBase::test |
( |
| ) |
|
|
inlinevirtual |
◆ buffer_cv_
| std::condition_variable fp_perception::DriverBase::buffer_cv_ |
|
protected |
Condition variable to notify when new data is available.
◆ buffer_mutex_
| std::mutex fp_perception::DriverBase::buffer_mutex_ |
|
protected |
Mutex to protect access to the driver data.
◆ diagnostics_enabled_
| bool fp_perception::DriverBase::diagnostics_enabled_ { false } |
|
protected |
Flag to enable standard ROS diagnostics publishing.
◆ diagnostics_timer_
| rclcpp::TimerBase::SharedPtr fp_perception::DriverBase::diagnostics_timer_ |
|
protected |
◆ diagnostics_updater_
| std::unique_ptr<diagnostic_updater::Updater> fp_perception::DriverBase::diagnostics_updater_ |
|
protected |
◆ is_running_
| std::atomic<bool> fp_perception::DriverBase::is_running_ { false } |
|
protected |
Flag to indicate if the driver thread is running.
◆ name_
| std::string fp_perception::DriverBase::name_ |
|
protected |
◆ node_
| rclcpp::Node::SharedPtr fp_perception::DriverBase::node_ |
|
protected |
The documentation for this class was generated from the following file: