sot-talos-balance  1.6.0
TalosControlManager Class Reference

#include <sot/talos_balance/talos-control-manager.hh>

Inheritance diagram for TalosControlManager:
[legend]
Collaboration diagram for TalosControlManager:
[legend]

Public Member Functions

 TalosControlManager (const std::string &name)
 
void addCtrlMode (const std::string &name)
 safe motor control More...
 
void addEmergencyStopSIN (const std::string &name)
 
void ctrlModes ()
 
 DECLARE_SIGNAL_IN (u_max, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_OUT (u, dynamicgraph::Vector)
 max motor control More...
 
 DECLARE_SIGNAL_OUT (u_safe, dynamicgraph::Vector)
 raw motor control More...
 
virtual void display (std::ostream &os) const
 
void getCtrlMode (const std::string &jointName)
 
void init (const double &dt, const std::string &robotRef)
 
void resetProfiler ()
 
void setCtrlMode (const std::string &jointName, const std::string &ctrlMode)
 
void setCtrlMode (const int jid, const CtrlMode &cm)
 
void setSleepTime (const double &seconds)
 Commands related to joint name and joint id. More...
 

Public Attributes

std::vector< dynamicgraph::SignalPtr< dynamicgraph::Vector, int > * > m_ctrlInputsSIN
 
std::vector< dynamicgraph::SignalPtr< bool, int > *> m_emergencyStopVector
 
std::vector< dynamicgraph::Signal< dynamicgraph::Vector, int > * > m_jointsCtrlModesSOUT
 emergency stop inputs. If one is true, control is set to zero forever More...
 

Protected Member Functions

bool convertJointNameToJointId (const std::string &name, unsigned int &id)
 
bool convertStringToCtrlMode (const std::string &name, CtrlMode &cm)
 counters used for the transition between two ctrl modes More...
 
void updateJointCtrlModesOutputSignal ()
 

Protected Attributes

std::vector< std::string > m_ctrlModes
 time to sleep at every iteration (to slow down simulation) More...
 
double m_dt
 true if the entity has been successfully initialized More...
 
bool m_emergency_stop_triggered
 control loop time period More...
 
bool m_initSucceeded
 
bool m_is_first_iter
 true if an emergency condition as been triggered either by an other entity, or by control limit violation More...
 
int m_iter
 true at the first iteration, false otherwise More...
 
std::vector< CtrlModem_jointCtrlModes_current
 existing control modes More...
 
std::vector< CtrlModem_jointCtrlModes_previous
 control mode of the joints More...
 
std::vector< int > m_jointCtrlModesCountDown
 previous control mode of the joints More...
 
size_t m_numDofs
 
RobotUtilShrPtr m_robot_util
 
double m_sleep_time
 

Detailed Description

Definition at line 73 of file talos-control-manager.hh.

Constructor & Destructor Documentation

◆ TalosControlManager()

Member Function Documentation

◆ addCtrlMode()

void addCtrlMode ( const std::string &  name)

◆ addEmergencyStopSIN()

void addEmergencyStopSIN ( const std::string &  name)

◆ convertJointNameToJointId()

bool convertJointNameToJointId ( const std::string &  name,
unsigned int &  id 
)
protected

◆ convertStringToCtrlMode()

bool convertStringToCtrlMode ( const std::string &  name,
CtrlMode cm 
)
protected

counters used for the transition between two ctrl modes

Definition at line 422 of file talos-control-manager.cpp.

References TalosControlManager::m_ctrlModes.

Referenced by TalosControlManager::setCtrlMode().

◆ ctrlModes()

void ctrlModes ( )

◆ DECLARE_SIGNAL_IN()

DECLARE_SIGNAL_IN ( u_max  ,
dynamicgraph::Vector   
)

◆ DECLARE_SIGNAL_OUT() [1/2]

DECLARE_SIGNAL_OUT ( ,
dynamicgraph::Vector   
)

max motor control

◆ DECLARE_SIGNAL_OUT() [2/2]

DECLARE_SIGNAL_OUT ( u_safe  ,
dynamicgraph::Vector   
)

raw motor control

◆ display()

void display ( std::ostream &  os) const
virtual

Definition at line 481 of file talos-control-manager.cpp.

◆ getCtrlMode()

◆ init()

◆ resetProfiler()

void resetProfiler ( )

◆ setCtrlMode() [1/2]

◆ setCtrlMode() [2/2]

◆ setSleepTime()

void setSleepTime ( const double &  seconds)

Commands related to joint name and joint id.

Set the mapping between urdf and sot.

Definition at line 375 of file talos-control-manager.cpp.

References TalosControlManager::m_sleep_time.

◆ updateJointCtrlModesOutputSignal()

Member Data Documentation

◆ m_ctrlInputsSIN

std::vector<dynamicgraph::SignalPtr<dynamicgraph::Vector,int>*> m_ctrlInputsSIN

◆ m_ctrlModes

std::vector<std::string> m_ctrlModes
protected

time to sleep at every iteration (to slow down simulation)

Definition at line 135 of file talos-control-manager.hh.

Referenced by TalosControlManager::addCtrlMode(), TalosControlManager::convertStringToCtrlMode(), and TalosControlManager::ctrlModes().

◆ m_dt

double m_dt
protected

true if the entity has been successfully initialized

Definition at line 129 of file talos-control-manager.hh.

Referenced by TalosControlManager::init().

◆ m_emergency_stop_triggered

bool m_emergency_stop_triggered
protected

◆ m_emergencyStopVector

std::vector< dynamicgraph::SignalPtr<bool,int>* > m_emergencyStopVector

◆ m_initSucceeded

bool m_initSucceeded
protected

◆ m_is_first_iter

bool m_is_first_iter
protected

true if an emergency condition as been triggered either by an other entity, or by control limit violation

Definition at line 131 of file talos-control-manager.hh.

Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION().

◆ m_iter

int m_iter
protected

true at the first iteration, false otherwise

Definition at line 132 of file talos-control-manager.hh.

◆ m_jointCtrlModes_current

◆ m_jointCtrlModes_previous

◆ m_jointCtrlModesCountDown

std::vector<int> m_jointCtrlModesCountDown
protected

◆ m_jointsCtrlModesSOUT

std::vector<dynamicgraph::Signal<dynamicgraph::Vector,int>*> m_jointsCtrlModesSOUT

emergency stop inputs. If one is true, control is set to zero forever

Definition at line 93 of file talos-control-manager.hh.

Referenced by TalosControlManager::addCtrlMode(), and TalosControlManager::updateJointCtrlModesOutputSignal().

◆ m_numDofs

◆ m_robot_util

RobotUtilShrPtr m_robot_util
protected

◆ m_sleep_time

double m_sleep_time
protected

Definition at line 133 of file talos-control-manager.hh.

Referenced by TalosControlManager::setSleepTime().


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