-
Notifications
You must be signed in to change notification settings - Fork 103
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 Actor.cc copy operators and restructure tests #301
Conversation
…verage Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
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.
looks good to me. Can you update changelog? Update: nevermind I missed it. It's already updated
src/Actor_TEST.cc
Outdated
*_actor1.TrajectoryByIndex(traj_idx), | ||
*_actor2.TrajectoryByIndex(traj_idx)); | ||
} | ||
return animations_equal && trajectories_equal && |
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.
nitpick: camelCase for animations_equal
and trajectories_equal
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.
Done, a quick search for _equal
showed that waypoints_equal
had the same issue so fixed that as well.
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
I don't know why the GitHub action didn't run for this PR |
I'm not sure how to fix that, can someone retrigger the action? |
dummy commit to trigger CI Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@osrf-jenkins run tests please |
@osrf-jenkins run tests |
I think #310 should enable the actions CI for this branch |
Codecov Report
@@ Coverage Diff @@
## sdf8 #301 +/- ##
=======================================
Coverage ? 87.54%
=======================================
Files ? 54
Lines ? 7293
Branches ? 0
=======================================
Hits ? 6385
Misses ? 908
Partials ? 0 Continue to review full report at Codecov.
|
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
This PR is a followup of #299, it changes all the copy operators to use the default copy operator of the private data object, fixing a few properties that were not copied in the manual copy (such as the actor properties trajectories, joints, links, sdf element).
I also took the chance to implement unit tests for every class (before only actors were being tested) and restructure the tests a bit to reduce code duplication.
The tests are now much more comprehensive. What can be set through setter functions is tested in the unit tests. The parts that are set on SDF parsing are tested in the integration test (the example sdf has also been updated to add joints and links, previously untested).
Open to feedback about what to do with the CopyFrom functions, right now they are broken since they don't copy all the properties, I wanted to deprecate them but is that OK to do in a minor release?