Skip to content

Commit 4e3a790

Browse files
committed
Remove changes from dynamics.py correctly
1 parent fdf73b2 commit 4e3a790

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

GEMstack/knowledge/vehicle/dynamics.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ def acceleration_to_pedal_positions(acceleration : float, velocity : float, pitc
6666
if abs(acceleration) < acceleration_deadband:
6767
#deadband?
6868
return (0,0,gear)
69+
70+
#velocity threshold for switching gears
71+
if abs(velocity) <= 0.01:
72+
velocity = 0
73+
6974
if velocity * acceleration < 0:
7075
accel_pos = 0
7176
brake_pos = -acceleration / brake_max

0 commit comments

Comments
 (0)