Skip to content
Snippets Groups Projects
Commit 7b13d81b authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

[parser] Adding doc in the 2 new models, and shortcuts from Eigen fox X and Y unit vectors.

parent 09ab117c
Branches
Tags
No related merge requests found
......@@ -238,10 +238,6 @@ namespace se3
void manipulatorGeometries(const Model& model, GeometryModel & geom)
{ addManipulatorGeometries(model,geom); }
static const Eigen::Vector3d AX_X(1,0,0);
static const Eigen::Vector3d AX_Y(0,1,0);
static const Eigen::Vector3d AX_Z(0,0,1);
static Eigen::Matrix3d rotate(const double angle, const Eigen::Vector3d & axis)
{ return Eigen::AngleAxisd(angle,axis).toRotationMatrix(); }
......@@ -275,11 +271,11 @@ namespace se3
AngleAxisd(M_PI,Vector3d(1,0,0)).toRotationMatrix();
addManipulator(model,ffidx,SE3(rotate(M_PI,AX_X),Vector3d(0,-0.2,-.1)),"rleg");
addManipulator(model,ffidx,SE3(rotate(M_PI,AX_X),Vector3d(0, 0.2,-.1)),"lleg");
addManipulator(model,ffidx,SE3(rotate(M_PI,Vector3d::UnitX()),Vector3d(0,-0.2,-.1)),"rleg");
addManipulator(model,ffidx,SE3(rotate(M_PI,Vector3d::UnitX()),Vector3d(0, 0.2,-.1)),"lleg");
model.jointPlacements[7 ].rotation() = rotate(M_PI/2,AX_Y); // rotate right foot
model.jointPlacements[13].rotation() = rotate(M_PI/2,AX_Y); // rotate left foot
model.jointPlacements[7 ].rotation() = rotate(M_PI/2,Vector3d::UnitY()); // rotate right foot
model.jointPlacements[13].rotation() = rotate(M_PI/2,Vector3d::UnitY()); // rotate left foot
/* --- Chest --- */
idx = model.addJoint(ffidx,JointModelRX(),I4 ,"chest1_joint", vmax,taumax,qmin,qmax);
......@@ -308,8 +304,8 @@ namespace se3
model.addBodyFrame("head2_body",idx);
/* --- Upper Limbs --- */
addManipulator(model,chest,SE3(rotate(M_PI,AX_X),Vector3d(0,-0.3, 1.)),"rarm");
addManipulator(model,chest,SE3(rotate(M_PI,AX_X),Vector3d(0, 0.3, 1.)),"larm");
addManipulator(model,chest,SE3(rotate(M_PI,Vector3d::UnitX()),Vector3d(0,-0.3, 1.)),"rarm");
addManipulator(model,chest,SE3(rotate(M_PI,Vector3d::UnitX()),Vector3d(0, 0.3, 1.)),"larm");
}
void humanoidGeometries(const Model& model, GeometryModel & geom)
......
......@@ -30,10 +30,37 @@ namespace se3
void humanoid2d(Model& model);
void humanoidSimple(Model& model, bool usingFF = true);
/** \brief Create a 6-DOF kinematic chain shoulder-elbow-wrist.
*
* \param model: model, typically given empty, where the kinematic chain is added.
*/
void manipulator(Model& model);
/** \brief Create the geometries on top of the kinematic model created by manipulator function.
*
* \param model, const, kinematic chain typically produced by the function manipulator(model).
* \warning this method is expecting specific namings of the kinematic chain, use it with care
* not using after manipulator(model).
*/
void manipulatorGeometries(const Model& model, GeometryModel & geom);
/** \brief Create a 28-DOF kinematic chain of a floating humanoid robot.
*
* The kinematic chain has 4 limbs shoulder-elbow-wrist, one 2-dof torso, one
* 2-dof neck. The float joint is either a free-float joint JointModelFreeFloating
* (with nq=7 and nv=6), or a composite joint with 3 prismatic and 1 roll-pitch-yaw.
* Using a free-floating or a composite joint is decided by the boolean usingFF.
*
* \param model: model, typically given empty, where the kinematic chain is added.
* \param usingFF: if True, implement the chain with a plain JointModelFreeFloating; if False,
* uses a composite joint. This changes the size of the configuration space (35 vs 34).
*/
void humanoid(Model& model,bool usingFF=true);
/** \brief Create the geometries on top of the kinematic model created by humanoid function.
*
* \param model, const, kinematic chain typically produced by the function humanoid(model).
* \warning this method is expecting specific namings of the kinematic chain, use it with care
* not using after humanoid(model).
*/
void humanoidGeometries(const Model& model, GeometryModel & geom);
} // namespace buildModels
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment