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

Fix build errors and warnings for DART 6.13.0 #465

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jan 2, 2023

🦟 Bug fix

Summary

DART 6.13.0 was tagged yesterday and is already available on homebrew. This PR fixes a compilation errors related to ContactSurfaceParams, which was a feature added in our fork first and upstreamed. Variable names were changed during the upstreaming process, which now has to be resolved.

This also fixes a compilation warning with using BodyNode::getShapeNodes which is now deprecated and as been replaced by BodyNode::eachShapeNode.

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

@azeey azeey requested review from mxgrey and scpeters as code owners January 2, 2023 18:15
@azeey azeey self-assigned this Jan 2, 2023
@azeey azeey requested a review from Crola1702 January 2, 2023 18:15
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Jan 2, 2023
@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #465 (51a7fed) into ign-physics2 (5e99521) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           ign-physics2     #465   +/-   ##
=============================================
  Coverage         83.15%   83.15%           
=============================================
  Files               108      108           
  Lines              4210     4210           
=============================================
  Hits               3501     3501           
  Misses              709      709           
Impacted Files Coverage Δ
dartsim/src/Base.hh 99.01% <ø> (ø)
dartsim/src/SimulationFeatures.cc 82.90% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my preference would be use macros that are characterized by a feature name, rather than a version number. We can then set those in a single header. Similar to how libav does it: https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/version.h

I think it makes it clearer from a readability and maintenance point of view, but I would be open to arguments the other way.

@azeey
Copy link
Contributor Author

azeey commented Jan 2, 2023

I would agree with that if this was based on the presence of a feature, but it really is based on whether we're using a newer API (> 6.13.0) or not.

@ahcorde
Copy link
Contributor

ahcorde commented Jan 3, 2023

I would agree with that if this was based on the presence of a feature, but it really is based on whether we're using a newer API (> 6.13.0) or not.

I already have this fix in my local setup. LGTM

@mjcarroll
Copy link
Contributor

@osrf-jenkins retest this please

@scpeters
Copy link
Member

scpeters commented Jan 3, 2023

I think my preference would be use macros that are characterized by a feature name, rather than a version number. We can then set those in a single header. Similar to how libav does it: https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/version.h

I think it makes it clearer from a readability and maintenance point of view, but I would be open to arguments the other way.

I would agree with that if this was based on the presence of a feature, but it really is based on whether we're using a newer API (> 6.13.0) or not.

I think @mjcarroll's concern can be addressed in a cosmetic way with some extra macros with verbose names:

in SimulationFeatures.cc:

#if DART_VERSION_AT_LEAST(6, 13, 0)
// comments with relevant links to pull request / issue
#define DART_HAS_NEW_FRICTION_VARIABLE_NAMES
#endif

in Base.hh:

#if DART_VERSION_AT_LEAST(6, 13, 0)
// comments with relevant links to pull request / issue
#define DART_HAS_EACH_SHAPE_NODE_API
#endif

and then using the presence of those macros in the relevant code

Define DART_HAS_EACH_SHAPE_NODE_API and
DART_HAS_UPSTREAM_FRICTION_VARIABLE_NAMES so the
ifdef logic is more clear and readable.

Signed-off-by: Steve Peters <[email protected]>
@scpeters
Copy link
Member

scpeters commented Jan 4, 2023

I think @mjcarroll's concern can be addressed in a cosmetic way with some extra macros with verbose names:

I've implemented these verbose macro names in a separate branch in 51a7fed. If you'd like to merge it into this branch with your own changes, that works, or I can submit it as a separate pull request if you prefer

@azeey
Copy link
Contributor Author

azeey commented Jan 5, 2023

I think @mjcarroll's concern can be addressed in a cosmetic way with some extra macros with verbose names:

I've implemented these verbose macro names in a separate branch in 51a7fed. If you'd like to merge it into this branch with your own changes, that works, or I can submit it as a separate pull request if you prefer

Thanks for the changes. I've gone ahead and merged them to this branch.

@scpeters scpeters merged commit f1d3dad into gazebosim:ign-physics2 Jan 5, 2023
@Crola1702
Copy link

@azeey @scpeters, this is pending the forward port right?

Please let me know when you are going to do so, I would like to have a peer programming session and see how to do a proper forward port.

azeey added a commit to azeey/gz-physics that referenced this pull request Jan 6, 2023
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
azeey added a commit that referenced this pull request Jan 6, 2023
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
scpeters added a commit that referenced this pull request Jan 9, 2023
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
@azeey azeey deleted the fix_dart_6_13_0 branch January 11, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants