Skip to content

Commit

Permalink
add buttons for debug turning
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Dec 4, 2024
1 parent 8c3b6b1 commit 8f65bf5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions field_friend/interface/components/development.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import math
from typing import TYPE_CHECKING

import rosys
Expand Down Expand Up @@ -42,6 +43,9 @@ def create_development_ui(system: 'System') -> None:
ui.label().bind_text_from(system.field_friend.wheels.pose, 'x', lambda x: f'x: {x}')
ui.label().bind_text_from(system.field_friend.wheels.pose, 'y', lambda y: f'y: {y}')
ui.label().bind_text_from(system.field_friend.wheels.pose, 'yaw_deg', lambda yaw: f'yaw: {yaw}')
with ui.card():
ui.button('0°', on_click=lambda: system.field_navigation.turn_to_yaw(0.0))
ui.button('90°', on_click=lambda: system.field_navigation.turn_to_yaw(math.radians(90)))
with ui.card():
system.field_navigation.developer_ui()
if isinstance(system.field_friend, rosys.hardware.RobotHardware):
Expand Down

0 comments on commit 8f65bf5

Please sign in to comment.