diff --git a/src/user/user_objects.h b/src/user/user_objects.h index 66a6b7e9..1088f5b5 100644 --- a/src/user/user_objects.h +++ b/src/user/user_objects.h @@ -385,6 +385,12 @@ class mjCJoint_ : public mjCBase { protected: mjCBody* body; // joint's body + // variable used for temporarily storing the state of the joint + int qposadr_; // address of dof in data->qpos + int dofadr_; // address of dof in data->qvel + mjtNum qpos[7]; // qpos at the previous step + mjtNum qvel[6]; // qvel at the previous step + // variable-size data std::vector userdata_; std::vector spec_userdata_; @@ -420,11 +426,6 @@ class mjCJoint : public mjCJoint_, private mjsJoint { private: int Compile(void); // compiler; return dofnum void PointToLocal(void); - - int qposadr_; // address of dof in data->qpos - int dofadr_; // address of dof in data->qvel - mjtNum qpos[7]; // qpos at the previous step - mjtNum qvel[6]; // qvel at the previous step }; @@ -1362,6 +1363,11 @@ class mjCActuator_ : public mjCBase { protected: int trnid[2]; // id of transmission target + // variable used for temporarily storing the state of the actuator + int actadr_; // address of dof in data->act + int actnum_; // number of dofs in data->act + std::vector act; // act at the previous step + // variable-size data std::string plugin_name; std::string plugin_instance_name; @@ -1407,10 +1413,6 @@ class mjCActuator : public mjCActuator_, private mjsActuator { void NameSpace(const mjCModel* m); mjCBase* ptarget; // transmission target - - int actadr_; // address of dof in data->act - int actnum_; // number of dofs in data->act - std::vector act; // act at the previous step };