Skip to content

Commit

Permalink
add default drive distance as constant
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Jul 11, 2024
1 parent c45a1d5 commit 3e01030
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 @@ -17,6 +17,7 @@ class WorkflowException(Exception):

class Navigation(rosys.persistence.PersistentModule):
MAX_STRETCH_DISTANCE = 0.05
DEFAULT_DRIVE_DISTANCE = 0.02

def __init__(self, system: 'System', implement: Implement) -> None:
super().__init__()
Expand Down Expand Up @@ -45,7 +46,7 @@ async def start(self) -> None:
while not self._should_finish():
distance = await self.implement.get_stretch(self.MAX_STRETCH_DISTANCE)
if distance > self.MAX_STRETCH_DISTANCE: # we do not want to drive to long without observing
await self._drive(0.02)
await self._drive(self.DEFAULT_DRIVE_DISTANCE)
continue
await self._drive(distance)
await self.implement.start_workflow()
Expand Down

0 comments on commit 3e01030

Please sign in to comment.