Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ttl_driver::TtlInterfaceCore Class Reference

The TtlInterfaceCore class schedules and manager the communication in the TTL bus its main purpose it to manage queues of commands for the TTL Motors This class is used for now by : More...

#include <ttl_interface_core.hpp>

Inheritance diagram for ttl_driver::TtlInterfaceCore:
Inheritance graph
[legend]

Public Member Functions

void activeDebugMode (bool mode) override
 TtlInterfaceCore::activeDebugMode. More...
 
int addJoint (const std::shared_ptr< common::model::JointState > &jointState)
 TtlInterfaceCore::addJoint. More...
 
void addSingleCommandToQueue (std::unique_ptr< common::model::ISingleMotorCmd > &&cmd) override
 TtlInterfaceCore::addSingleCommandToQueue. More...
 
void addSingleCommandToQueue (std::vector< std::unique_ptr< common::model::ISingleMotorCmd >> cmd) override
 TtlInterfaceCore::addSingleCommandToQueue. More...
 
void addSyncCommandToQueue (std::unique_ptr< common::model::ISynchronizeMotorCmd > &&cmd) override
 TtlInterfaceCore::setSyncCommand. More...
 
int changeId (common::model::EHardwareType motor_type, uint8_t old_id, uint8_t new_id) override
 TtlInterfaceCore::changeId. More...
 
void clearConveyorCommandQueue ()
 TtlInterfaceCore::clearConveyorCommandQueue. More...
 
void clearSingleCommandQueue ()
 TtlInterfaceCore::clearSingleCommandQueue. More...
 
void clearSyncCommandQueue ()
 TtlInterfaceCore::clearSyncCommandQueue. More...
 
common::model::EBusProtocol getBusProtocol () const override
 TtlInterfaceCore::getBusProtocol. More...
 
niryo_robot_msgs::BusState getBusState () const override
 TtlInterfaceCore::getBusState. More...
 
int32_t getCalibrationResult (uint8_t id) const override
 TtlInterfaceCore::getCalibrationResult. More...
 
common::model::EStepperCalibrationStatus getCalibrationStatus () const override
 TtlInterfaceCore::getCalibrationStatus. More...
 
bool getCollisionStatus () const
 TtlInterfaceCore::readCollisionStatus. More...
 
std::shared_ptr< common::model::EndEffectorState > getEndEffectorState (uint8_t id)
 TtlInterfaceCore::getEndEffectorState. More...
 
std::shared_ptr< common::model::JointState > getJointState (uint8_t motor_id) const override
 TtlInterfaceCore::getState. More...
 
std::vector< std::shared_ptr< common::model::JointState > > getJointStates () const override
 TtlInterfaceCore::getJointStates. More...
 
double getPosition (uint8_t id) const
 TtlInterfaceCore::getPosition. More...
 
std::vector< uint8_t > getRemovedMotorList () const override
 TtlInterfaceCore::getRemovedMotorList. More...
 
bool init (ros::NodeHandle &nh) override
 TtlInterfaceCore::init. More...
 
int initMotor (const std::shared_ptr< common::model::AbstractMotorState > &motor_state)
 
bool isConnectionOk () const override
 TtlInterfaceCore::isConnectionOk. More...
 
int launchMotorsReport () override
 TtlInterfaceCore::launchMotorsReport. More...
 
TtlInterfaceCoreoperator= (const TtlInterfaceCore &)=delete
 
TtlInterfaceCoreoperator= (TtlInterfaceCore &&)=delete
 
bool readHomingAbsPosition ()
 TtlInterfaceCore::readHomingAbsPosition. More...
 
int readMoving (uint8_t id, uint8_t &status)
 TtlInterfaceCore::readMoving. More...
 
bool rebootHardware (const std::shared_ptr< common::model::AbstractHardwareState > &hw_state) override
 TtlInterfaceCore::rebootMotor. More...
 
void resetCalibration () override
 TtlInterfaceCore::resetCalibration. More...
 
bool scanMotorId (uint8_t motor_to_find) override
 TtlInterfaceCore::scanMotorId. More...
 
std::vector< uint8_t > scanTools ()
 TtlInterfaceCore::scanTools. More...
 
void setCalibrationStatus (const common::model::EStepperCalibrationStatus status) override
 TtlInterfaceCore::setCalibrationStatus. More...
 
int setConveyor (const std::shared_ptr< common::model::ConveyorState > &state) override
 TtlInterfaceCore::setConveyor. More...
 
int setEndEffector (const std::shared_ptr< common::model::EndEffectorState > &end_effector_state)
 TtlInterfaceCore::setEndEffector. More...
 
void setEstopFlag (bool value)
 
int setTool (const std::shared_ptr< common::model::ToolState > &toolState)
 TtlInterfaceCore::setTool. More...
 
void setTrajectoryControllerCommands (std::vector< std::pair< uint8_t, uint32_t >> &&cmd)
 TtlInterfaceCore::setTrajectoryControllerCommands. More...
 
void startCalibration () override
 TtlInterfaceCore::startCalibration. More...
 
void startControlLoop () override
 TtlInterfaceCore::startControlLoop. More...
 
 TtlInterfaceCore (const TtlInterfaceCore &)=delete
 
 TtlInterfaceCore (ros::NodeHandle &nh)
 TtlInterfaceCore::TtlInterfaceCore. More...
 
 TtlInterfaceCore (TtlInterfaceCore &&)=delete
 
void unsetConveyor (uint8_t motor_id, uint8_t default_conveyor_id) override
 TtlInterfaceCore::unsetConveyor. More...
 
void unsetTool (uint8_t motor_id)
 TtlInterfaceCore::unsetTool. More...
 
void waitSingleQueueFree ()
 TtlInterfaceCore::waitSingleQueueFree. More...
 
void waitSyncQueueFree ()
 TtlInterfaceCore::waitSyncQueueFree. More...
 
 ~TtlInterfaceCore () override
 TtlInterfaceCore::~TtlInterfaceCore. More...
 

Private Member Functions

bool _callbackActivateLeds (niryo_robot_msgs::SetInt::Request &req, niryo_robot_msgs::SetInt::Response &res)
 TtlInterfaceCore::callbackActivateLeds. More...
 
bool _callbackReadCustomValue (ttl_driver::ReadCustomValue::Request &req, ttl_driver::ReadCustomValue::Response &res)
 TtlInterfaceCore::callbackReadCustomValue. More...
 
bool _callbackReadPIDValue (ttl_driver::ReadPIDValue::Request &req, ttl_driver::ReadPIDValue::Response &res)
 TtlInterfaceCore::_callbackReadPIDValue. More...
 
bool _callbackReadVelocityProfile (ttl_driver::ReadVelocityProfile::Request &req, ttl_driver::ReadVelocityProfile::Response &res)
 TtlInterfaceCore::_callbackReadVelocityProfile. More...
 
bool _callbackWriteCustomValue (ttl_driver::WriteCustomValue::Request &req, ttl_driver::WriteCustomValue::Response &res)
 TtlInterfaceCore::callbackWriteCustomValue. More...
 
bool _callbackWritePIDValue (ttl_driver::WritePIDValue::Request &req, ttl_driver::WritePIDValue::Response &res)
 TtlInterfaceCore::_callbackWritePIDValue. More...
 
bool _callbackWriteVelocityProfile (ttl_driver::WriteVelocityProfile::Request &req, ttl_driver::WriteVelocityProfile::Response &res)
 TtlInterfaceCore::_callbackWriteVelocityProfile. More...
 
void _executeCommand () override
 TtlInterfaceCore::_executeCommand : execute all the cmd in the current queue. More...
 
void _publishCollisionStatus (const ros::TimerEvent &)
 
void controlLoop () override
 TtlInterfaceCore::controlLoop. More...
 
void initParameters (ros::NodeHandle &nh) override
 TtlInterfaceCore::initParameters. More...
 
int motorCmdReport (const common::model::JointState &jState, common::model::EHardwareType motor_type)
 TtlInterfaceCore::motorCmdReport. More...
 
int motorScanReport (uint8_t motor_id)
 TtlInterfaceCore::motorScanReport. More...
 
void resetHardwareControlLoopRates () override
 TtlInterfaceCore::resetHardwareControlLoopRates. More...
 
void startPublishers (ros::NodeHandle &nh) override
 TtlInterfaceCore::startPublishers. More...
 
void startServices (ros::NodeHandle &nh) override
 TtlInterfaceCore::startServices. More...
 
void startSubscribers (ros::NodeHandle &nh) override
 TtlInterfaceCore::startSubscribers. More...
 

Private Attributes

