sot-talos-balance  2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
TalosControlManager Class Reference

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

Inheritance diagram for TalosControlManager:
Collaboration diagram for TalosControlManager:

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 int jid, const CtrlMode &cm)
 
void setCtrlMode (const std::string &jointName, const std::string &ctrlMode)
 
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
 

Protected Member Functions

bool convertJointNameToJointId (const std::string &name, unsigned int &id)
 
bool convertStringToCtrlMode (const std::string &name, CtrlMode &cm)
 
void updateJointCtrlModesOutputSignal ()
 

Protected Attributes

std::vector< std::string > m_ctrlModes
 
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
 
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 76 of file talos-control-manager.hh.

Constructor & Destructor Documentation

◆ TalosControlManager()

TalosControlManager ( const std::string &  name)

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

Member Function Documentation

◆ addCtrlMode()

void addCtrlMode ( const std::string &  name)

safe motor control

Commands related to the control mode.

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

◆ addEmergencyStopSIN()

void addEmergencyStopSIN ( const std::string &  name)

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

◆ convertJointNameToJointId()

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

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

◆ convertStringToCtrlMode()

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

counters used for the transition between two ctrl modes

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

◆ ctrlModes()

void ctrlModes ( )

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

◆ 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 471 of file talos-control-manager.cpp.

◆ getCtrlMode()

void getCtrlMode ( const std::string &  jointName)

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

◆ init()

void init ( const double &  dt,
const std::string &  robotRef 
)

Initialize

Parameters
dtcontrol interval
urdfFilepath to the URDF model of the robot

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

◆ resetProfiler()

void resetProfiler ( )

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

◆ setCtrlMode() [1/2]

void setCtrlMode ( const int  jid,
const CtrlMode cm 
)

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

◆ setCtrlMode() [2/2]

void setCtrlMode ( const std::string &  jointName,
const std::string &  ctrlMode 
)

◆ setSleepTime()

void setSleepTime ( const double &  seconds)

Commands related to joint name and joint id.

Set the mapping between urdf and sot.

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

◆ updateJointCtrlModesOutputSignal()

void updateJointCtrlModesOutputSignal ( )
protected

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

Member Data Documentation

◆ m_ctrlInputsSIN

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

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

◆ m_ctrlModes

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

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

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

◆ m_dt

double m_dt
protected

true if the entity has been successfully initialized

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

◆ m_emergency_stop_triggered

bool m_emergency_stop_triggered
protected

control loop time period

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

◆ m_emergencyStopVector

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

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

◆ m_initSucceeded

bool m_initSucceeded
protected

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

◆ 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 140 of file talos-control-manager.hh.

◆ m_iter

int m_iter
protected

true at the first iteration, false otherwise

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

◆ m_jointCtrlModes_current

std::vector<CtrlMode> m_jointCtrlModes_current
protected

existing control modes

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

◆ m_jointCtrlModes_previous

std::vector<CtrlMode> m_jointCtrlModes_previous
protected

control mode of the joints

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

◆ m_jointCtrlModesCountDown

std::vector<int> m_jointCtrlModesCountDown
protected

previous control mode of the joints

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

◆ 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 98 of file talos-control-manager.hh.

◆ m_numDofs

size_t m_numDofs
protected

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

◆ m_robot_util

RobotUtilShrPtr m_robot_util
protected

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

◆ m_sleep_time

double m_sleep_time
protected

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


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