Skip to content

Commit acd39ce

Browse files
author
earlaud
committed
Add minor comments in KinoID
1 parent 9f01f91 commit acd39ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/inverse-dynamics/kinodynamics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ void KinodynamicsID::setTarget(
144144
const std::string & name{model_handler_.getFootFrameName(foot_nb)};
145145
if (contact_state_target[foot_nb])
146146
{
147+
// Add contact to tsid if necessary
147148
if (!active_tsid_contacts_[foot_nb])
148149
{
149150
formulation_.addRigidContact(
150151
*tsid_contacts[foot_nb], settings_.w_contact_force, settings_.w_contact_motion,
151152
settings_.contact_motion_equality ? 0 : 1);
152153
}
154+
// Set contact target force
153155
switch (model_handler_.getFootType(foot_nb))
154156
{
155157
case RobotModelHandler::FootType::POINT: {
@@ -166,11 +168,11 @@ void KinodynamicsID::setTarget(
166168
assert(false);
167169
}
168170
}
169-
tsid_contacts[foot_nb];
170171
active_tsid_contacts_[foot_nb] = true;
171172
}
172173
else
173174
{
175+
// Remove contact from tsid if necessary
174176
if (active_tsid_contacts_[foot_nb])
175177
{
176178
formulation_.removeRigidContact(name, 0);

0 commit comments

Comments
 (0)