ros::ServiceServer _activate_leds_server
 
bool _collision_detected {false}
 
ros::Publisher _collision_status_publisher
 
ros::Duration _collision_status_publisher_duration {0.01}
 
ros::Timer _collision_status_publisher_timer
 
bool _control_loop_flag {false}
 
double _control_loop_frequency {0.0}
 
std::mutex _control_loop_mutex
 
std::thread _control_loop_thread
 
std::mutex _conveyor_cmd_queue_mutex
 
std::queue< std::unique_ptr< common::model::AbstractTtlSingleMotorCmd > > _conveyor_cmds_queue
 
ros::ServiceServer _custom_cmd_getter
 
ros::ServiceServer _custom_cmd_server
 
bool _debug_flag {false}
 
double _delta_time_data_read {0.0}
 
double _delta_time_end_effector_read {0.0}
 
double _delta_time_status_read {0.0}
 
double _delta_time_write {0.0}
 
bool _estop_flag {false}
 
ros::ServiceServer _frequencies_getter
 
ros::ServiceServer _frequencies_setter
 
std::string _hardware_version
 
std::vector< std::pair< uint8_t, uint32_t > > _joint_trajectory_cmd
 
ros::ServiceServer _pid_getter
 
ros::ServiceServer _pid_server
 
std::mutex _single_cmd_queue_mutex
 
std::queue< std::unique_ptr< common::model::AbstractTtlSingleMotorCmd > > _single_cmds_queue
 
std::mutex _sync_cmd_queue_mutex
 
std::queue< std::unique_ptr< common::model::AbstractTtlSynchronizeMotorCmd > > _sync_cmds_queue
 
double _time_check_connection_last_read {0.0}
 
double _time_check_end_effector_last_read {0.0}
 
double _time_hw_data_last_read {0.0}
 
double _time_hw_data_last_write {0.0}
 
double _time_hw_end_effector_last_read {0.0}
 
double _time_hw_status_last_read {0.0}
 
std::mutex _traj_cmd_mutex
 
std::unique_ptr< TtlManager_ttl_manager
 
ros::ServiceServer _velocity_profile_getter
 
ros::ServiceServer _velocity_profile_server
 

Static Private Attributes

static constexpr int QUEUE_OVERFLOW = 20
 

Detailed Description

The TtlInterfaceCore class schedules and manager the communication in the TTL bus its main purpose it to manage queues of commands for the TTL Motors This class is used for now by :

Definition at line 74 of file ttl_interface_core.hpp.

Constructor & Destructor Documentation

◆ TtlInterfaceCore() [1/3]

ttl_driver::TtlInterfaceCore::TtlInterfaceCore ( ros::NodeHandle &  nh)

◆ ~TtlInterfaceCore()

ttl_driver::TtlInterfaceCore::~TtlInterfaceCore ( )
override

◆ TtlInterfaceCore() [2/3]

ttl_driver::TtlInterfaceCore::TtlInterfaceCore ( const TtlInterfaceCore )
delete

◆ TtlInterfaceCore() [3/3]

ttl_driver::TtlInterfaceCore::TtlInterfaceCore ( TtlInterfaceCore &&  )
delete

Member Function Documentation

◆ _callbackActivateLeds()

bool ttl_driver::TtlInterfaceCore::_callbackActivateLeds ( niryo_robot_msgs::SetInt::Request &  req,
niryo_robot_msgs::SetInt::Response &  res 
)
private

TtlInterfaceCore::callbackActivateLeds.

Parameters
req
res
Returns

Definition at line 997 of file ttl_interface_core.cpp.

◆ _callbackReadCustomValue()

bool ttl_driver::TtlInterfaceCore::_callbackReadCustomValue ( ttl_driver::ReadCustomValue::Request &  req,
ttl_driver::ReadCustomValue::Response &  res 
)
private

TtlInterfaceCore::callbackReadCustomValue.

Parameters
req
res
Returns

Definition at line 1018 of file ttl_interface_core.cpp.

◆ _callbackReadPIDValue()

bool ttl_driver::TtlInterfaceCore::_callbackReadPIDValue ( ttl_driver::ReadPIDValue::Request &  req,
ttl_driver::ReadPIDValue::Response &  res 
)
private

TtlInterfaceCore::_callbackReadPIDValue.

Parameters
req
res
Returns

