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 ModelPhotoShootTest test failures #2294

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jan 19, 2024

🦟 Bug fix

Summary

ModelPhotoShoot tests have started failing recently (#2293 (comment)). The failures are caused by a change in the DART physics engine (dartsim/dart#1774) which causes joints to recover after reaching or exceeding their position limits. The debs for this version of DART are in the prerelease repos for testing, so we've only started experiencing this since gazebo-tooling/gzdev#77 which made gz-sim8 use prereleases.

It seems like the model used in the ModelPhotoShoot tests starts off with joint limits violated and recovers after a few iterations. This causes a small movement of the robot. Since the test works by comparing images taken of the robot at the start of simulation and after a few iterations, the small movement causes a discrepancy in the images. The solution here is to run the whole test while simulation is paused.

This also cleans up some TestFixture warnings.

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.

The failures are caused by a change in the DART physics engine
(dartsim/dart#1774) which causes joints to
recover after reaching or exceeding their position limits. It seems like
the model used in this plugin starts off with joint limits violated and
recovers after a few iterations. This causes a small movement of the
robot. Since the test works by comparing images taken of the robot at
the start of simulation and after a few iterations, the small movement
causes a discrepancy in the images. The solution here is to run the
whole test while simulation is paused.

This also cleans up some TestFixture warnings.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested a review from mjcarroll as a code owner January 19, 2024 17:07
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jan 19, 2024
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c6aaaf2) 65.78% compared to head (65c7be6) 65.79%.

Additional details and impacted files
@@           Coverage Diff            @@
##           gz-sim8    #2294   +/-   ##
========================================
  Coverage    65.78%   65.79%           
========================================
  Files          327      327           
  Lines        31212    31212           
========================================
+ Hits         20534    20535    +1     
+ Misses       10678    10677    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@azeey
Copy link
Contributor Author

azeey commented Jan 19, 2024

note to self: we need to backport this to Garden and Fortress.

@azeey azeey merged commit cc4914a into gazebosim:gz-sim8 Jan 19, 2024
9 of 11 checks passed
@azeey azeey deleted the fix_photoshoot branch January 19, 2024 18:52
azeey added a commit to azeey/gz-sim that referenced this pull request Mar 19, 2024
The failures are caused by a change in the DART physics engine
(dartsim/dart#1774) which causes joints to
recover after reaching or exceeding their position limits. It seems like
the model used in this plugin starts off with joint limits violated and
recovers after a few iterations. This causes a small movement of the
robot. Since the test works by comparing images taken of the robot at
the start of simulation and after a few iterations, the small movement
causes a discrepancy in the images. The solution here is to run the
whole test while simulation is paused.

This also cleans up some TestFixture warnings.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey added a commit that referenced this pull request Apr 23, 2024
The failures are caused by a change in the DART physics engine
(dartsim/dart#1774) which causes joints to
recover after reaching or exceeding their position limits. It seems like
the model used in this plugin starts off with joint limits violated and
recovers after a few iterations. This causes a small movement of the
robot. Since the test works by comparing images taken of the robot at
the start of simulation and after a few iterations, the small movement
causes a discrepancy in the images. The solution here is to run the
whole test while simulation is paused.

This also cleans up some TestFixture warnings.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants