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

Reset WbFieldRef->last_update After Simulation Reset #6758

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

CoolSpy3
Copy link
Contributor

@CoolSpy3 CoolSpy3 commented Jan 13, 2025

Description
Currently, after the simulation is reset by a controller, supervisors can occasionally read stale values from fields (see the linked issue for details). This PR updates Webots to broadcast a C_SUPERVISOR_SIMULATION_RESET message whenever the simulation is reset. It then updates controllers to respond to this message by resetting the last_update field of all of their field references. This effectively marks their cached data as invalid, so when the controller tries to read the value, it will re-fetch it from Webots.

Related Issues
This pull-request fixes issue #6670.

Tasks
Add the list of tasks of this PR.

@CoolSpy3 CoolSpy3 added the test suite Start the test suite label Jan 13, 2025
@CoolSpy3 CoolSpy3 marked this pull request as ready for review January 13, 2025 03:25
@CoolSpy3 CoolSpy3 requested a review from a team as a code owner January 13, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite Start the test suite
Development

Successfully merging this pull request may close these issues.

2 participants