Definition at line 1074 of file ttl_interface_core.cpp.

◆ _callbackReadVelocityProfile()

bool ttl_driver::TtlInterfaceCore::_callbackReadVelocityProfile ( ttl_driver::ReadVelocityProfile::Request &  req,
ttl_driver::ReadVelocityProfile::Response &  res 
)
private

TtlInterfaceCore::_callbackReadVelocityProfile.

Parameters
req
res
Returns

Definition at line 1144 of file ttl_interface_core.cpp.

◆ _callbackWriteCustomValue()

bool ttl_driver::TtlInterfaceCore::_callbackWriteCustomValue ( ttl_driver::WriteCustomValue::Request &  req,
ttl_driver::WriteCustomValue::Response &  res 
)
private

TtlInterfaceCore::callbackWriteCustomValue.

Parameters
req
res
Returns

Definition at line 1047 of file ttl_interface_core.cpp.

◆ _callbackWritePIDValue()

bool ttl_driver::TtlInterfaceCore::_callbackWritePIDValue ( ttl_driver::WritePIDValue::Request &  req,
ttl_driver::WritePIDValue::Response &  res 
)
private

TtlInterfaceCore::_callbackWritePIDValue.

Parameters
req
res
Returns

Definition at line 1119 of file ttl_interface_core.cpp.

◆ _callbackWriteVelocityProfile()

bool ttl_driver::TtlInterfaceCore::_callbackWriteVelocityProfile ( ttl_driver::WriteVelocityProfile::Request &  req,
ttl_driver::WriteVelocityProfile::Response &  res 
)
private

TtlInterfaceCore::_callbackWriteVelocityProfile.

Parameters
req
res
Returns

Definition at line 1193 of file ttl_interface_core.cpp.

◆ _executeCommand()

void ttl_driver::TtlInterfaceCore::_executeCommand ( )
overrideprivate

TtlInterfaceCore::_executeCommand : execute all the cmd in the current queue.

Definition at line 627 of file ttl_interface_core.cpp.

◆ _publishCollisionStatus()

void ttl_driver::TtlInterfaceCore::_publishCollisionStatus ( const ros::TimerEvent &  )
private

Definition at line 1228 of file ttl_interface_core.cpp.

◆ activeDebugMode()

void ttl_driver::TtlInterfaceCore::activeDebugMode ( bool  mode)
override

TtlInterfaceCore::activeDebugMode.

Parameters
mode

Definition at line 510 of file ttl_interface_core.cpp.

◆ addJoint()

int ttl_driver::TtlInterfaceCore::addJoint ( const std::shared_ptr< common::model::JointState > &  jointState)

TtlInterfaceCore::addJoint.

Parameters
jointState
Returns

Definition at line 675 of file ttl_interface_core.cpp.

◆ addSingleCommandToQueue() [1/2]

void ttl_driver::TtlInterfaceCore::addSingleCommandToQueue ( std::unique_ptr< common::model::ISingleMotorCmd > &&  cmd)
override

TtlInterfaceCore::addSingleCommandToQueue.

Parameters
cmd

Definition at line 866 of file ttl_interface_core.cpp.

◆ addSingleCommandToQueue() [2/2]

void ttl_driver::TtlInterfaceCore::addSingleCommandToQueue ( std::vector< std::unique_ptr< common::model::ISingleMotorCmd >>  cmd)
override

TtlInterfaceCore::addSingleCommandToQueue.

Parameters
cmd

Definition at line 903 of file ttl_interface_core.cpp.

◆ addSyncCommandToQueue()

void ttl_driver::TtlInterfaceCore::addSyncCommandToQueue ( std::unique_ptr< common::model::ISynchronizeMotorCmd > &&  cmd)
override

TtlInterfaceCore::setSyncCommand.

Parameters
cmd

Definition at line 849 of file ttl_interface_core.cpp.

◆ changeId()

int ttl_driver::TtlInterfaceCore::changeId ( common::model::EHardwareType  motor_type,
uint8_t  old_id,
uint8_t  new_id 
)
override

TtlInterfaceCore::changeId.

Parameters
motor_type
old_id
new_id
Returns

Definition at line 791 of file ttl_interface_core.cpp.

◆ clearConveyorCommandQueue()

void ttl_driver::TtlInterfaceCore::clearConveyorCommandQueue ( )

◆ clearSingleCommandQueue()

void ttl_driver::TtlInterfaceCore::clearSingleCommandQueue ( )

◆ clearSyncCommandQueue()

void ttl_driver::TtlInterfaceCore::clearSyncCommandQueue ( )

◆ controlLoop()

void ttl_driver::TtlInterfaceCore::controlLoop ( )
overrideprivate

◆ getBusProtocol()

common::model::EBusProtocol ttl_driver::TtlInterfaceCore::getBusProtocol ( ) const
inlineoverride

TtlInterfaceCore::getBusProtocol.

Returns

Definition at line 270 of file ttl_interface_core.hpp.

◆ getBusState()

niryo_robot_msgs::BusState ttl_driver::TtlInterfaceCore::getBusState ( ) const
override

TtlInterfaceCore::getBusState.

Returns

Definition at line 950 of file ttl_interface_core.cpp.

◆ getCalibrationResult()

int32_t ttl_driver::TtlInterfaceCore::getCalibrationResult ( uint8_t  id) const
override

TtlInterfaceCore::getCalibrationResult.

Parameters
id
Returns

Definition at line 484 of file ttl_interface_core.cpp.

◆ getCalibrationStatus()

common::model::EStepperCalibrationStatus ttl_driver::TtlInterfaceCore::getCalibrationStatus ( ) const
inlineoverride

◆ getCollisionStatus()

bool ttl_driver::TtlInterfaceCore::getCollisionStatus ( ) const
inline

TtlInterfaceCore::readCollisionStatus.

Returns
true
false

Definition at line 289 of file ttl_interface_core.hpp.

◆ getEndEffectorState()

std::shared_ptr< common::model::EndEffectorState > ttl_driver::TtlInterfaceCore::getEndEffectorState ( uint8_t  id)

TtlInterfaceCore::getEndEffectorState.

Parameters
id
Returns

Definition at line 934 of file ttl_interface_core.cpp.

◆ getJointState()

std::shared_ptr< common::model::JointState > ttl_driver::TtlInterfaceCore::getJointState ( uint8_t  motor_id) const
override

TtlInterfaceCore::getState.

Parameters
motor_id
Returns

Definition at line 924 of file ttl_interface_core.cpp.

◆ getJointStates()

std::vector< std::shared_ptr< common::model::JointState > > ttl_driver::TtlInterfaceCore::getJointStates ( ) const
override

TtlInterfaceCore::getJointStates.

Returns

Definition at line 917 of file ttl_interface_core.cpp.

◆ getPosition()

double ttl_driver::TtlInterfaceCore::getPosition ( uint8_t  id) const

TtlInterfaceCore::getPosition.

Parameters
id
Returns

Definition at line 944 of file ttl_interface_core.cpp.

◆ getRemovedMotorList()

std::vector< uint8_t > ttl_driver::TtlInterfaceCore::getRemovedMotorList ( ) const
inlineoverride

◆ init()

bool ttl_driver::TtlInterfaceCore::init ( ros::NodeHandle &  nh)
override

TtlInterfaceCore::init.

Definition at line 86 of file ttl_interface_core.cpp.

◆ initMotor()

int ttl_driver::TtlInterfaceCore::initMotor ( const std::shared_ptr< common::model::AbstractMotorState > &  motor_state)

◆ initParameters()

void ttl_driver::TtlInterfaceCore::initParameters ( ros::NodeHandle &  nh)
overrideprivate

◆ isConnectionOk()

bool ttl_driver::TtlInterfaceCore::isConnectionOk ( ) const
inlineoverride

TtlInterfaceCore::isConnectionOk.

Returns

Definition at line 260 of file ttl_interface_core.hpp.

◆ launchMotorsReport()

int ttl_driver::TtlInterfaceCore::launchMotorsReport ( )
override

TtlInterfaceCore::launchMotorsReport.

Returns

Definition at line 341 of file ttl_interface_core.cpp.

◆ motorCmdReport()

int ttl_driver::TtlInterfaceCore::motorCmdReport ( const common::model::JointState &  jState,
common::model::EHardwareType  motor_type 
)
private

TtlInterfaceCore::motorCmdReport.

Parameters
jState
motor_type
Returns

Definition at line 266 of file ttl_interface_core.cpp.

◆ motorScanReport()

int ttl_driver::TtlInterfaceCore::motorScanReport ( uint8_t  motor_id)
private

TtlInterfaceCore::motorScanReport.

Parameters
motor_id
Returns

Definition at line 240 of file ttl_interface_core.cpp.

◆ operator=() [1/2]

TtlInterfaceCore& ttl_driver::TtlInterfaceCore::operator= ( const TtlInterfaceCore )
delete

◆ operator=() [2/2]

TtlInterfaceCore& ttl_driver::TtlInterfaceCore::operator= ( TtlInterfaceCore &&  )
delete

◆ readHomingAbsPosition()

bool ttl_driver::TtlInterfaceCore::readHomingAbsPosition ( )

◆ readMoving()

int ttl_driver::TtlInterfaceCore::readMoving ( uint8_t  id,
uint8_t &  status 
)

◆ rebootHardware()

bool ttl_driver::TtlInterfaceCore::rebootHardware ( const std::shared_ptr< common::model::AbstractHardwareState > &  hw_state)
override

TtlInterfaceCore::rebootMotor.

Returns

Definition at line 189 of file ttl_interface_core.cpp.

◆ resetCalibration()

void ttl_driver::TtlInterfaceCore::resetCalibration ( )
override

◆ resetHardwareControlLoopRates()

void ttl_driver::TtlInterfaceCore::resetHardwareControlLoopRates ( )
overrideprivate

◆ scanMotorId()

bool ttl_driver::TtlInterfaceCore::scanMotorId ( uint8_t  motor_to_find)
override

◆ scanTools()

vector< uint8_t > ttl_driver::TtlInterfaceCore::scanTools ( )

TtlInterfaceCore::scanTools.

Returns

Definition at line 209 of file ttl_interface_core.cpp.

◆ setCalibrationStatus()

void ttl_driver::TtlInterfaceCore::setCalibrationStatus ( const common::model::EStepperCalibrationStatus  status)
inlineoverride

◆ setConveyor()

int ttl_driver::TtlInterfaceCore::setConveyor ( const std::shared_ptr< common::model::ConveyorState > &  state)
override

TtlInterfaceCore::setConveyor.

Parameters
state
Returns

Definition at line 746 of file ttl_interface_core.cpp.

◆ setEndEffector()

int ttl_driver::TtlInterfaceCore::setEndEffector ( const std::shared_ptr< common::model::EndEffectorState > &  end_effector_state)

TtlInterfaceCore::setEndEffector.

Parameters
end_effector_state
Returns

Definition at line 722 of file ttl_interface_core.cpp.

◆ setEstopFlag()

void ttl_driver::TtlInterfaceCore::setEstopFlag ( bool  value)
inline

Definition at line 251 of file ttl_interface_core.hpp.

◆ setTool()

int ttl_driver::TtlInterfaceCore::setTool ( const std::shared_ptr< common::model::ToolState > &  toolState)

TtlInterfaceCore::setTool.

Parameters
toolState
Returns

Definition at line 687 of file ttl_interface_core.cpp.

◆ setTrajectoryControllerCommands()

void ttl_driver::TtlInterfaceCore::setTrajectoryControllerCommands ( std::vector< std::pair< uint8_t, uint32_t >> &&  cmd)

◆ startCalibration()

void ttl_driver::TtlInterfaceCore::startCalibration ( )
override

◆ startControlLoop()

void ttl_driver::TtlInterfaceCore::startControlLoop ( )
override

◆ startPublishers()

void ttl_driver::TtlInterfaceCore::startPublishers ( ros::NodeHandle &  nh)
overrideprivate

TtlInterfaceCore::startPublishers.

Parameters
nh

Definition at line 169 of file ttl_interface_core.cpp.

◆ startServices()

void ttl_driver::TtlInterfaceCore::startServices ( ros::NodeHandle &  nh)
overrideprivate

TtlInterfaceCore::startServices.

Parameters
nh

Definition at line 147 of file ttl_interface_core.cpp.

◆ startSubscribers()

void ttl_driver::TtlInterfaceCore::startSubscribers ( ros::NodeHandle &  nh)
overrideprivate

TtlInterfaceCore::startSubscribers.

Parameters
nh

Definition at line 179 of file ttl_interface_core.cpp.

◆ unsetConveyor()

void ttl_driver::TtlInterfaceCore::unsetConveyor ( uint8_t  motor_id,
uint8_t  default_conveyor_id 
)
override

TtlInterfaceCore::unsetConveyor.

Parameters
motor_id
default_conveyor_id

Definition at line 769 of file ttl_interface_core.cpp.

◆ unsetTool()

void ttl_driver::TtlInterfaceCore::unsetTool ( uint8_t  motor_id)

TtlInterfaceCore::unsetTool.

Parameters
motor_id

Definition at line 711 of file ttl_interface_core.cpp.

◆ waitSingleQueueFree()

void ttl_driver::TtlInterfaceCore::waitSingleQueueFree ( )

◆ waitSyncQueueFree()

void ttl_driver::TtlInterfaceCore::waitSyncQueueFree ( )

Member Data Documentation

◆ _activate_leds_server

ros::ServiceServer ttl_driver::TtlInterfaceCore::_activate_leds_server
private

Definition at line 234 of file ttl_interface_core.hpp.

◆ _collision_detected

bool ttl_driver::TtlInterfaceCore::_collision_detected {false}
private

Definition at line 193 of file ttl_interface_core.hpp.

◆ _collision_status_publisher

ros::Publisher ttl_driver::TtlInterfaceCore::_collision_status_publisher
private

Definition at line 184 of file ttl_interface_core.hpp.

◆ _collision_status_publisher_duration

ros::Duration ttl_driver::TtlInterfaceCore::_collision_status_publisher_duration {0.01}
private

Definition at line 186 of file ttl_interface_core.hpp.

◆ _collision_status_publisher_timer

ros::Timer ttl_driver::TtlInterfaceCore::_collision_status_publisher_timer
private

Definition at line 185 of file ttl_interface_core.hpp.

◆ _control_loop_flag

bool ttl_driver::TtlInterfaceCore::_control_loop_flag {false}
private

Definition at line 190 of file ttl_interface_core.hpp.

◆ _control_loop_frequency

double ttl_driver::TtlInterfaceCore::_control_loop_frequency {0.0}
private

Definition at line 203 of file ttl_interface_core.hpp.

◆ _control_loop_mutex

std::mutex ttl_driver::TtlInterfaceCore::_control_loop_mutex
mutableprivate

Definition at line 195 of file ttl_interface_core.hpp.

◆ _control_loop_thread

std::thread ttl_driver::TtlInterfaceCore::_control_loop_thread
private

Definition at line 201 of file ttl_interface_core.hpp.

◆ _conveyor_cmd_queue_mutex

std::mutex ttl_driver::TtlInterfaceCore::_conveyor_cmd_queue_mutex
mutableprivate

Definition at line 197 of file ttl_interface_core.hpp.

◆ _conveyor_cmds_queue

std::queue<std::unique_ptr<common::model::AbstractTtlSingleMotorCmd> > ttl_driver::TtlInterfaceCore::_conveyor_cmds_queue
private

Definition at line 232 of file ttl_interface_core.hpp.

◆ _custom_cmd_getter

ros::ServiceServer ttl_driver::TtlInterfaceCore::_custom_cmd_getter
private

Definition at line 237 of file ttl_interface_core.hpp.

◆ _custom_cmd_server

ros::ServiceServer ttl_driver::TtlInterfaceCore::_custom_cmd_server
private

Definition at line 236 of file ttl_interface_core.hpp.

◆ _debug_flag

bool ttl_driver::TtlInterfaceCore::_debug_flag {false}
private

Definition at line 191 of file ttl_interface_core.hpp.

◆ _delta_time_data_read

double ttl_driver::TtlInterfaceCore::_delta_time_data_read {0.0}
private

Definition at line 205 of file ttl_interface_core.hpp.

◆ _delta_time_end_effector_read

double ttl_driver::TtlInterfaceCore::_delta_time_end_effector_read {0.0}
private

Definition at line 206 of file ttl_interface_core.hpp.

◆ _delta_time_status_read

double ttl_driver::TtlInterfaceCore::_delta_time_status_read {0.0}
private

Definition at line 216 of file ttl_interface_core.hpp.

◆ _delta_time_write

double ttl_driver::TtlInterfaceCore::_delta_time_write {0.0}
private

Definition at line 207 of file ttl_interface_core.hpp.

◆ _estop_flag

bool ttl_driver::TtlInterfaceCore::_estop_flag {false}
private

Definition at line 225 of file ttl_interface_core.hpp.

◆ _frequencies_getter

ros::ServiceServer ttl_driver::TtlInterfaceCore::_frequencies_getter
private

Definition at line 246 of file ttl_interface_core.hpp.

◆ _frequencies_setter

ros::ServiceServer ttl_driver::TtlInterfaceCore::_frequencies_setter
private

Definition at line 245 of file ttl_interface_core.hpp.

◆ _hardware_version

std::string ttl_driver::TtlInterfaceCore::_hardware_version
private

Definition at line 188 of file ttl_interface_core.hpp.

◆ _joint_trajectory_cmd

std::vector<std::pair<uint8_t, uint32_t> > ttl_driver::TtlInterfaceCore::_joint_trajectory_cmd
private

Definition at line 223 of file ttl_interface_core.hpp.

◆ _pid_getter

ros::ServiceServer ttl_driver::TtlInterfaceCore::_pid_getter
private

Definition at line 240 of file ttl_interface_core.hpp.

◆ _pid_server

ros::ServiceServer ttl_driver::TtlInterfaceCore::_pid_server
private

Definition at line 239 of file ttl_interface_core.hpp.

◆ _single_cmd_queue_mutex

std::mutex ttl_driver::TtlInterfaceCore::_single_cmd_queue_mutex
mutableprivate

Definition at line 196 of file ttl_interface_core.hpp.

◆ _single_cmds_queue

std::queue<std::unique_ptr<common::model::AbstractTtlSingleMotorCmd> > ttl_driver::TtlInterfaceCore::_single_cmds_queue
private

Definition at line 231 of file ttl_interface_core.hpp.

◆ _sync_cmd_queue_mutex

std::mutex ttl_driver::TtlInterfaceCore::_sync_cmd_queue_mutex
mutableprivate

Definition at line 198 of file ttl_interface_core.hpp.

◆ _sync_cmds_queue

std::queue<std::unique_ptr<common::model::AbstractTtlSynchronizeMotorCmd> > ttl_driver::TtlInterfaceCore::_sync_cmds_queue
private

Definition at line 230 of file ttl_interface_core.hpp.

◆ _time_check_connection_last_read

double ttl_driver::TtlInterfaceCore::_time_check_connection_last_read {0.0}
private

Definition at line 213 of file ttl_interface_core.hpp.

◆ _time_check_end_effector_last_read

double ttl_driver::TtlInterfaceCore::_time_check_end_effector_last_read {0.0}
private

Definition at line 219 of file ttl_interface_core.hpp.

◆ _time_hw_data_last_read

double ttl_driver::TtlInterfaceCore::_time_hw_data_last_read {0.0}
private

Definition at line 209 of file ttl_interface_core.hpp.

◆ _time_hw_data_last_write

double ttl_driver::TtlInterfaceCore::_time_hw_data_last_write {0.0}
private

Definition at line 211 of file ttl_interface_core.hpp.

◆ _time_hw_end_effector_last_read

double ttl_driver::TtlInterfaceCore::_time_hw_end_effector_last_read {0.0}
private

Definition at line 210 of file ttl_interface_core.hpp.

◆ _time_hw_status_last_read

double ttl_driver::TtlInterfaceCore::_time_hw_status_last_read {0.0}
private

Definition at line 217 of file ttl_interface_core.hpp.

◆ _traj_cmd_mutex

std::mutex ttl_driver::TtlInterfaceCore::_traj_cmd_mutex
mutableprivate

Definition at line 199 of file ttl_interface_core.hpp.

◆ _ttl_manager

std::unique_ptr<TtlManager> ttl_driver::TtlInterfaceCore::_ttl_manager
private

Definition at line 221 of file ttl_interface_core.hpp.

◆ _velocity_profile_getter

ros::ServiceServer ttl_driver::TtlInterfaceCore::_velocity_profile_getter
private

Definition at line 243 of file ttl_interface_core.hpp.

◆ _velocity_profile_server

ros::ServiceServer ttl_driver::TtlInterfaceCore::_velocity_profile_server
private

Definition at line 242 of file ttl_interface_core.hpp.

◆ QUEUE_OVERFLOW

constexpr int ttl_driver::TtlInterfaceCore::QUEUE_OVERFLOW = 20
staticconstexprprivate

Definition at line 248 of file ttl_interface_core.hpp.


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


ttl_driver
Author(s): Clement Cocquempot
autogenerated on Wed May 21 2025 08:30:15