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

Issue non-blocking movements and create new wait() command #106

Closed
PeterBowman opened this issue Jul 26, 2017 · 9 comments
Closed

Issue non-blocking movements and create new wait() command #106

PeterBowman opened this issue Jul 26, 2017 · 9 comments
Assignees

Comments

@PeterBowman
Copy link
Member

At the time of writing, you cannot issue a stopControl command during a blocking operation like movj, relj or movl (see BasicCartesianControl/ICartesianControlImpl.cpp) without creating a new client instance.

My proposal: make these RPC commands return immediately, and add a new wait method to the ICartesianControl interface (as in CartesianServerLib/xRpcResponder.cpp at old asibot-main code). We'd have to deal with restoring previous reference speeds after the command has finished execution (ref).

@jgvictores
Copy link
Member

LGTM!

@PeterBowman
Copy link
Member Author

BTW movl and similar commands currently return VOCAB_OK even if the cmc was forced to abort, e.g. because of exceeding the hardcoded joint velocity limit. The proposed wait command could take care of this and return failure vocabs in such circumstances.

@PeterBowman PeterBowman changed the title Make ICartesianControl::stopControl actually stop motors - implement wait() method? Make BasicCartesianControl::stopControl actually stop motors - implement wait() method? Sep 8, 2017
@PeterBowman
Copy link
Member Author

Cf. yarp::dev::ICartesianControl::waitMotionDone:

http://www.yarp.it/classyarp_1_1dev_1_1ICartesianControl.html#af1a253cb67ed5cf091854a58248e6446

@jgvictores
Copy link
Member

LGTM!

@PeterBowman PeterBowman self-assigned this Jan 23, 2018
@PeterBowman PeterBowman changed the title Make BasicCartesianControl::stopControl actually stop motors - implement wait() method? Issue non-blocking movements and create new wait() command Jan 31, 2018
@PeterBowman
Copy link
Member Author

The wait period is no longer hardcoded, we can now tweak it on runtime via RPC config params: 1f62c00 (#121 (comment)).

@jgvictores
Copy link
Member

Cool!!!

@PeterBowman
Copy link
Member Author

Hmmm. Having a timeout is nice, but it's designed to work only on the server side. If network delays/errors occur, how can I enforce a timeout on the client side, too?

@jgvictores
Copy link
Member

  • Delays: well, we just wait some more.
  • Disconnection: tried a yarp rpc (client) against a read port (emulates a server, as yarp rpc --server is not working). Writing something from the client, awaiting for response, then killing the read port actually makes the client die:

    yarp: BottleImpl reader failed, unrecognized object code 25
    Cannot make connection
    yarp: Alternative method: precede port name with --client

This is, I think server-side wait is enough.

@PeterBowman
Copy link
Member Author

Nice to know that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants