Skip to content

Commit e722513

Browse files
committed
Update descriptions of localization methods
1 parent 3f99f19 commit e722513

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

spot_wrapper/wrapper.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from distutils.dist import command_re
21
import functools
32
import logging
43
import math
@@ -1701,33 +1700,31 @@ def download_graph(self, download_path: str) -> typing.Tuple[bool, str]:
17011700
)
17021701

17031702
def set_localization_fiducial(self) -> typing.Tuple[bool, str]:
1704-
"""Localize a robot according to near fiducials.
1703+
"""Localize a robot according to near fiducials based on current graph and snapshots in the robot.
17051704
17061705
Returns:
1707-
success (bool): success flag
1708-
message (str): message about result
1706+
(bool, str) tuple indicating whether the command was successfully sent, and a message.
17091707
"""
17101708
try:
17111709
self._set_initial_localization_fiducial()
17121710
return True, "Success"
17131711
except Exception as e:
1714-
return False, f"Error: {e}"
1712+
return False, f"Got an error while localizing the robot with fiducials: {e}"
17151713

17161714
def set_localization_waypoint(self, waypoint_id: str) -> typing.Tuple[bool, str]:
1717-
"""Localize a robot to specified waypoint.
1715+
"""Localize a robot to specified waypoint based on current graph and snapshots in the robot..
17181716
17191717
Args:
17201718
waypoint_id (int): ID of waypoint to be localized.
17211719
17221720
Returns:
1723-
result (bool): success flag of localization
1724-
message (str): message about result.
1721+
(bool, str) tuple indicating whether the command was successfully sent, and a message.
17251722
"""
17261723
try:
17271724
resp = self._set_initial_localization_waypoint(waypoint_id)
17281725
return resp[0], resp[1]
17291726
except Exception as e:
1730-
return False, f"Error: {e}"
1727+
return False, f"Got an error while localizing the robot to the waypoint {waypoint_id}: {e}"
17311728

17321729
def cancel_navigation(self) -> None:
17331730
"""Cancel navigation of a robot from start_navigation()"""

0 commit comments

Comments
 (0)