Open arjo129 opened 1 year ago
This leads to incorrect behavior sometimes as the order in which plugins in the same phase are run is not guaranteed.
There is a prototype in #2394 for controlling order of execution for system callbacks. It could be possible to address this by thoughtful adjustment of the system priority values
Desired behavior
Currently gazebo has three states when running simulations.
PreUpdate
,Update
andPostUpdate
. In #1808, I ran into an issue where plugins have to calculate forces to be applied in thePreUpdate
step and the user command system also spawns new vehicles in thePreUpdate
phase. This leads to incorrect behavior sometimes as the order in which plugins in the same phase are run is not guaranteed. My current fix involves changing the logic of the plugin to make sure we minimize the effect of unexplained behavior. This however requires that System developers have deep understanding of gazebo. What I would like to propose is to have aUserEdit
phase where users can interact with the world prior to havingPreUpdate
run. This way systems which modify the state of the world don't clash with systems which apply physical forces and new entities will always have forces applied to them before the first physical step takes place. SoUserCommandSystem
would always spawn objects during theUserEdit
phase.Alternatives considered
UserEdit
phase.