Skip to content

Commit

Permalink
Apply review - Bindings and operation order
Browse files Browse the repository at this point in the history
Remove bindings for old data and change operation order for dvel_dq
  • Loading branch information
LudovicDeMatteis committed Oct 16, 2024
1 parent 5b883ba commit f9de7b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
10 changes: 0 additions & 10 deletions bindings/python/crocoddyl/multibody/contacts/contact-6d-loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ void exposeContact6DLoop() {
bp::return_internal_reference<>()),
"Jacobian of the spatial acceleration of the first contact "
"frame wrt v")
.add_property("a1_partial_da",
bp::make_getter(&ContactData6DLoop::a1_partial_da,
bp::return_internal_reference<>()),
"Jacobian of the spatial acceleration of the first contact "
"frame wrt a")
.add_property(
"v2_partial_dq",
bp::make_getter(&ContactData6DLoop::v2_partial_dq,
Expand All @@ -154,11 +149,6 @@ void exposeContact6DLoop() {
bp::return_internal_reference<>()),
"Jacobian of the spatial acceleration of the second "
"contact frame wrt v")
.add_property("a2_partial_da",
bp::make_getter(&ContactData6DLoop::a2_partial_da,
bp::return_internal_reference<>()),
"Jacobian of the spatial acceleration of the second "
"contact frame wrt a")
.add_property("da0_dx",
bp::make_getter(&ContactData6DLoop::da0_dx,
bp::return_internal_reference<>()),
Expand Down
3 changes: 1 addition & 2 deletions include/crocoddyl/multibody/contacts/contact-6d-loop.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ void ContactModel6DLoopTpl<Scalar>::calcDiff(
d->f2_v2_partial_dq.noalias() =
joint2_placement_.toActionMatrixInverse() * d->v2_partial_dq;
d->f1_v2_partial_dq.noalias() = d->f1Xf2 * d->f2_v2_partial_dq;
d->dvel_dq.noalias() = d->f1_v1_partial_dq;
d->dvel_dq.noalias() = d->f1_v1_partial_dq - d->f1_v2_partial_dq;
d->dvel_dq.noalias() -= d->f1vf2.toActionMatrix() * d->Jc;
d->dvel_dq.noalias() -= d->f1_v2_partial_dq;
d->da0_dx.leftCols(nv).noalias() += gains_[1] * d->dvel_dq;
d->da0_dx.rightCols(nv).noalias() += gains_[1] * d->Jc;
}
Expand Down

0 comments on commit f9de7b3

Please sign in to comment.