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

Test case to check if velocity limits are applied to joints #1445

Merged
merged 15 commits into from
May 4, 2022

Conversation

adityapande-1995
Copy link
Contributor

@adityapande-1995 adityapande-1995 commented Apr 13, 2022

Signed-off-by: Aditya [email protected]
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

Summary

This PR adds a test case to check if velocity limits are applied to joints. Currently, this doesn't work on DART 6.9.5, and only works for DART 6.10 : dartsim/dart#1407, and hence has been disabled for now.

Test it

The test case includes a double pendulum that swings freely starting from rest, and the joint velocities must be constrained by the provided <limit> tag.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

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.

Signed-off-by: Aditya <[email protected]>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Apr 13, 2022
Signed-off-by: Aditya <[email protected]>
@adityapande-1995
Copy link
Contributor Author

I tried testing the feature to add velocity limits as a constraint using release-6.9 and release-6.10 branches of upstream DART : adityapande-1995/dart@b5fc183, adityapande-1995/dart@29b8ae0 and it only works on 6.10.

I think it is due to this particular PR that was not backported : dartsim/dart#1407.

I suspect this feature will work if/when we link ign-physics to DART 6.10, hence disabled this test case for now.

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #1445 (7bdc57c) into ign-gazebo6 (d57d9de) will not change coverage.
The diff coverage is n/a.

❗ Current head 7bdc57c differs from pull request most recent head 5d56b19. Consider uploading reports for the commit 5d56b19 to get more accurate results

@@             Coverage Diff              @@
##           ign-gazebo6    #1445   +/-   ##
============================================
  Coverage        33.58%   33.58%           
============================================
  Files               44       44           
  Lines             2260     2260           
============================================
  Hits               759      759           
  Misses            1501     1501           

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 e3d8ae7...5d56b19. Read the comment docs.

@chapulina chapulina added the physics Involves Ignition Physics label Apr 13, 2022
Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

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

do you mind fixing the compiler warning introduced by #1416? just add override to the end of PerfectComm.hh:56?

@adityapande-1995
Copy link
Contributor Author

adityapande-1995 commented Apr 15, 2022

Just confirmed the above theory, linking against dart 6.10 enables the <limit><velocity> feature. Tested locally.
The models below have velocity limits of 10 and 1 respectively.

ezgif com-gif-maker

@adityapande-1995
Copy link
Contributor Author

The failing tests in 55 - UNIT_Gui_TEST (SEGFAULT) and 153 - INTEGRATION_odometry_publisher (Failed) are unrelated to this PR

Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

LGTM, left some minor comments

@scpeters
Copy link
Member

scpeters commented May 3, 2022

I had assumed that these tests would run on macOS because it has dartsim 6.12.1, but I found a bug in our cmake logic for finding DART for purposes of testing. I have proposed a fix in #1469

@scpeters
Copy link
Member

scpeters commented May 3, 2022

I had assumed that these tests would run on macOS because it has dartsim 6.12.1, but I found a bug in our cmake logic for finding DART for purposes of testing. I have proposed a fix in #1469

#1469 has been merged, and it shows the new test is failing

I added an extra 1e-6 tolerance to the velocity expectation in 7bdc57c, which should allow it pass

@adityapande-1995
Copy link
Contributor Author

The test has passed here : https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-homebrew-amd64/8165/testReport/(root)/PhysicsSystemFixtureWithDart6_10/

The failures in 55 - UNIT_Gui_TEST (SEGFAULT), 175 - INTEGRATION_scene_broadcaster_system (Failed) are flaky and unrelated to this PR.

@scpeters
Copy link
Member

scpeters commented May 4, 2022

The test has passed here : https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-homebrew-amd64/8165/testReport/(root)/PhysicsSystemFixtureWithDart6_10/

The failures in 55 - UNIT_Gui_TEST (SEGFAULT), 175 - INTEGRATION_scene_broadcaster_system (Failed) are flaky and unrelated to this PR.

I reran the build, and it has only one failing test now, and the test added in this PR passed:

@adityapande-1995 adityapande-1995 merged commit 212aaed into ign-gazebo6 May 4, 2022
@adityapande-1995 adityapande-1995 deleted the aditya/vel_limit_test branch May 4, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress physics Involves Ignition Physics
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants