Skip to content

Commit

Permalink
Merge pull request #1178 from ArthurH91/devel
Browse files Browse the repository at this point in the history
Bug Fix : pair-collision.hxx, changing the method to check the pair_id with collisionPair.size()
  • Loading branch information
cmastalli authored Nov 8, 2023
2 parents bc450a3 + 117b730 commit 73acfe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/crocoddyl/multibody/residuals/pair-collision.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ResidualModelPairCollisionTpl<Scalar>::ResidualModelPairCollisionTpl(
geom_model_(geom_model),
pair_id_(pair_id),
joint_id_(joint_id) {
if (static_cast<pinocchio::FrameIndex>(geom_model->ngeoms) <= pair_id) {
if (static_cast<pinocchio::FrameIndex>(geom_model->collisionPairs.size()) <=
pair_id) {
throw_pretty(
"Invalid argument: "
<< "the pair index is wrong (it does not exist in the geometry model)");
Expand Down

0 comments on commit 73acfe6

Please sign in to comment.