33 #include <Rcs_typedef.h> 34 #include <Rcs_dynamics.h> 35 #include <Rcs_macros.h> 36 #include <Rcs_VecNd.h> 48 RcsGraph_setState(graph, NULL, NULL);
60 M = MatNd_create(graph->nJ, graph->nJ);
61 h = MatNd_create(graph->nJ, 1);
74 MatNd* q_des, MatNd* q_dot_des, MatNd* T_des,
const MatNd* action,
81 MatNd_reshape(T_des,
graph->nJ, 1);
83 MatNd_mul(T_des,
M, action);
87 MatNd_printComment(
"M",
M);
88 MatNd_printComment(
"M*q_dotdot_des", T_des);
89 MatNd_printComment(
"coriolis",
h);
90 MatNd_printComment(
"gravity compensation",
F_gravity);
93 MatNd_addSelf(T_des,
h);
96 RcsGraph_stateVectorFromIKSelf(
graph, T_des);
101 VecNd_setElementsTo(min, -std::numeric_limits<double>::infinity(),
getDim());
102 VecNd_setElementsTo(max, std::numeric_limits<double>::infinity(),
getDim());
108 MatNd_setZero(action);
virtual ~AMJointControlAcceleration()
virtual void computeCommand(MatNd *q_des, MatNd *q_dot_des, MatNd *T_des, const MatNd *action, double dt)
AMJointControlAcceleration(RcsGraph *graph)
virtual void getMinMax(double *min, double *max) const
virtual void getStableAction(MatNd *action) const
virtual unsigned int getDim() const
ActionModel * clone() const