Skip to content

Commit 0982a50

Browse files
committed
Compatility with pinocchio 3
1 parent 05d0689 commit 0982a50

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/inverse-dynamics/kinodynamics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ KinodynamicsID::KinodynamicsID(const RobotModelHandler & model_handler, double c
7777
boundsTask_->setPositionBounds(
7878
model_handler_.getModel().lowerPositionLimit.tail(nq_actuated),
7979
model_handler_.getModel().upperPositionLimit.tail(nq_actuated));
80-
boundsTask_->setVelocityBounds(model_handler_.getModel().upperVelocityLimit.tail(nu));
80+
boundsTask_->setVelocityBounds(model_handler_.getModel().velocityLimit.tail(nu));
8181
boundsTask_->setImposeBounds(
8282
true, true, true, false); // For now do not impose acceleration bound as it is not provided in URDF
8383
formulation_.addMotionTask(*boundsTask_, 1.0, 0); // No weight needed as it is set as constraint
8484

8585
// Add actuation limit task
8686
actuationTask_ = std::make_shared<tsid::tasks::TaskActuationBounds>("actuation-limits", robot_);
8787
actuationTask_->setBounds(
88-
model_handler_.getModel().lowerEffortLimit.tail(nu), model_handler_.getModel().upperEffortLimit.tail(nu));
88+
-model_handler_.getModel().effortLimit.tail(nu), model_handler_.getModel().effortLimit.tail(nu));
8989
formulation_.addActuationTask(*actuationTask_, 1.0, 0); // No weight needed as it is set as constraint
9090

9191
// Create an HQP solver

tests/inverse-dynamics/centroidal.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class TestCentroidalID
8282
{
8383
BOOST_CHECK_LE(q[7 + i], model.upperPositionLimit[7 + i]);
8484
BOOST_CHECK_GE(q[7 + i], model.lowerPositionLimit[7 + i]);
85-
BOOST_CHECK_LE(dq[6 + i], model.upperVelocityLimit[6 + i]);
85+
BOOST_CHECK_LE(dq[6 + i], model.velocityLimit[6 + i]);
8686
// Do not use lower velocity bound as TSID cannot handle it
87-
BOOST_CHECK_GE(dq[6 + i], -model.upperVelocityLimit[6 + i]);
88-
BOOST_CHECK_LE(tau[i], model.upperEffortLimit[6 + i]);
89-
BOOST_CHECK_GE(tau[i], model.lowerEffortLimit[6 + i]);
87+
BOOST_CHECK_GE(dq[6 + i], -model.velocityLimit[6 + i]);
88+
BOOST_CHECK_LE(tau[i], model.effortLimit[6 + i]);
89+
BOOST_CHECK_GE(tau[i], -model.effortLimit[6 + i]);
9090
}
9191
}
9292

tests/inverse-dynamics/kinodynamics.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class TestKinoID
8282
{
8383
BOOST_CHECK_LE(q[7 + i], model.upperPositionLimit[7 + i]);
8484
BOOST_CHECK_GE(q[7 + i], model.lowerPositionLimit[7 + i]);
85-
BOOST_CHECK_LE(dq[6 + i], model.upperVelocityLimit[6 + i]);
85+
BOOST_CHECK_LE(dq[6 + i], model.velocityLimit[6 + i]);
8686
// Do not use lower velocity bound as TSID cannot handle it
87-
BOOST_CHECK_GE(dq[6 + i], -model.upperVelocityLimit[6 + i]);
88-
BOOST_CHECK_LE(tau[i], model.upperEffortLimit[6 + i]);
89-
BOOST_CHECK_GE(tau[i], model.lowerEffortLimit[6 + i]);
87+
BOOST_CHECK_GE(dq[6 + i], -model.velocityLimit[6 + i]);
88+
BOOST_CHECK_LE(tau[i], model.effortLimit[6 + i]);
89+
BOOST_CHECK_GE(tau[i], -model.effortLimit[6 + i]);
9090
}
9191
}
9292

0 commit comments

Comments
 (0)