Bug in TurnSpeedAgent, when speed set to zero
In TurnSpeedAgent.step
, there is a bug due to checking
if self.speed
. Correct would be if self.speed is not None
.
The result is that setting self.speed = 0
has no effect
and the previously set linear velocity remains unchanged.
Behavior after the fix will be that setting self.speed = 0
will
set the linear velocity to zero.
The corresponding conditional for self.turn
does not cause a bug,
because the body angle is changed directly and there is no
angular velocity that would need to be set to zero.
Agents affected by the bug
(sublasses of TurnSpeedAgent
) include:
TurnSpeedRobot
, TurnSpeedGuppy
, MXNetGuppy
,
fishmodels.gym_interface.ModelGuppy
.
Not affected among others are:
PolarCoordinateTargetRobot
, AdaptiveCouzinGuppy
, PerturbedAdaptiveCouzinGuppy
.