Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix : pair-collision.hxx, changing the method to check the pair_id with collisionPair.size() #1178

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

ArthurH91
Copy link
Contributor

@ArthurH91 ArthurH91 commented Nov 7, 2023

Hello,

First, I'd like to thank you for your work. Here's what I think a small mistake in pair-collision.hxx I corrected.

Pull Request: Update condition to use collisionPairs.size()

Description

This pull request updates a conditional statement to use collisionPairs.size() instead of ngeoms because ngeoms is not the number of collision pairs but the number of geometry objects in geom_model.
The number of pairs can be higher than the number of geometry objects, hence this pull request.

Changes Made

  • Replaced static_cast<pinocchio::FrameIndex>(geom_model->ngeoms) with static_cast<pinocchio::FrameIndex>(geom_model->collisionPairs.size()) in the condition.

Testing

After building it, I tried on a small example in python and it works. I did not run unit tests after this but it builds successfully. Please, do not hesitate to tell me if I did something wrong here.

Related Issues

None

Checklist

Thank you,
Arthur Haffemayer
PhD. Student, LAAS CNRS, Gepetto

@cmastalli
Copy link
Member

Thanks for spotting this, @ArthurH91!

@cmastalli cmastalli merged commit 73acfe6 into loco-3d:devel Nov 8, 2023
10 checks passed
nim65s added a commit to nim65s/robotpkg that referenced this pull request Jan 27, 2024
Upstream changes:

    ## [2.0.2] - 2023-12-07

    * Added nu, ng, and nh setters for Python bindings in loco-3d/crocoddyl#1192
    * Added CHANGELOG.md in loco-3d/crocoddyl#1188
    * Supported nu==0 in actuation models in loco-3d/crocoddyl#1188
    * Included Python bindings for Crocoddyl exceptions by cmastalli in loco-3d/crocoddyl#1186
    * Updated cmake submodule update by jcarpentier in loco-3d/crocoddyl#1186
    * Fixed getters for contraints bounds by skleff1994 in loco-3d/crocoddyl#1180
    * Extended solver abstract and callbacks for arbitrary solvers by cmastalli in loco-3d/crocoddyl#1179
    * Fixed the check of pair_id in collision residual by ArthurH91 in loco-3d/crocoddyl#1178
    * Exploited control-residual structure when computing Lu, Luu by cmastalli in loco-3d/crocoddyl#1176
    * Added LWA fram convention and introduced different axis for 1d contacts by skleff1994 in loco-3d/crocoddyl#1172
    * Python bindings for setting control bounds by cmastalli in loco-3d/crocoddyl#1171
    * Fixed missed scalar in cost sum and activation data by cmastalli in loco-3d/crocoddyl#1165
    * Added actuation unit tests by cmastalli in loco-3d/crocoddyl#1161
    * Introduced method for obtaining the dimension of floating-bases by cmastalli in loco-3d/crocoddyl#1160
    * Fixed set_reference in state residual by cmastalli in loco-3d/crocoddyl#1158
    * Enabled CONDA CI jobs with CppADCodeGen by cmastalli in loco-3d/crocoddyl#1156
    * Added other CI jobs by cmastalli in loco-3d/crocoddyl#1152
    * Fixed compiltation issue when building with CppADCodeGen by cmastalli in loco-3d/crocoddyl#1151
    * Fixed include order used in frames.cpp by ManifoldFR in loco-3d/crocoddyl#1150
nim65s added a commit to nim65s/robotpkg that referenced this pull request Jan 29, 2024
Upstream changes:

    ## [2.0.2] - 2023-12-07

    * Added nu, ng, and nh setters for Python bindings in loco-3d/crocoddyl#1192
    * Added CHANGELOG.md in loco-3d/crocoddyl#1188
    * Supported nu==0 in actuation models in loco-3d/crocoddyl#1188
    * Included Python bindings for Crocoddyl exceptions by cmastalli in loco-3d/crocoddyl#1186
    * Updated cmake submodule update by jcarpentier in loco-3d/crocoddyl#1186
    * Fixed getters for contraints bounds by skleff1994 in loco-3d/crocoddyl#1180
    * Extended solver abstract and callbacks for arbitrary solvers by cmastalli in loco-3d/crocoddyl#1179
    * Fixed the check of pair_id in collision residual by ArthurH91 in loco-3d/crocoddyl#1178
    * Exploited control-residual structure when computing Lu, Luu by cmastalli in loco-3d/crocoddyl#1176
    * Added LWA fram convention and introduced different axis for 1d contacts by skleff1994 in loco-3d/crocoddyl#1172
    * Python bindings for setting control bounds by cmastalli in loco-3d/crocoddyl#1171
    * Fixed missed scalar in cost sum and activation data by cmastalli in loco-3d/crocoddyl#1165
    * Added actuation unit tests by cmastalli in loco-3d/crocoddyl#1161
    * Introduced method for obtaining the dimension of floating-bases by cmastalli in loco-3d/crocoddyl#1160
    * Fixed set_reference in state residual by cmastalli in loco-3d/crocoddyl#1158
    * Enabled CONDA CI jobs with CppADCodeGen by cmastalli in loco-3d/crocoddyl#1156
    * Added other CI jobs by cmastalli in loco-3d/crocoddyl#1152
    * Fixed compiltation issue when building with CppADCodeGen by cmastalli in loco-3d/crocoddyl#1151
    * Fixed include order used in frames.cpp by ManifoldFR in loco-3d/crocoddyl#1150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants