Skip to content

Commit

Permalink
fixing Point3d error
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Sep 6, 2024
1 parent 05d6089 commit ea39f44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions field_friend/interface/components/camera_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ def build_svg_for_implement(self) -> str:
def build_svg_for_plant_provider(self) -> str:
if self.camera is None or self.camera.calibration is None:
return ''
position = rosys.geometry.Point(x=self.camera.calibration.extrinsics.translation[0],
y=self.camera.calibration.extrinsics.translation[1])
position = rosys.geometry.Point3d(x=self.camera.calibration.extrinsics.translation[0],
y=self.camera.calibration.extrinsics.translation[1])
svg = ''
for plant in self.plant_provider.get_relevant_weeds(position):
position_3d = rosys.geometry.Point3d(x=plant.position.x, y=plant.position.y, z=0)
Expand Down
2 changes: 1 addition & 1 deletion field_friend/interface/components/plant_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, plant_provider: PlantProvider, weed_category_names: list[str]
self.plant_provider.PLANTS_CHANGED.register_ui(self.update)

def update(self) -> None:
origin = rosys.geometry.Point(x=0, y=0)
origin = rosys.geometry.Point3d(x=0, y=0, z=0)
in_world = {p.id: p for p in
self.plant_provider.get_relevant_weeds(origin, max_distance=1000) +
self.plant_provider.get_relevant_crops(origin, max_distance=1000)}
Expand Down

0 comments on commit ea39f44

Please sign in to comment.