Skip to content

Commit

Permalink
Add dummy variables to store unused data from pinocchio functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LudovicDeMatteis committed Oct 14, 2024
1 parent 5012fe0 commit 5b883ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions include/crocoddyl/multibody/contacts/contact-6d-loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,14 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
f1_v1_partial_dq(6, model->get_state()->get_nv()),
a1_partial_dq(6, model->get_state()->get_nv()),
a1_partial_dv(6, model->get_state()->get_nv()),
a1_partial_da(6, model->get_state()->get_nv()),
v2_partial_dq(6, model->get_state()->get_nv()),
f2_v2_partial_dq(6, model->get_state()->get_nv()),
f1_v2_partial_dq(6, model->get_state()->get_nv()),
a2_partial_dq(6, model->get_state()->get_nv()),
f2_a2_partial_dq(6, model->get_state()->get_nv()),
f2_a2_partial_dv(6, model->get_state()->get_nv()),
a2_partial_dv(6, model->get_state()->get_nv()),
a2_partial_da(6, model->get_state()->get_nv()),
__partial_da(6, model->get_state()->get_nv()),
da0_dq_t1(6, model->get_state()->get_nv()),
da0_dq_t2(6, model->get_state()->get_nv()),
da0_dq_t2_tmp(6, model->get_state()->get_nv()),
Expand Down Expand Up @@ -274,15 +273,14 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
f1_v1_partial_dq.setZero();
a1_partial_dq.setZero();
a1_partial_dv.setZero();
a1_partial_da.setZero();
v2_partial_dq.setZero();
f2_v2_partial_dq.setZero();
f1_v2_partial_dq.setZero();
a2_partial_dq.setZero();
f2_a2_partial_dq.setZero();
f2_a2_partial_dv.setZero();
a2_partial_dv.setZero();
a2_partial_da.setZero();
__partial_da.setZero();
da0_dq_t1.setZero();
da0_dq_t2.setZero();
da0_dq_t2_tmp.setZero();
Expand Down Expand Up @@ -312,15 +310,14 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
Matrix6xs f1_v1_partial_dq;
Matrix6xs a1_partial_dq;
Matrix6xs a1_partial_dv;
Matrix6xs a1_partial_da;
Matrix6xs v2_partial_dq;
Matrix6xs f2_v2_partial_dq;
Matrix6xs f1_v2_partial_dq;
Matrix6xs a2_partial_dq;
Matrix6xs f2_a2_partial_dq;
Matrix6xs f2_a2_partial_dv;
Matrix6xs a2_partial_dv;
Matrix6xs a2_partial_da;
Matrix6xs __partial_da;

Matrix6xs da0_dq_t1;
Matrix6xs da0_dq_t2;
Expand Down
4 changes: 2 additions & 2 deletions include/crocoddyl/multibody/contacts/contact-6d-loop.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ void ContactModel6DLoopTpl<Scalar>::calcDiff(
pinocchio::getJointAccelerationDerivatives(
*state_->get_pinocchio().get(), *d->pinocchio, joint1_id_,
pinocchio::LOCAL, d->v1_partial_dq, d->a1_partial_dq, d->a1_partial_dv,
d->a1_partial_da);
d->__partial_da);
pinocchio::getJointAccelerationDerivatives(
*state_->get_pinocchio().get(), *d->pinocchio, joint2_id_,
pinocchio::LOCAL, d->v2_partial_dq, d->a2_partial_dq, d->a2_partial_dv,
d->a2_partial_da);
d->__partial_da);

d->da0_dq_t1.noalias() =
joint1_placement_.toActionMatrixInverse() * d->a1_partial_dq;
Expand Down

0 comments on commit 5b883ba

Please sign in to comment.