Skip to content

Commit

Permalink
fix heading
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Dec 17, 2024
1 parent ddf96cb commit 44357e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion field_friend/robot_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def handle_gnss_measurement(self, gnss_measurement: GnssMeasurement) -> None:
return
self.predict(gnss_measurement.time)
pose = gnss_measurement.pose.to_local()
pose.yaw = self.x[2, 0] + rosys.helpers.angle(self.x[2, 0], pose.yaw)
z = [[pose.x], [pose.y], [pose.yaw]]
h = [[self.x[0, 0]], [self.x[1, 0]], [self.x[2, 0]]]
H = [
Expand Down Expand Up @@ -195,7 +196,6 @@ def predict(self, time: float | None = None) -> None:
self.x[0] += v * np.cos(theta) * dt
self.x[1] += v * np.sin(theta) * dt
self.x[2] += omega * dt
self.x[2] = rosys.helpers.eliminate_2pi(self.x[2])
self.x[3] += a * dt
self.Sxx = F @ self.Sxx @ F.T + R
self.update_frame()
Expand Down

0 comments on commit 44357e3

Please sign in to comment.