Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Point3d in camera_card and plant_object #178

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading