Skip to content
GitLab
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
4ef60c28
Verified
Commit
4ef60c28
authored
Feb 19, 2019
by
Justin Carpentier
Browse files
all: suppress some warnings coming from deprecated Model::neutralConfiguration
parent
155a821e
Changes
4
Hide whitespace changes
Inline
Side-by-side
bindings/python/multibody/model.hpp
View file @
4ef60c28
...
...
@@ -83,11 +83,17 @@ namespace pinocchio
.
add_property
(
"parents"
,
&
Model
::
parents
)
.
add_property
(
"names"
,
&
Model
::
names
)
.
add_property
(
"name"
,
&
Model
::
name
)
.
add_property
(
"referenceConfigurations"
,
&
Model
::
referenceConfigurations
)
.
add_property
(
"referenceConfigurations"
,
&
Model
::
referenceConfigurations
);
/// TODO: remove this pragma when neutralConfiguration will be removed
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
cl
.
add_property
(
"neutralConfiguration"
,
make_getter
(
&
Model
::
neutralConfiguration
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
make_setter
(
&
Model
::
neutralConfiguration
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
"Joint's neutral configurations."
)
"Joint's neutral configurations."
);
#pragma GCC diagnostic pop
cl
.
add_property
(
"rotorInertia"
,
make_getter
(
&
Model
::
rotorInertia
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
make_setter
(
&
Model
::
rotorInertia
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
...
...
src/multibody/model.hpp
View file @
4ef60c28
...
...
@@ -183,7 +183,11 @@ namespace pinocchio
res
.
name
=
name
;
/// Eigen Vectors
/// TODO: remove this pragma when neutralConfiguration will be removed
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
res
.
neutralConfiguration
=
neutralConfiguration
.
template
cast
<
NewScalar
>();
#pragma GCC diagnostic pop
res
.
rotorInertia
=
rotorInertia
.
template
cast
<
NewScalar
>();
res
.
rotorGearRatio
=
rotorGearRatio
.
template
cast
<
NewScalar
>();
res
.
effortLimit
=
effortLimit
.
template
cast
<
NewScalar
>();
...
...
@@ -220,7 +224,11 @@ namespace pinocchio
res
.
frames
[
k
]
=
frames
[
k
].
template
cast
<
NewScalar
>();
}
/// TODO: remove this pragma when neutralConfiguration will be removed
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return
res
;
#pragma GCC diagnostic pop
}
///
...
...
@@ -240,10 +248,14 @@ namespace pinocchio
&&
other
.
names
==
names
&&
other
.
subtrees
==
subtrees
&&
other
.
gravity
==
gravity
&&
other
.
name
==
name
&&
other
.
neutralConfiguration
==
neutralConfiguration
&&
other
.
referenceConfigurations
==
referenceConfigurations
&&
other
.
name
==
name
;
/// TODO: remove this pragma when neutralConfiguration will be removed
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
res
&=
other
.
neutralConfiguration
==
neutralConfiguration
;
#pragma GCC diagnostic pop
res
&=
other
.
referenceConfigurations
==
referenceConfigurations
&&
other
.
rotorInertia
==
rotorInertia
&&
other
.
rotorGearRatio
==
rotorGearRatio
&&
other
.
effortLimit
==
effortLimit
...
...
src/multibody/model.hxx
View file @
4ef60c28
...
...
@@ -101,9 +101,13 @@ namespace pinocchio
upperPositionLimit
.
conservativeResize
(
nq
);
jmodel
.
jointConfigSelector
(
upperPositionLimit
)
=
max_config
;
/// TODO: remove this pragma when neutralConfiguration will be removed
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
neutralConfiguration
.
conservativeResize
(
nq
);
typedef
NeutralStep
<
LieGroupMap
,
ConfigVectorType
>
NeutralVisitor
;
NeutralStepAlgo
<
NeutralVisitor
,
JointModelDerived
>::
run
(
jmodel
,
neutralConfiguration
);
#pragma GCC diagnostic pop
rotorInertia
.
conservativeResize
(
nv
);
jmodel
.
jointVelocitySelector
(
rotorInertia
).
setZero
();
...
...
unittest/joint-configurations.cpp
View file @
4ef60c28
...
...
@@ -193,8 +193,8 @@ BOOST_AUTO_TEST_CASE ( distance_configuration_test )
{
Model
model
;
buildModel
(
model
);
Eigen
::
Vector
Xd
q0
=
neutral
(
model
);
Eigen
::
Vector
Xd
q1
(
integrate
(
model
,
q0
,
Eigen
::
Vector
Xd
::
Ones
(
model
.
nv
)));
Model
::
Config
Vector
Type
q0
=
neutral
(
model
);
Model
::
Config
Vector
Type
q1
(
integrate
(
model
,
q0
,
Model
::
Tangent
Vector
Type
::
Ones
(
model
.
nv
)));
double
dist
=
distance
(
model
,
q0
,
q1
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment