Verified Commit 4ef60c28 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

all: suppress some warnings coming from deprecated Model::neutralConfiguration

parent 155a821e
......@@ -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>()),
......
......@@ -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
......
......@@ -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();
......
......@@ -193,8 +193,8 @@ BOOST_AUTO_TEST_CASE ( distance_configuration_test )
{
Model model; buildModel(model);
Eigen::VectorXd q0 = neutral(model);
Eigen::VectorXd q1(integrate (model, q0, Eigen::VectorXd::Ones(model.nv)));
Model::ConfigVectorType q0 = neutral(model);
Model::ConfigVectorType q1(integrate (model, q0, Model::TangentVectorType::Ones(model.nv)));
double dist = distance(model,q0,q1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment