-
Notifications
You must be signed in to change notification settings - Fork 69
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
Adding cone primitives. #594
Conversation
32a74f8
to
c18d067
Compare
Squashing commits to make requested target of main with backports to harmonic. git cherry-pick conflict resolved with: a7613bd Signed-off-by: Benjamin Perseghetti <[email protected]>
c18d067
to
d025776
Compare
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
4785760
to
cbd801b
Compare
@scpeters thanks, with your help I finally figured out how to bump math7->math8 to get it past CI 🤦♂️... 🫠 |
Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
cc0f8cf
to
6c121d7
Compare
Signed-off-by: Benjamin Perseghetti <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked out your code and reviewed a bit of it on a flight yesterday but didn't have a chance to post my comments until now. It looks like you've mainly copied the Cylinder class, which makes sense, but the Volume computation needs to be updated in a few places.
I haven't yet reviewed the moment of inertia calculations.
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
@scpeters yeah, I think I did the volume properly everywhere except for some of the tests I had added around 4AM this morning while on "awake kiddo" duty. And according to wolfram here it is for the cone at center of mass that I added to the code: |
Signed-off-by: Benjamin Perseghetti <[email protected]>
Great those inertia values relative to the center of mass look good to me. The tricky thing about cone inertial properties compared to the other simple shapes that we support is that a cone's center of mass is not at the geometric center of the shape. So when we specify model properties and geometry in SDFormat, if a link has a single shape with uniform density, we can set the link pose and then can use the default identity poses for the collision, visual, and inertial tags. With a cone, we need to be explicit about where the shape origin is defined. If we use the geometric center, then a link with uniform density cone could still use the identity pose for collision and visual but would need the inertial pose to be set with the center of mass location. Most of that is a concern for sdformat, which I will address in review of gazebosim/sdformat#1418, but I think the |
I believe that for how cone is defined the center of mass is |
@scpeters @azeey @ahcorde Awesome! So I think the next one to go is gz-msgs? gazebosim/gz-msgs#442 And once that is in the nightlies should update for the others to start working in CI? |
Signed-off-by: Benjamin Perseghetti <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
🦟 Bug fix
Summary
This helps add the missing cone geometry for primitive/basic parametric shapes:
And is also valuable for visualizations of emitters/source that typically have conic-based spread as seen in this acoustic attack on an IMU by showing the affected area:
Associated PRs:
Checklist
codecheck
passed (See contributing)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.