Skip to content

Commit 45da0a3

Browse files
authored
Update state_estimation.py
1 parent 82cea6e commit 45da0a3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

GEMstack/onboard/perception/state_estimation.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ def update(self) -> VehicleState:
6262

6363
#filtering speed
6464
raw.v = self.gnss_speed
65+
66+
# Assume no backward slide, use gear to decide velocity sign
67+
if raw.gear == -1:
68+
raw.v *= -1
69+
6570
#filt_vel = self.speed_filter(raw.v)
6671
#raw.v = filt_vel
6772
return raw
@@ -90,4 +95,4 @@ def healthy(self):
9095
return self.vehicle_state is not None
9196

9297
def update(self) -> VehicleState:
93-
return self.vehicle_state
98+
return self.vehicle_state

0 commit comments

Comments
 (0)