Skip to content

/navigate_to fails with LeaseNotOwnedByWallet: Status.OTHER_OWNER (and sometimes RobotImpairedError) #786

Description

@chiar15

Hi! I’m having trouble using the /navigate_to action.

Before sending the goal, I clear the graph, upload the map, and set the localization method using the corresponding services. All of these steps complete without any errors. I also acquire the lease beforehand, and by checking the /status/leases topic I can confirm that my node has the lease for all resources (including body).

However, every time I send a /navigate_to goal, the action fails with a lease error saying that the body lease is owned by someone else:

[spot_ros2-1] [ERROR] [1770292318.048565582] [spot_ros2]: Error raised in execute callback: Lease on "body" has state (Status.OTHER_OWNER) [spot_ros2-1] Traceback (most recent call last): [spot_ros2-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/action/server.py", line 336, in _execute_goal [spot_ros2-1] execute_result = await await_or_execute(execute_callback, goal_handle) [spot_ros2-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute [spot_ros2-1] return callback(*args) [spot_ros2-1] File "/home/chiara/ros2_ws/install/spot_driver/lib/spot_driver/spot_ros2", line 3017, in handle_navigate_to [spot_ros2-1] resp = self.spot_wrapper.spot_graph_nav._navigate_to( [spot_ros2-1] File "/home/chiara/ros2_ws/build/spot_wrapper/spot_wrapper/wrapper_helpers.py", line 55, in wrapper_try_claim [spot_ros2-1] return func(*args, **kwargs) [spot_ros2-1] File "/home/chiara/ros2_ws/build/spot_wrapper/spot_wrapper/spot_graph_nav.py", line 517, in _navigate_to [spot_ros2-1] self._lease = self._lease_wallet.advance() [spot_ros2-1] File "/usr/local/lib/python3.10/dist-packages/bosdyn/client/lease.py", line 421, in advance [spot_ros2-1] lease_state = self._get_owned_lease_state_locked(resource) [spot_ros2-1] File "/usr/local/lib/python3.10/dist-packages/bosdyn/client/lease.py", line 483, in _get_owned_lease_state_locked [spot_ros2-1] raise LeaseNotOwnedByWallet(resource, lease_state) [spot_ros2-1] bosdyn.client.lease.LeaseNotOwnedByWallet: Lease on "body" has state (Status.OTHER_OWNER) [spot_ros2-1] [WARN] [1770292318.049514152] [spot_ros2]: Goal state not set, assuming aborted. Goal ID: [ 70 20 32 40 242 3 67 19 181 210 228 59 27 177 238 184] [spot_ros2-1] [ERROR] [1770292348.392360039] [spot_ros2]: Error raised in execute callback: bosdyn.api.graph_nav.NavigateToResponse (RobotImpairedError): Robot has a critical perception or behavior fault and cannot navigate.

What confuses me is that /status/leases shows that I do own the leases, yet the navigation code fails when it tries to advance the lease (it looks like lease_wallet.advance() raises because the wallet thinks it doesn’t own the body lease).

The only workaround I’ve found is to explicitly release the claim before sending the goal, and then re-acquire it after the goal finishes (success or failure). This “works”, but it’s quite inconvenient and creates problems in my workflow.

Am I missing something in the correct lease workflow for /navigate_to? Is there a recommended way to avoid this Status.OTHER_OWNER error, or to properly synchronize the lease used by GraphNav with the one reported on /status/leases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions