sot-talos-balance
2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
|
|
Go to the documentation of this file.
17 #ifndef __sot_torque_control_control_manager_H__
18 #define __sot_torque_control_control_manager_H__
25 #if defined(__sot_torque_control_control_manager_H__)
26 #define TALOS_CONTROL_MANAGER_EXPORT __declspec(dllexport)
28 #define TALOS_CONTROL_MANAGER_EXPORT __declspec(dllimport)
31 #define TALOS_CONTROL_MANAGER_EXPORT
38 #include <pinocchio/fwd.hpp>
42 #include <dynamic-graph/signal-helper.h>
45 #include <sot/core/matrix-geometry.hh>
46 #include <sot/core/robot-utils.hh>
48 #include "boost/assign.hpp"
53 namespace talos_balance {
60 #define CTRL_MODE_TRANSITION_TIME_STEP 1000.0
72 os << s.
id <<
"_" << s.
name;
77 :
public ::dynamicgraph::Entity {
80 DYNAMIC_GRAPH_ENTITY_DECL();
89 void init(
const double&
dt,
const std::string& robotRef);
92 std::vector<dynamicgraph::SignalPtr<dynamicgraph::Vector, int>*>
94 std::vector<dynamicgraph::SignalPtr<bool, int>*>
96 std::vector<dynamicgraph::Signal<dynamicgraph::Vector, int>*>
107 void addCtrlMode(
const std::string&
name);
109 void getCtrlMode(
const std::string& jointName);
110 void setCtrlMode(
const std::string& jointName,
const std::string& ctrlMode);
111 void setCtrlMode(
const int jid,
const CtrlMode&
cm);
113 void resetProfiler();
125 void setSleepTime(
const double& seconds);
126 void addEmergencyStopSIN(
const std::string&
name);
129 virtual void display(std::ostream& os)
const;
138 bool m_is_first_iter;
146 std::vector<CtrlMode>
148 std::vector<CtrlMode>
154 bool convertStringToCtrlMode(
const std::string&
name,
CtrlMode&
cm);
155 bool convertJointNameToJointId(
const std::string&
name,
unsigned int&
id);
157 void updateJointCtrlModesOutputSignal();
165 #endif // #ifndef __sot_torque_control_control_manager_H__
bool m_emergency_stop_triggered
control loop time period
int m_iter
true at the first iteration, false otherwise
double m_dt
true if the entity has been successfully initialized
std::vector< int > m_jointCtrlModesCountDown
previous control mode of the joints
RobotUtilShrPtr m_robot_util
std::vector< dynamicgraph::Signal< dynamicgraph::Vector, int > * > m_jointsCtrlModesSOUT
std::vector< CtrlMode > m_jointCtrlModes_current
existing control modes
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
std::vector< dynamicgraph::SignalPtr< bool, int > * > m_emergencyStopVector
std::ostream & operator<<(std::ostream &os, const CtrlMode &s)
std::vector< std::string > m_ctrlModes
CtrlMode(int id, const std::string &name)
AdmittanceControllerEndEffector EntityClassName
std::vector< dynamicgraph::SignalPtr< dynamicgraph::Vector, int > * > m_ctrlInputsSIN
#define TALOS_CONTROL_MANAGER_EXPORT
std::vector< CtrlMode > m_jointCtrlModes_previous
control mode of the joints