Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Apply initial sim time also after a reset. #3340

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

peci1
Copy link
Contributor

@peci1 peci1 commented Aug 22, 2023

🦟 Bug fix

Fixes #3294 (comment)

Summary

Initial sim time should also be respected after a reset.

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.

Copy link
Collaborator

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Thanks! Ok for me, as long as the ABI checker is happy (it should be, but better double check).

@peci1
Copy link
Contributor Author

peci1 commented Aug 22, 2023

Thanks for the quick action! I just hope the other times present in ResetTime() are good to be zeros after reset. I tried to understand the meaning of each of them and it seemed so to me, but I'd rather have second eyes on this.

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
@peci1 peci1 force-pushed the initial-sim-time-reset branch from 7a6c8de to 97df15c Compare August 22, 2023 09:36
@traversaro
Copy link
Collaborator

Probably we can expand the setting description in

"Initial simulation time (seconds).")
to explain that is not only used during the first run of the sim, but also after reset?

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Copy link
Collaborator

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Ok for me, thanks! Technically (per Hyrum's Law) this may be a behaviour breaking change, but I think it make sense. Probably to be sure it is best to also wait for an approval of @scpeters .

@peci1
Copy link
Contributor Author

peci1 commented Aug 23, 2023

Technically (per Hyrum's Law) this may be a behaviour breaking change

Technically, you're right. Practically, if anyone had tried the reset from e.g. current UNIX timestamp to 0, he'd face lots of problems with downstream code (e.g. ROS nodes). So my assumption is nobody tried that. The only potentially problematic use-case could be if the user specified a low init time like 1 or 10...

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.

this makes sense to me

thanks!

@scpeters scpeters merged commit fc2643c into gazebosim:gazebo11 Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants