Skip to content

Commit

Permalink
Fix yaw computation (#134)
Browse files Browse the repository at this point in the history
* fixes for presenting f12 with coins

* fix yaw order

* revert docker container change

* revert tornado height

---------

Co-authored-by: Lukas Baecker <[email protected]>
Co-authored-by: Pascal Schade <[email protected]>
  • Loading branch information
3 people authored Jul 24, 2024
1 parent 869f695 commit 21d20a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion field_friend/automations/navigation/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import TYPE_CHECKING, Any

import rosys
from rosys.helpers import angle
from nicegui import ui

from ..implements import Implement
Expand Down Expand Up @@ -83,7 +84,7 @@ async def _drive(self, distance: float) -> None:
async def _drive_to_yaw(self, distance: float, yaw: float):
deadline = rosys.time() + 2
start_position = self.odometer.prediction.point
yaw -= self.odometer.prediction.yaw # take current yaw into account and only steer the difference
yaw = angle(self.odometer.prediction.yaw, yaw) # take current yaw into account and only steer the difference
with self.driver.parameters.set(linear_speed_limit=self.linear_speed_limit, angular_speed_limit=self.angular_speed_limit):
await self.driver.wheels.drive(*self.driver._throttle(1, yaw)) # pylint: disable=protected-access
try:
Expand Down

0 comments on commit 21d20a3

Please sign in to comment.