Skip to content

Commit

Permalink
deleting relocation of robot
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Dec 2, 2024
1 parent 4dc14c5 commit b7333d5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions field_friend/interface/components/leaflet_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from nicegui.elements.leaflet_layers import GenericLayer, Marker, TileLayer

from ...localization.geo_point import GeoPoint
from ...localization.gnss_simulation import GnssSimulation
from .key_controls import KeyControls

if TYPE_CHECKING:
Expand Down Expand Up @@ -92,13 +91,6 @@ def update_layers(self) -> None:
args=[row.points_as_tuples, {'color': '#F2C037'}]))

def update_robot_position(self, position: GeoPoint, dialog=None) -> None:
# TODO: where does the dialog come from?
if dialog:
self.on_dialog_close()
dialog.close()
# TODO why can we only relocate in simulation?
if isinstance(self.gnss, GnssSimulation):
self.gnss.relocate(position)
self.robot_marker = self.robot_marker or self.m.marker(latlng=position.tuple)
icon = 'L.icon({iconUrl: "assets/robot_position_side.png", iconSize: [50,50], iconAnchor:[20,20]})'
self.robot_marker.run_method(':setIcon', icon)
Expand Down
4 changes: 0 additions & 4 deletions field_friend/localization/gnss_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ async def _create_new_record(self) -> GNSSRecord | None:
await rosys.sleep(0.1) # NOTE simulation does not be so fast and only eats a lot of cpu time
return record

def relocate(self, position: GeoPoint) -> None:
localization.reference = position
self.wheels.pose = Pose(x=position.lat, y=position.long, yaw=0.0, time=rosys.time())

def disconnect(self):
"""Simulate serial disconnection.
Expand Down

0 comments on commit b7333d5

Please sign in to comment.