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

ROS integration class 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 class 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:
  • src/sas_robot_driver/include/sas_robot_driver/sas_robot_driver_ros.hpp
  • src/sas_robot_driver/src/sas_robot_driver_ros.cpp