Skip to content

Feature/graceful lease handoff#26

Merged
y-veys merged 8 commits intomainfrom
feature/graceful_lease_handoff
Sep 22, 2025
Merged

Feature/graceful lease handoff#26
y-veys merged 8 commits intomainfrom
feature/graceful_lease_handoff

Conversation

@y-veys
Copy link
Collaborator

@y-veys y-veys commented Sep 5, 2025

This nominally supports the graceful handoff between the spot executor and the tablet. It works well when the robot is following a continuous trajectory, but is a little less clean for the pick skill.

Pick Skill Comments We want to exit out of the pick skill when we lose the lease, but this does not happen until we actually try to pick up the object. If the detector has detected an object and the lease is hijacked, the pick skill will continue waiting for the user to confirm the detection is valid. If the user confirms before the lease is returned, a LeaseUseError will be thrown when the robot actually tries to pick up the object. HOWEVER, if the lease is returned and THEN the user confirms the detection, the robot will try to pick up the object with potentially the wrong xy location (e.g., if the robot was moved by the user). Thus, we need to raise a LeaseUserError if we lose the lease when we are waiting for confirmation.

Potential Solutions The RosFeedbackCollector does not have access to the spot_interface, so it cannot check if we have the lease. Currently, the LeaseManager does not have access to the RosFeedbackCollector instance (but could), where it would then set feedback.break_out_of_waiting_loop to True. @GoldenZephyr thoughts on passing feedback to monitor_lease?

@y-veys y-veys requested a review from GoldenZephyr September 5, 2025 18:05
@GoldenZephyr
Copy link
Collaborator

This nominally supports the graceful handoff between the spot executor and the tablet. It works well when the robot is following a continuous trajectory, but is a little less clean for the pick skill.

Pick Skill Comments We want to exit out of the pick skill when we lose the lease, but this does not happen until we actually try to pick up the object. If the detector has detected an object and the lease is hijacked, the pick skill will continue waiting for the user to confirm the detection is valid. If the user confirms before the lease is returned, a LeaseUseError will be thrown when the robot actually tries to pick up the object. HOWEVER, if the lease is returned and THEN the user confirms the detection, the robot will try to pick up the object with potentially the wrong xy location (e.g., if the robot was moved by the user). Thus, we need to raise a LeaseUserError if we lose the lease when we are waiting for confirmation.

Potential Solutions The RosFeedbackCollector does not have access to the spot_interface, so it cannot check if we have the lease. Currently, the LeaseManager does not have access to the RosFeedbackCollector instance (but could), where it would then set feedback.break_out_of_waiting_loop to True. @GoldenZephyr thoughts on passing feedback to monitor_lease?

Yeah, I think that probably makes sense. Especially since you could image other feedback communication that the lease monitor might want to try sending back to ROS. Overall the PR looks good!

Copy link
Collaborator

@GoldenZephyr GoldenZephyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@y-veys y-veys merged commit 29562ed into main Sep 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants