lastUpdateTime wasn't being updated on early return from OnUpdate.
The conveyor populator starts inactive. It receives an activation command when the competition starts. Without this PR there's a large jump in elapsedTime the first time OnUpdate is called after being activated (it jumps to the current sim time).
Most of the time this wasn't an issue because when the competition starts the rate modifier is also set to 0, so provided that the rate modifier is set before the first time OnUpdate is called after the plugin is activated, the large elapsed time still amounts to 0 effective elapsed time.
However, in the case that the request to set the rate modifier to 0 is not received before the first OnUpdate call after activation, it would cause models to be teleported inappropriately.
Should address https://bitbucket.org/osrf/ariac/issues/116
lastUpdateTime
wasn't being updated on early return fromOnUpdate
.The conveyor populator starts inactive. It receives an activation command when the competition starts. Without this PR there's a large jump in elapsedTime the first time
OnUpdate
is called after being activated (it jumps to the current sim time).Most of the time this wasn't an issue because when the competition starts the rate modifier is also set to 0, so provided that the rate modifier is set before the first time
OnUpdate
is called after the plugin is activated, the large elapsed time still amounts to 0 effective elapsed time.However, in the case that the request to set the rate modifier to 0 is not received before the first
OnUpdate
call after activation, it would cause models to be teleported inappropriately.