Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Sep 23, 2024
1 parent 2eb69f1 commit 532bff9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions field_friend/automations/implements/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def __init__(self, system: 'System') -> None:

async def activate(self):
self.system.plant_provider.clear()
# await self.system.field_friend.flashlight.turn_on()
await self.system.field_friend.flashlight.turn_on()
await rosys.sleep(3) # NOTE: we wait for the camera to adjust
self.system.plant_locator.resume()
await super().activate()

async def deactivate(self):
self.system.plant_locator.pause()
# await self.system.field_friend.flashlight.turn_off()
await self.system.field_friend.flashlight.turn_off()
await super().deactivate()
6 changes: 3 additions & 3 deletions field_friend/automations/implements/weeding_implement.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def finish(self) -> None:
await super().finish()

async def activate(self):
# await self.system.field_friend.flashlight.turn_on()
await self.system.field_friend.flashlight.turn_on()
await self.puncher.clear_view()
await rosys.sleep(3)
self.system.plant_locator.resume()
Expand All @@ -79,13 +79,13 @@ async def activate(self):
async def deactivate(self):
await super().deactivate()
self.system.timelapse_recorder.camera = None
# await self.system.field_friend.flashlight.turn_off()
await self.system.field_friend.flashlight.turn_off()
self.system.plant_locator.pause()
self.kpi_provider.increment_weeding_kpi('rows_weeded')

async def start_workflow(self) -> None:
# TODO: only sleep when moving
# await rosys.sleep(2) # wait for robot to stand still
await rosys.sleep(2) # wait for robot to stand still
if not self._has_plants_to_handle():
return
self.log.info(f'Handling plants with {self.name}...')
Expand Down
1 change: 1 addition & 0 deletions field_friend/automations/plant_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ async def _detect_plants(self) -> None:
world_point_3d: rosys.geometry.Point3d | None = None
if isinstance(camera, StereoCamera):
world_point_3d = camera.calibration.project_from_image(image_point)
# TODO: 3d detection
# camera_point_3d: Point3d | None = await camera.get_point(
# int(d.cx), int(d.cy))
# if camera_point_3d is None:
Expand Down

0 comments on commit 532bff9

Please sign in to comment.