College of DuPage Lunabotics Documentation  2025
HardwareMonitor Class Reference

Monitors the hardware connections and status of sensors (D456, D455, and LIDARs). More...

Inheritance diagram for HardwareMonitor:
Collaboration diagram for HardwareMonitor:

Public Member Functions

 HardwareMonitor ()
 Constructor for HardwareMonitor. More...
 
void reset_timer (rclcpp::TimerBase::SharedPtr &timer, bool &valid_flag)
 Resets the timer and sets the validity flag to true. More...
 
void check_connection (bool &valid_flag, const std::string &sensor_name)
 Checks the connection status and logs a warning if no connection is detected. More...
 

Private Attributes

rclcpp::Subscription< sensor_msgs::msg::Image >::SharedPtr d456_subscriber_
 
rclcpp::Subscription< sensor_msgs::msg::Image >::SharedPtr d455_subscriber_
 
rclcpp::Subscription< sensor_msgs::msg::LaserScan >::SharedPtr lidar1_subscriber_
 
rclcpp::Subscription< sensor_msgs::msg::LaserScan >::SharedPtr lidar2_subscriber_
 
rclcpp::TimerBase::SharedPtr d456_timer_
 
rclcpp::TimerBase::SharedPtr d455_timer_
 
rclcpp::TimerBase::SharedPtr lidar1_timer_
 
rclcpp::TimerBase::SharedPtr lidar2_timer_
 
rclcpp::TimerBase::SharedPtr all_sensors_timer_
 
bool d456_valid_
 
bool d455_valid_
 
bool lidar1_valid_
 
bool lidar2_valid_
 

Detailed Description

Monitors the hardware connections and status of sensors (D456, D455, and LIDARs).

Constructor & Destructor Documentation

◆ HardwareMonitor()

HardwareMonitor::HardwareMonitor ( )
inline

Constructor for HardwareMonitor.

Member Function Documentation

◆ check_connection()

void HardwareMonitor::check_connection ( bool &  valid_flag,
const std::string &  sensor_name 
)
inline

Checks the connection status and logs a warning if no connection is detected.

Parameters
valid_flagThe validity flag indicating the connection status.
sensor_nameThe name of the sensor.

◆ reset_timer()

void HardwareMonitor::reset_timer ( rclcpp::TimerBase::SharedPtr &  timer,
bool &  valid_flag 
)
inline

Resets the timer and sets the validity flag to true.

Parameters
timerThe timer to reset.
valid_flagThe validity flag to set.

Member Data Documentation

◆ all_sensors_timer_

rclcpp::TimerBase::SharedPtr HardwareMonitor::all_sensors_timer_
private

◆ d455_subscriber_

rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr HardwareMonitor::d455_subscriber_
private

◆ d455_timer_

rclcpp::TimerBase::SharedPtr HardwareMonitor::d455_timer_
private

◆ d455_valid_

bool HardwareMonitor::d455_valid_
private

◆ d456_subscriber_

rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr HardwareMonitor::d456_subscriber_
private

◆ d456_timer_

rclcpp::TimerBase::SharedPtr HardwareMonitor::d456_timer_
private

◆ d456_valid_

bool HardwareMonitor::d456_valid_
private

◆ lidar1_subscriber_

rclcpp::Subscription<sensor_msgs::msg::LaserScan>::SharedPtr HardwareMonitor::lidar1_subscriber_
private

◆ lidar1_timer_

rclcpp::TimerBase::SharedPtr HardwareMonitor::lidar1_timer_
private

◆ lidar1_valid_

bool HardwareMonitor::lidar1_valid_
private

◆ lidar2_subscriber_

rclcpp::Subscription<sensor_msgs::msg::LaserScan>::SharedPtr HardwareMonitor::lidar2_subscriber_
private

◆ lidar2_timer_

rclcpp::TimerBase::SharedPtr HardwareMonitor::lidar2_timer_
private

◆ lidar2_valid_

bool HardwareMonitor::lidar2_valid_
private

The documentation for this class was generated from the following file: