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

Collision: add optional density parameter to API #1330

Closed
wants to merge 1 commit into from

Conversation

scpeters
Copy link
Member

🎉 New feature

Quick API change in support of #1329

Summary

This adds a std::optional<double> parameter to override the density in Collision::CalculateInertial to support the //link/inertial/density parameter. This is submitted as a quick API change before the Harmonic release without the implementation of the parameter. If we don't merge this, then we can add an overloaded Collision::CalculateInertial method afterwards.

cc @jasmeet0915

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Add std::optional<double> parameter to override the
density in Collision::CalculateInertial. It is not
yet used, but will hold the new API before release.

Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #1330 (00bff48) into sdf14 (2ba6470) will not change coverage.
The diff coverage is n/a.

❗ Current head 00bff48 differs from pull request most recent head 445d3bd. Consider uploading reports for the commit 445d3bd to get more accurate results

@@           Coverage Diff           @@
##            sdf14    #1330   +/-   ##
=======================================
  Coverage   87.47%   87.47%           
=======================================
  Files         134      134           
  Lines       17751    17751           
=======================================
  Hits        15528    15528           
  Misses       2223     2223           
Files Coverage Δ
src/Collision.cc 98.26% <ø> (ø)

@jasmeet0915
Copy link
Contributor

Thank you for the changes @scpeters. I would also like to point out that a link-level <auto_inertia_params> element (//link/inertial/auto_inertia_params) was also added in #1304 for similar reasons as the link-level <density> element (this is also mentioned in the proposal). So should we further modify the API to take an optional sdf::ElementPtr for the same?
cc: @azeey @quarkytale

@azeey
Copy link
Collaborator

azeey commented Sep 27, 2023

I would prefer to wait until after Harmonic to add an overload that also takes into account auto_inertia_params.

@scpeters scpeters mentioned this pull request Sep 27, 2023
7 tasks
@scpeters
Copy link
Member Author

we will add an overloaded API after the harmonic stable release and include the implementation at that time

@scpeters scpeters closed this Sep 28, 2023
@scpeters scpeters deleted the scpeters/collision_optional_density branch September 28, 2023 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants