Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
7b13d81b
Commit
7b13d81b
authored
6 years ago
by
Nicolas Mansard
Committed by
Nicolas Mansard
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[parser] Adding doc in the 2 new models, and shortcuts from Eigen fox X and Y unit vectors.
parent
09ab117c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/parsers/sample-models.cpp
+6
-10
6 additions, 10 deletions
src/parsers/sample-models.cpp
src/parsers/sample-models.hpp
+27
-0
27 additions, 0 deletions
src/parsers/sample-models.hpp
with
33 additions
and
10 deletions
src/parsers/sample-models.cpp
+
6
−
10
View file @
7b13d81b
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
src/parsers/sample-models.hpp
+
27
−
0
View file @
7b13d81b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment