sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
sas::RobotDriverROS Class Reference

ROS integration helper for a RobotDriver implementation. More...

#include <sas_robot_driver_ros.hpp>

Public Member Functions

 RobotDriverROS (const RobotDriverROS &)=delete
 
 RobotDriverROS (std::shared_ptr< Node > &node, const std::shared_ptr< RobotDriver > &robot_driver, const RobotDriverROSConfiguration &configuration, const std::shared_ptr< ShutdownSignaler > &shutdown_signaler_)
 Construct a new RobotDriverROS object.
 
 RobotDriverROS (std::shared_ptr< Node > &node, const std::shared_ptr< RobotDriver > &robot_driver, const RobotDriverROSConfiguration &configuration, std::atomic_bool *kill_this_node)
 
 ~RobotDriverROS ()
 Destructor; stops the control loop and performs cleanup.
 
int control_loop ()
 Run the control loop.
 

Detailed Description

ROS integration helper for a RobotDriver implementation.

RobotDriverROS manages the ROS node, integrates a RobotDriver instance with ROS topics/services and runs the control loop. It also manages watchdog handling and shutdown signaling between ROS and the RobotDriver.

Constructor & Destructor Documentation

◆ RobotDriverROS()

sas::RobotDriverROS::RobotDriverROS ( std::shared_ptr< Node > &  node,
const std::shared_ptr< RobotDriver > &  robot_driver,
const RobotDriverROSConfiguration configuration,
const std::shared_ptr< ShutdownSignaler > &  shutdown_signaler_ 
)

Construct a new RobotDriverROS object.

Parameters
nodeShared pointer to the rclcpp::Node used for ROS communication.
robot_driverShared pointer to the RobotDriver implementation to be wrapped.
configurationConfiguration parameters for ROS integration and control loop.
shutdown_signalerShared pointer used to signal shutdown between components.

Member Function Documentation

◆ control_loop()

int sas::RobotDriverROS::control_loop ( )

Run the control loop.

This method contains the main control loop and will typically run until a shutdown condition is met. Returns an integer status code on exit.

Returns
int Exit/status code.

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