17 #ifndef __sot_torque_control_parameter_server_H__ 18 #define __sot_torque_control_parameter_server_H__ 25 #if defined(__sot_torque_parameter_server_H__) 26 #define SOTParameterServer_EXPORT __declspec(dllexport) 28 #define SOTParameterServer_EXPORT __declspec(dllimport) 31 #define SOTParameterServer_EXPORT 44 #include "boost/assign.hpp" 54 #define CTRL_MODE_TRANSITION_TIME_STEP 1000.0 70 void init(
const double &
dt,
const std::string &urdfFile,
71 const std::string &robotRef);
77 void init_simple(
const double &dt);
83 void setNameToId(
const std::string &jointName,
const double &jointId);
84 void setJointLimitsFromId(
const double &jointId,
const double &lq,
88 void setForceLimitsFromId(
const double &jointId,
91 void setForceNameToForceId(
const std::string &forceName,
92 const double &forceId);
98 void setFootFrameName(
const std::string &,
const std::string &);
99 void setHandFrameName(
const std::string &,
const std::string &);
100 void setImuJointName(
const std::string &);
101 void displayRobotUtil();
105 template <
typename Type>
107 const Type &ParameterValue) {
108 if (!m_initSucceeded) {
110 <<
"Cannot set parameter " << ParameterName <<
" to " 111 << ParameterValue <<
" before initialization!\n";
115 m_robot_util->set_parameter<
Type>(ParameterName, ParameterValue);
118 template <
typename Type>
120 if (!m_initSucceeded) {
122 <<
"Cannot get parameter " << ParameterName
123 <<
" before initialization!\n";
124 throw std::runtime_error(
"Cannot get parameter before initialization");
126 return m_robot_util->get_parameter<
Type>(ParameterName);
134 virtual void display(std::ostream &os)
const;
142 bool m_is_first_iter;
149 bool convertJointNameToJointId(
const std::string &
name,
unsigned int &
id);
150 bool isJointInRange(
unsigned int id,
double q);
151 void updateJointCtrlModesOutputSignal();
158 #endif // #ifndef __sot_torque_control_control_manager_H__
int m_iter
true at the first iteration, false otherwise
bool m_emergency_stop_triggered
control loop time period
double m_dt
true if the entity has been successfully initialized
#define DYNAMIC_GRAPH_ENTITY_WARNING(entity)
#define SOTParameterServer_EXPORT
RobotUtilShrPtr m_robot_util
std::shared_ptr< RobotUtil > RobotUtilShrPtr
Accessors - This should be changed to RobotUtilPtrShared.
#define DYNAMIC_GRAPH_ENTITY_DECL()
Type getParameter(const std::string &ParameterName)
ParameterServer EntityClassName
void init(bool compute_local_aabb=true)
void setParameter(const std::string &ParameterName, const Type &ParameterValue)