#include <sot/torque_control/control-manager.hh>
Public Member Functions | |
ControlManager (const std::string &name) | |
void | addCtrlMode (const std::string &name) |
same as u when everything is fine, 0 otherwise More... | |
void | addEmergencyStopSIN (const std::string &name) |
void | ctrlModes () |
DECLARE_SIGNAL_IN (i_max, dynamicgraph::Vector) | |
predicted joint torques (using motor model) More... | |
DECLARE_SIGNAL_IN (i_measured, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (tau, dynamicgraph::Vector) | |
motor currents More... | |
DECLARE_SIGNAL_IN (tau_max, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (tau_predicted, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (u_max, dynamicgraph::Vector) | |
DECLARE_SIGNAL_OUT (u, dynamicgraph::Vector) | |
DECLARE_SIGNAL_OUT (u_safe, dynamicgraph::Vector) | |
virtual void | display (std::ostream &os) const |
void | displayRobotUtil () |
void | getCtrlMode (const std::string &jointName) |
void | init (const double &dt, const std::string &urdfFile, const std::string &robotRef) |
void | resetProfiler () |
void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0) |
void | setCtrlMode (const int jid, const CtrlMode &cm) |
void | setCtrlMode (const std::string &jointName, const std::string &ctrlMode) |
void | setFootFrameName (const std::string &, const std::string &) |
void | setForceLimitsFromId (const double &jointId, const dynamicgraph::Vector &lq, const dynamicgraph::Vector &uq) |
Command related to ForceUtil. More... | |
void | setForceNameToForceId (const std::string &forceName, const double &forceId) |
void | setHandFrameName (const std::string &, const std::string &) |
Commands related to HandUtil. More... | |
void | setImuJointName (const std::string &) |
void | setJointLimitsFromId (const double &jointId, const double &lq, const double &uq) |
void | setJoints (const dynamicgraph::Vector &) |
Set the mapping between urdf and sot. More... | |
void | setNameToId (const std::string &jointName, const double &jointId) |
Commands related to joint name and joint id. More... | |
void | setRightFootForceSensorXYZ (const dynamicgraph::Vector &) |
void | setRightFootSoleXYZ (const dynamicgraph::Vector &) |
Commands related to FootUtil. More... | |
void | setSleepTime (const double &seconds) |
void | setStreamPrintPeriod (const double &s) |
Public Attributes | |
std::vector< dynamicgraph::SignalPtr< dynamicgraph::Vector, int > * > | m_ctrlInputsSIN |
std::vector< dynamicgraph::SignalPtr< bool, int > * > | m_emergencyStopSIN |
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) |
bool | isJointInRange (unsigned int id, double q) |
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< CtrlMode > | m_jointCtrlModes_current |
existing control modes More... | |
std::vector< CtrlMode > | m_jointCtrlModes_previous |
control mode of the joints More... | |
std::vector< int > | m_jointCtrlModesCountDown |
previous control mode of the joints More... | |
tsid::robots::RobotWrapper * | m_robot |
RobotUtilShrPtr | m_robot_util |
double | m_sleep_time |
Definition at line 68 of file control-manager.hh.
ControlManager | ( | const std::string & | name | ) |
Definition at line 47 of file control-manager.cpp.
void addCtrlMode | ( | const std::string & | name | ) |
same as u when everything is fine, 0 otherwise
Commands related to the control mode.
Definition at line 376 of file control-manager.cpp.
void addEmergencyStopSIN | ( | const std::string & | name | ) |
Definition at line 492 of file control-manager.cpp.
|
protected |
Definition at line 659 of file control-manager.cpp.
|
protected |
counters used for the transition between two ctrl modes
Definition at line 645 of file control-manager.cpp.
void ctrlModes | ( | ) |
Definition at line 405 of file control-manager.cpp.
DECLARE_SIGNAL_IN | ( | i_max | , |
dynamicgraph::Vector | |||
) |
predicted joint torques (using motor model)
DECLARE_SIGNAL_IN | ( | i_measured | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | tau | , |
dynamicgraph::Vector | |||
) |
motor currents
DECLARE_SIGNAL_IN | ( | tau_max | , |
dynamicgraph::Vector | |||
) |
max desired current allowed before stopping the controller (in Ampers)
DECLARE_SIGNAL_IN | ( | tau_predicted | , |
dynamicgraph::Vector | |||
) |
estimated joint torques (using dynamic robot model + F/T sensors)
DECLARE_SIGNAL_IN | ( | u_max | , |
dynamicgraph::Vector | |||
) |
max current allowed before stopping the controller (in Ampers)
DECLARE_SIGNAL_OUT | ( | u | , |
dynamicgraph::Vector | |||
) |
max torque allowed before stopping the controller
DECLARE_SIGNAL_OUT | ( | u_safe | , |
dynamicgraph::Vector | |||
) |
|
virtual |
Definition at line 701 of file control-manager.cpp.
void displayRobotUtil | ( | ) |
Definition at line 618 of file control-manager.cpp.
void getCtrlMode | ( | const std::string & | jointName | ) |
Definition at line 460 of file control-manager.cpp.
void init | ( | const double & | dt, |
const std::string & | urdfFile, | ||
const std::string & | robotRef | ||
) |
Initialize
dt | control interval |
urdfFile | path to the URDF model of the robot |
Definition at line 194 of file control-manager.cpp.
|
protected |
Definition at line 677 of file control-manager.cpp.
void resetProfiler | ( | ) |
Definition at line 477 of file control-manager.cpp.
|
inline |
Definition at line 157 of file control-manager.hh.
void setCtrlMode | ( | const int | jid, |
const CtrlMode & | cm | ||
) |
Definition at line 434 of file control-manager.cpp.
void setCtrlMode | ( | const std::string & | jointName, |
const std::string & | ctrlMode | ||
) |
void setFootFrameName | ( | const std::string & | FootName, |
const std::string & | FrameName | ||
) |
Definition at line 582 of file control-manager.cpp.
void setForceLimitsFromId | ( | const double & | jointId, |
const dynamicgraph::Vector & | lq, | ||
const dynamicgraph::Vector & | uq | ||
) |
Command related to ForceUtil.
Definition at line 528 of file control-manager.cpp.
void setForceNameToForceId | ( | const std::string & | forceName, |
const double & | forceId | ||
) |
Definition at line 540 of file control-manager.cpp.
void setHandFrameName | ( | const std::string & | HandName, |
const std::string & | FrameName | ||
) |
Commands related to HandUtil.
Definition at line 596 of file control-manager.cpp.
void setImuJointName | ( | const std::string & | JointName | ) |
Definition at line 610 of file control-manager.cpp.
void setJointLimitsFromId | ( | const double & | jointId, |
const double & | lq, | ||
const double & | uq | ||
) |
Definition at line 517 of file control-manager.cpp.
void setJoints | ( | const dynamicgraph::Vector & | ) |
Set the mapping between urdf and sot.
Definition at line 553 of file control-manager.cpp.
void setNameToId | ( | const std::string & | jointName, |
const double & | jointId | ||
) |
Commands related to joint name and joint id.
Definition at line 506 of file control-manager.cpp.
void setRightFootForceSensorXYZ | ( | const dynamicgraph::Vector & | xyz | ) |
Definition at line 571 of file control-manager.cpp.
void setRightFootSoleXYZ | ( | const dynamicgraph::Vector & | xyz | ) |
Commands related to FootUtil.
Definition at line 561 of file control-manager.cpp.
void setSleepTime | ( | const double & | seconds | ) |
Definition at line 486 of file control-manager.cpp.
void setStreamPrintPeriod | ( | const double & | s | ) |
Definition at line 482 of file control-manager.cpp.
|
protected |
Definition at line 623 of file control-manager.cpp.
std::vector<dynamicgraph::SignalPtr<dynamicgraph::Vector, int>*> m_ctrlInputsSIN |
Definition at line 84 of file control-manager.hh.
|
protected |
time to sleep at every iteration (to slow down simulation)
Definition at line 176 of file control-manager.hh.
|
protected |
true if the entity has been successfully initialized
Definition at line 167 of file control-manager.hh.
|
protected |
control loop time period
Definition at line 168 of file control-manager.hh.
std::vector<dynamicgraph::SignalPtr<bool, int>*> m_emergencyStopSIN |
Definition at line 86 of file control-manager.hh.
|
protected |
Definition at line 166 of file control-manager.hh.
|
protected |
true if an emergency condition as been triggered either by an other entity, or by control limit violation
Definition at line 171 of file control-manager.hh.
|
protected |
true at the first iteration, false otherwise
Definition at line 172 of file control-manager.hh.
|
protected |
existing control modes
Definition at line 178 of file control-manager.hh.
|
protected |
control mode of the joints
Definition at line 180 of file control-manager.hh.
|
protected |
previous control mode of the joints
Definition at line 182 of file control-manager.hh.
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 89 of file control-manager.hh.
|
protected |
Definition at line 164 of file control-manager.hh.
|
protected |
Definition at line 163 of file control-manager.hh.
|
protected |
Definition at line 173 of file control-manager.hh.