Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
35f86f22
Commit
35f86f22
authored
Oct 25, 2018
by
Gabriele Buondonno
Browse files
[sample models] Using joint composite in random humanoid
parent
4afcb422
Changes
3
Show whitespace changes
Inline
Side-by-side
src/parsers/sample-models.cpp
View file @
35f86f22
...
...
@@ -41,10 +41,10 @@ namespace se3
if
(
setRandomLimits
)
idx
=
model
.
addJoint
(
model
.
getJointId
(
parent_name
),
joint
,
placement
,
name
+
"_joint"
,
TV
::
Random
()
+
TV
::
Constant
(
1
),
// effort
TV
::
Random
()
+
TV
::
Constant
(
1
),
// vel
CV
::
Random
()
-
CV
::
Constant
(
1
),
// qmin
CV
::
Random
()
+
CV
::
Constant
(
1
)
// qmax
TV
::
Random
(
joint
.
nv
(),
1
)
+
TV
::
Constant
(
joint
.
nv
(),
1
,
1
),
// effort
TV
::
Random
(
joint
.
nv
(),
1
)
+
TV
::
Constant
(
joint
.
nv
(),
1
,
1
),
// vel
CV
::
Random
(
joint
.
nq
(),
1
)
-
CV
::
Constant
(
joint
.
nq
(),
1
,
1
),
// qmin
CV
::
Random
(
joint
.
nq
(),
1
)
+
CV
::
Constant
(
joint
.
nq
(),
1
,
1
)
// qmax
);
else
idx
=
model
.
addJoint
(
model
.
getJointId
(
parent_name
),
joint
,
...
...
@@ -89,12 +89,9 @@ namespace se3
// root
if
(
!
usingFF
)
{
addJointAndBody
(
model
,
JointModelPX
(),
"universe"
,
"ff1"
,
Id
);
addJointAndBody
(
model
,
JointModelPY
(),
"ff1_joint"
,
"ff2"
,
Id
);
addJointAndBody
(
model
,
JointModelPZ
(),
"ff2_joint"
,
"ff3"
,
Id
);
addJointAndBody
(
model
,
JointModelRZ
(),
"ff3_joint"
,
"ff4"
,
Id
);
addJointAndBody
(
model
,
JointModelRY
(),
"ff4_joint"
,
"ff5"
,
Id
);
addJointAndBody
(
model
,
JointModelRX
(),
"ff5_joint"
,
"root"
,
Id
);
JointModelComposite
jff
((
JointModelTranslation
()));
jff
.
addJoint
(
JointModelSphericalZYX
());
addJointAndBody
(
model
,
jff
,
"universe"
,
"root"
,
Id
);
}
else
addJointAndBody
(
model
,
JointModelFreeFlyer
(),
"universe"
,
"root"
,
Id
);
...
...
src/parsers/sample-models.hpp
View file @
35f86f22
...
...
@@ -68,7 +68,8 @@ namespace se3
* rather define a plain and non-random model.
* \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 3 prismatic + 3 revolute joints. This changes the size of the configuration space (33 vs 32).
* uses a composite joint translation + roll-pitch-yaw.
* This changes the size of the configuration space (33 vs 32).
*/
void
humanoidRandom
(
Model
&
model
,
bool
usingFF
=
true
);
...
...
unittest/sample-models.cpp
View file @
35f86f22
...
...
@@ -31,7 +31,7 @@
BOOST_AUTO_TEST_SUITE
(
BOOST_TEST_MODULE
)
BOOST_AUTO_TEST_CASE
(
build_model_sample_humanoid_
simple
)
BOOST_AUTO_TEST_CASE
(
build_model_sample_humanoid_
random
)
{
se3
::
Model
model
;
se3
::
buildModels
::
humanoidRandom
(
model
,
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment