Skip to content

[BUG] Robot::busy() gives false negative #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
isa-9 opened this issue Aug 6, 2024 · 1 comment · Fixed by #83
Closed

[BUG] Robot::busy() gives false negative #76

isa-9 opened this issue Aug 6, 2024 · 1 comment · Fixed by #83
Assignees
Labels
bug Something isn't working
Milestone

Comments

@isa-9
Copy link

isa-9 commented Aug 6, 2024

Version information

  • RDK: v1.4
  • Robot software: v3.6

Describe the bug
Robot::busy() seems to be not be updated to actual state of the robot after calling Robot.ExecutePlan(). When running the example basics4_plan_execution.py, it doesn't print anything unless there is a time.sleep(...) between the call of Robot.ExecutePlan() and Robot::busy().

Additional context
"I tested various values for time.sleep() and found that Robot::busy() returned False with a delay of 0.121 seconds, but returned True with a delay of 0.122 seconds or more."

@isa-9 isa-9 added the bug Something isn't working label Aug 6, 2024
@pzhu-flexiv
Copy link
Collaborator

pzhu-flexiv commented Aug 6, 2024

@isa-9 After a plan/primitive command is sent to the robot, it takes some time for the robot to load the command and compute trajectory before actually start executing. During this preparation period (varies from 10ms to 200ms depends on the complexity of the command and trajectory computation), Robot::busy() will return false because the execution is not started yet.

We used to have forced 200ms wait in ExecutePlan() and ExecutePrimitive(), but it did not turn out to be an optimal solution as some customers want short-blocking function calls. Thus, we removed the forced wait, and gave the flexibility back to the user.

We will add an input parameter block_until_started to ExecutePlan() and ExecutePrimitive() to let user decide whether they want these functions to return immediately or return after the preparation period is finished.

@pzhu-flexiv pzhu-flexiv added this to the v1.5 milestone Aug 6, 2024
@isa-9 isa-9 closed this as completed Aug 7, 2024
@pzhu-flexiv pzhu-flexiv reopened this Aug 16, 2024
@pzhu-flexiv pzhu-flexiv linked a pull request Nov 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants