Limit acceleration in a certain range
skonwa opened this issue · comments
I used DiscreteMetaAction action type,and set lateral=False in intersection environment.I found there is something wrong with action['acceleration'], that it's absolute value is too large, can i clip acceleration in controller.py-class ControlledVehicle-method act,like this action['acceleration'] = np.clip(action['acceleration'], -self.MAX_ACC, self.MAX_ACC) below action['steering'] = np.clip(action['steering'], -self.MAX_STEERING_ANGLE, self.MAX_STEERING_ANGLE)?
Hi. Yes, you can clip acceleration as you suggested, but there is a risk of making the underlying controller unstable.
Instead (or in addition), I would recommend damping the speed controller by choosing a lower response time TAU_ACC
here:
For instance, you can try changing it from 0.6s to 1.2s
ok, thanks for your suggestions!