Skip to content

Commit

Permalink
FT determinism, system execution order
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Sep 23, 2024
1 parent 51b2e36 commit f91f469
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions highlights.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,46 @@

```

- Specify execution order for System `PreUpdate` and `Update` callbacks
([gz-sim#2487](https://github.com/gazebosim/gz-sim/pull/2487),
[gz-sim#2500](https://github.com/gazebosim/gz-sim/pull/2500)).

- While the `PreUpdate`, `Update`, and `PostUpdate` phases of gz-sim systems
allow some control over the order in which code is executed, there are
cases in which more control is desired. For example, the `UserCommands`
system can create new models during its `PreUpdate` callback in response
to `EntityFactory` messages (see the
[entity creation tutorial](https://gazebosim.org/api/sim/9/entity_creation.html)),
and that callback should happen before any other system callbacks that
expect to operate on all entities in the scene. Now, the order of execution
for `PreUpdate` and `Update` callbacks for a System can be specified using
an integer priority value, with smaller values executing first.
The default system priority can be specified at compilation time by
implementing a new `SystemConfigurePriority` interface in that system,
and the priority can be overridden by specifying an XML parameter in the
system's SDFormat `<plugin/>` tag.
- Constant priority values have been defined in
[gz/sim/System.hh](https://github.com/gazebosim/gz-sim/blob/gz-sim9_9.0.0-pre1/include/gz/sim/System.hh#L106-L129)
for the `Physics` and `UserCommands` systems to ensure that
`UserCommands::PreUpdate` and `Physics::Update` execute before other
system callbacks with default priority.

- Improve determinism of ForceTorque sensor
([gz-sensors#449](https://github.com/gazebosim/gz-sensors/pull/449),
[gz-sim#2487](https://github.com/gazebosim/gz-sim/pull/2487),
[gz-sim#2494](https://github.com/gazebosim/gz-sim/pull/2494),
[gz-sim#2500](https://github.com/gazebosim/gz-sim/pull/2500)).

- The wrenches measured by ForceTorque sensors are now written to the ECM
in addition to publishing to a gz-transport topic, offering a more
deterministic data path for sensor data.
- Writing sensor data to the ECM required moving the sensor update from the
`PostUpdate` callback, which allows read-only access to the ECM with
parallel execution, to the `Update` callback, which allows write-access to
the ECM with sequential execution. It also uses the system execution order
priority to ensure that the ForceTorque `Update` callback occurs after
the `Physics` system `Update`.

- Gazebo Transport improvements.
See [gz-transport#477](https://github.com/gazebosim/gz-transport/pull/477), [gz-transport#486](https://github.com/gazebosim/gz-transport/pull/486), [gz-transport#487](https://github.com/gazebosim/gz-transport/pull/487), [gz-transport#503](https://github.com/gazebosim/gz-transport/pull/503), and [gz-transport#506](https://github.com/gazebosim/gz-transport/pull/506).

Expand Down

0 comments on commit f91f469

Please sign in to comment.