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

Skip updating ignition plugins when simulation is paused #34

Merged
merged 2 commits into from
Aug 12, 2021

Conversation

luca-della-vedova
Copy link
Member

Bug fix

Fixed bug

Closes rmf_demos #71.

Fix applied

Add a check in every plugin and, if the simulation is paused, skip updating.
The crash was caused by the state being updated when simulation is paused, which resulted in a value of dt of 0 being used, then divisions by 0 in the velocity calculation resulted in nan values being sent to the physics engine.

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #34 (0d7bb4f) into main (a81991f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##            main     #34      +/-   ##
========================================
  Coverage   0.00%   0.00%              
========================================
  Files        640      46     -594     
  Lines      54080    3752   -50328     
========================================
+ Misses     54080    3752   -50328     
Flag Coverage Δ
tests 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ation/rmf_building_sim_gazebo_plugins/src/lift.cpp
...uilding_sim_gazebo_plugins/src/toggle_charging.cpp
...tion/rmf_robot_sim_gazebo_plugins/src/readonly.cpp
...ation/rmf_robot_sim_common/src/ingestor_common.cpp
...ation/rmf_robot_sim_common/src/ingestor_common.cpp
...ation/rmf_robot_sim_common/src/readonly_common.cpp
...lation/rmf_building_sim_common/src/door_common.cpp
...building_sim_common/src/crowd_simulator_common.cpp
...lation/rmf_building_sim_common/src/door_common.cpp
...lation/rmf_robot_sim_common/src/slotcar_common.cpp
... and 672 more

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
@luca-della-vedova luca-della-vedova merged commit 76fc231 into main Aug 12, 2021
@luca-della-vedova luca-della-vedova deleted the fix/update_on_pause branch August 12, 2021 03:20
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.

ODE assertion fails in Ignition when TinyRobot is in scenario
2 participants