diff --git a/field_friend/interface/components/leaflet_map.py b/field_friend/interface/components/leaflet_map.py index dcd94840..0225a605 100644 --- a/field_friend/interface/components/leaflet_map.py +++ b/field_friend/interface/components/leaflet_map.py @@ -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: @@ -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) diff --git a/field_friend/localization/gnss_simulation.py b/field_friend/localization/gnss_simulation.py index e7b1ec28..0057f912 100644 --- a/field_friend/localization/gnss_simulation.py +++ b/field_friend/localization/gnss_simulation.py @@ -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.