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

Stopping an asynchronous movement #40

Closed
wagenaartje opened this issue Jul 3, 2020 · 3 comments
Closed

Stopping an asynchronous movement #40

wagenaartje opened this issue Jul 3, 2020 · 3 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@wagenaartje
Copy link

wagenaartje commented Jul 3, 2020

During an asynchronous moveTo movement, I want to launch a synchronous movement. This gives the error:

pybullet.error: Already a moveTo asynchronous. Can't launch moveTo synchronous

However, is there a way to stop the current asynchronous movement so that a synchronous movement can be performed?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.67. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the question Further information is requested label Jul 3, 2020
@wagenaartje
Copy link
Author

Update: I found a work-around for now,

pepper_pos = pepper.getPosition();
pepper.moveTo(0, 0, 0, frame=PepperVirtual.FRAME_ROBOT, speed=1, _async=True)
time.sleep(0.5)

Basically, it preforms an asynchronous movement to the current position which is quickly stopped. I'm still curious if there is a cleaner way, for example some kind of pepper.stop() function.

@mbusy
Copy link
Member

mbusy commented Jul 3, 2020

That's indeed the solution you should use for now. But that's a great point, a stopMove method along the lines of the one defined in the ALMotion documentation would be a great add-on

@mbusy mbusy changed the title How to stop asynchronous movement Stopping an asynchronous movement Jul 3, 2020
@mbusy mbusy added the enhancement New feature or request label Jul 3, 2020
@mbusy mbusy added this to the 1.4.2 milestone Sep 21, 2020
@mbusy mbusy closed this as completed Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants