Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion spot_tools/src/spot_executor/spot_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ def execute_pick(self, command, feedback):

if success:
# Update object holding state
# TODO: don't hard-code the object to hold
feedback.set_robot_holding_state(True, command.object_id.upper())

feedback.print("INFO", "Finished `pick` command")
Expand Down
4 changes: 4 additions & 0 deletions spot_tools_ros/src/spot_tools_ros/spot_executor_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def set_robot_holding_state(self, is_holding: bool, object_id: str, timeout=5):
req.is_holding = is_holding
req.id = object_id

if not self.holding_client.wait_for_service(timeout_sec=0.5):
self.logger.warning("UpdateHoldingState service not available")
return False

future = self.holding_client.call_async(req)
start = time.time()
while not future.done():
Expand Down
Loading