Skip to content

Commit e18dd9b

Browse files
committed
Update descriptions of localization methods
1 parent 8ea1d4d commit e18dd9b

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
@@ -1667,33 +1666,31 @@ def download_graph(self, download_path: str) -> typing.Tuple[bool, str]:
16671666
)
16681667

16691668
def set_localization_fiducial(self) -> typing.Tuple[bool, str]:
1670-
"""Localize a robot according to near fiducials.
1669+
"""Localize a robot according to near fiducials based on current graph and snapshots in the robot.
16711670
16721671
Returns:
1673-
success (bool): success flag
1674-
message (str): message about result
1672+
(bool, str) tuple indicating whether the command was successfully sent, and a message.
16751673
"""
16761674
try:
16771675
self._set_initial_localization_fiducial()
16781676
return True, "Success"
16791677
except Exception as e:
1680-
return False, f"Error: {e}"
1678+
return False, f"Got an error while localizing the robot with fiducials: {e}"
16811679

16821680
def set_localization_waypoint(self, waypoint_id: str) -> typing.Tuple[bool, str]:
1683-
"""Localize a robot to specified waypoint.
1681+
"""Localize a robot to specified waypoint based on current graph and snapshots in the robot..
16841682
16851683
Args:
16861684
waypoint_id (int): ID of waypoint to be localized.
16871685
16881686
Returns:
1689-
result (bool): success flag of localization
1690-
message (str): message about result.
1687+
(bool, str) tuple indicating whether the command was successfully sent, and a message.
16911688
"""
16921689
try:
16931690
resp = self._set_initial_localization_waypoint(waypoint_id)
16941691
return resp[0], resp[1]
16951692
except Exception as e:
1696-
return False, f"Error: {e}"
1693+
return False, f"Got an error while localizing the robot to the waypoint {waypoint_id}: {e}"
16971694

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

0 commit comments

Comments
 (0)