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 Actor.cc copy operators and restructure tests #301

Merged
merged 8 commits into from
Jul 1, 2020

Conversation

luca-della-vedova
Copy link
Member

@luca-della-vedova luca-della-vedova commented Jun 19, 2020

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?

luca-della-vedova and others added 5 commits June 19, 2020 15:40
…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>
Copy link
Contributor

@iche033 iche033 left a 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

*_actor1.TrajectoryByIndex(traj_idx),
*_actor2.TrajectoryByIndex(traj_idx));
}
return animations_equal && trajectories_equal &&
Copy link
Contributor

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

Copy link
Member Author

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>
@scpeters
Copy link
Member

I don't know why the GitHub action didn't run for this PR

@luca-della-vedova
Copy link
Member Author

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>
@scpeters scpeters closed this Jun 29, 2020
@scpeters scpeters reopened this Jun 29, 2020
@scpeters
Copy link
Member

@osrf-jenkins run tests please

@j-rivero
Copy link
Contributor

@osrf-jenkins run tests

@scpeters
Copy link
Member

I think #310 should enable the actions CI for this branch

@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2020

Codecov Report

❗ No coverage uploaded for pull request base (sdf8@7b7e533). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b7e533...5b49112. Read the comment docs.

@scpeters scpeters merged commit 2968b25 into sdf8 Jul 1, 2020
@scpeters scpeters deleted the luca/actor_copy_sdf branch July 1, 2020 00:03
scpeters added a commit to scpeters/sdformat that referenced this pull request Aug 21, 2020
* 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>
scpeters added a commit that referenced this pull request Aug 21, 2020
* 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>
scpeters added a commit to scpeters/sdformat that referenced this pull request Aug 21, 2020
* 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>
scpeters added a commit that referenced this pull request Aug 25, 2020
* 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>
scpeters added a commit to scpeters/sdformat that referenced this pull request Aug 25, 2020
* 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>
scpeters added a commit that referenced this pull request Aug 25, 2020
* 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>
traversaro pushed a commit to traversaro/sdformat that referenced this pull request Sep 5, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants