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

JointAxis: update calls to use sdf::Errors output #1145

Merged
merged 11 commits into from
Mar 28, 2023

Conversation

marcoag
Copy link
Member

@marcoag marcoag commented Sep 16, 2022

Signed-off-by: Marco A. Gutierrez marco@openrobotics.org

🎉 New feature

Work towards #820.

Depends on: #1141.

Summary

Adds missing Errors structure parameters in a few methods of the JointAxis class.

Test it

Using the JointAxis class should report all errors through sdf::Errors if the errors parameter is used, it should print them otherwise.

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.

Marco A. Gutierrez added 2 commits October 3, 2022 10:43
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
@marcoag marcoag changed the base branch from main to sdf13 October 3, 2022 16:02
@marcoag marcoag force-pushed the marcoag/sdf_error_jointAxis branch from b53d849 to 29a7e46 Compare October 3, 2022 16:03
Marco A. Gutierrez added 4 commits March 22, 2023 11:43
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #1145 (402b2b0) into sdf13 (1d1f1d5) will decrease coverage by 0.05%.
The diff coverage is 95.06%.

@@            Coverage Diff             @@
##            sdf13    #1145      +/-   ##
==========================================
- Coverage   87.51%   87.47%   -0.05%     
==========================================
  Files         126      126              
  Lines       16248    16363     +115     
==========================================
+ Hits        14220    14313      +93     
- Misses       2028     2050      +22     
Impacted Files Coverage Δ
include/sdf/Plugin.hh 93.75% <ø> (ø)
src/Element.cc 96.21% <88.23%> (-1.01%) ⬇️
include/sdf/Element.hh 97.67% <95.23%> (-2.33%) ⬇️
python/src/sdf/pyError.cc 80.82% <100.00%> (+0.54%) ⬆️
src/JointAxis.cc 97.67% <100.00%> (+1.47%) ⬆️
src/Noise.cc 96.09% <100.00%> (+0.26%) ⬆️
src/Plugin.cc 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

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

Thanks! I've left a few test related comments, but otherwise looks good!

include/sdf/JointAxis.hh Show resolved Hide resolved
src/JointAxis.cc Show resolved Hide resolved
Marco A. Gutierrez added 2 commits March 23, 2023 12:22
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

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

It should be just these 2 lines, thanks!

src/JointAxis.cc Outdated
limitElem->GetElement("dissipation")->Set<double>(this->Dissipation());
sdf::ElementPtr dynElem = axisElem->GetElement("dynamics", _errors);
dynElem->GetElement("damping", _errors)->Set<double>(
this->Damping());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry I didn't notice this last review, I think you might have missed using the new overloaded function with errors here

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks!

src/JointAxis.cc Outdated
dynElem->GetElement("damping", _errors)->Set<double>(
this->Damping());
dynElem->GetElement("friction", _errors)->Set<double>(
this->Friction());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same for this line as well

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks!

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

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

final 2 small things, otherwise this looks great!

src/JointAxis.cc Outdated Show resolved Hide resolved
src/JointAxis.cc Show resolved Hide resolved
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

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

LGTM! Pending branch update and CI

@marcoag marcoag changed the title JointAxis: add sdf::Errors output to API methods calls JointAxis: update calls to use sdf::Errors output Mar 28, 2023
@marcoag marcoag merged commit 64748a3 into sdf13 Mar 28, 2023
@marcoag marcoag deleted the marcoag/sdf_error_jointAxis branch March 28, 2023 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants