Skip to content
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

wait_until_executed does not wait when planning is not finished yet #73

Open
Kaiser1401 opened this issue Jun 10, 2024 · 2 comments
Open

Comments

@Kaiser1401
Copy link

wait_until_executed only waits when the plan has been send for execution, but when the planning takes longer, there is no execution yet and the function returns. I think that might be what happens in #28 as well.

Found while working on Jazzy-Harmonic adaptation

(
AndrejOrsula/panda_ign_moveit2#34
AndrejOrsula/ign_moveit2_examples#27
)

@AndrejOrsula
Copy link
Owner

I wonder what use case could trigger this. The internal code waits since the request was called (self.__is_motion_requested) until the execution ends (self.__is_executing). As far as I remember, self.__is_motion_requested should be unset after execution begins and self.__is_executing is set.

def wait_until_executed(self) -> bool:
"""
Wait until the previously requested motion is finalised through either a success or failure.
"""
if not self.__is_motion_requested:
self._node.get_logger().warn(
"Cannot wait until motion is executed (no motion is in progress)."
)
return False
while self.__is_motion_requested or self.__is_executing:
self.__wait_until_executed_rate.sleep()
return self.motion_suceeded

Do you know which call triggers this behaviour? That could help in pointing out the flaw in the logic somewhere.

@Kaiser1401
Copy link
Author

I think I was a bit confused and thought the execute(plan(..)) nesting somewhat would get messed up but can now not find why it would. I'll try to provocate the error again and check where things go sideways

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

No branches or pull requests

2 participants