Skip to content

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
@CoolSpy3 CoolSpy3 force-pushed the update-fields-on-reset branch 2 times, most recently from c903d5d to 108bc4c Compare June 24, 2025 21:17
@CoolSpy3 CoolSpy3 force-pushed the update-fields-on-reset branch from 108bc4c to 3071767 Compare June 26, 2025 06:01
@CoolSpy3 CoolSpy3 requested a review from omichel July 13, 2025 22:18
@CoolSpy3 CoolSpy3 merged commit 653dd4a into cyberbotics:master Jul 14, 2025
13 checks passed
@CoolSpy3 CoolSpy3 deleted the update-fields-on-reset branch July 14, 2025 08:46
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