Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Nov 27, 2024
1 parent d322dc8 commit 1fb39ff
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions field_friend/automations/navigation/field_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,29 +207,21 @@ async def _run_change_row(self) -> State:
await self.gnss.ROBOT_POSE_LOCATED.emitted(self._max_gnss_waiting_time)
# turn to row
assert self.end_point is not None
driving_yaw = self.odometer.prediction.direction(self.end_point)
await self.turn_in_steps(driving_yaw)

if isinstance(self.detector, rosys.vision.DetectorSimulation) and not rosys.is_test:
self.create_simulation()
else:
self.plant_provider.clear()

<< << << < HEAD
row_yaw = self.start_point.direction(self.end_point)
await self.turn_in_steps(row_yaw)

if isinstance(self.detector, rosys.vision.DetectorSimulation) and not rosys.is_test:
self.create_simulation()
else:
self.plant_provider.clear()
if isinstance(self.implement, WeedingImplement):
rosys.notify(f'Setting crop {self.current_row.crop} for {self.implement.name}')
self.implement.cultivated_crop = self.current_row.crop
self.implement.request_backup()
return State.FOLLOW_ROW

if isinstance(self.implement, WeedingImplement):
rosys.notify(f'Setting crop {self.current_row.crop} for {self.implement.name}')
self.implement.cultivated_crop = self.current_row.crop
self.implement.request_backup()
return State.FOLLOWING_ROW
== == == =
driving_yaw = self.odometer.prediction.direction(self.end_point)
await self.turn_in_steps(driving_yaw)
return State.FOLLOW_ROW
>>>>>> > main

async def drive_in_steps(self, target: Pose) -> None:
async def drive_in_steps(self, target: Pose) -> None:
while True:
if target.relative_point(self.odometer.prediction.point).x > 0:
return
Expand Down

0 comments on commit 1fb39ff

Please sign in to comment.