-
Notifications
You must be signed in to change notification settings - Fork 263
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
Improve determinism of PostUpdate callbacks using sensor data #2268
Comments
I just discussed this with @azeey, who recommended that we try to keep the sensor updates in We also discussed how to specify order of execution priority: via XML or hard-coded at build time or a combination thereof. To simplify matters, @azeey suggested that we start with configuration only via XML. Also, while you could want different priority values for each callback in a system, @azeey suggested that the first prototype start with a single priority value per system that will apply to all its Update callbacks. |
I think it would be elegant to be able to specify the system priority as a namespace XML attribute like
Currently, however the custom attributes of a
|
I've implemented a prototype in #2394 to control the order of execution of |
I've retargeted the prototype for controlling the execution order of |
Desired behavior
Currently many sensors are implemented with systems that publish new sensor data over gz-transport during
PostUpdate
, for example:Since all
PostUpdate
code execution is performed in separate threads, a system that wanted to use the data from the current round ofPostUpdate
calls would have to do something like subscribing to the sensor'sgz-transport
topic and waiting for that topic to update or just use the most recently received value. In any case, this is not deterministic.One good option would be to move some sensor updates from
PostUpdate
into theUpdate
call, while ensuring that they are executed after the update of the Physics system. This ordering of update execution could be implemented using execution groups with numerical priority values that determine the order of execution (simiilar to the approach taken in rendering pipelines and init scripts). The sensor data should also then be written to components in the ECM.Alternatives considered
Implementation suggestion
Additional context
The text was updated successfully, but these errors were encountered: