Skip to content

Commit 758c3b5

Browse files
author
earlaud
committed
Add assert on contact forces size
1 parent acd39ce commit 758c3b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/inverse-dynamics/kinodynamics.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,13 @@ void KinodynamicsID::setTarget(
155155
switch (model_handler_.getFootType(foot_nb))
156156
{
157157
case RobotModelHandler::FootType::POINT: {
158+
assert(f_target.at(foot_nb).size() == 3);
158159
std::static_pointer_cast<tsid::contacts::ContactPoint>(tsid_contacts[foot_nb])
159160
->setForceReference(f_target.at(foot_nb));
160161
break;
161162
}
162163
case RobotModelHandler::FootType::QUAD: {
164+
assert(f_target.at(foot_nb).size() == 6);
163165
std::static_pointer_cast<tsid::contacts::Contact6d>(tsid_contacts[foot_nb])
164166
->setForceReference(f_target.at(foot_nb));
165167
break;

0 commit comments

Comments
 (0)