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

Spnav controller does not dismiss out-of-limit poses (MOVI) #186

Closed
PeterBowman opened this issue Jan 27, 2020 · 4 comments
Closed

Spnav controller does not dismiss out-of-limit poses (MOVI) #186

PeterBowman opened this issue Jan 27, 2020 · 4 comments
Assignees
Labels
bug Something isn't working invalid priority: high

Comments

@PeterBowman
Copy link
Member

Steps to reproduce and explanation:

  • Launch streamingDeviceController with spnav. In --movi mode, the app will construct a virtual trajectory on the infinitesimal position increments exerted by the user on the joystick (ref, Implement MOVI command in streamingDeviceController app #173 (comment)).
  • Reach joint(s) limit(s).
  • Keep commanding new poses in the out-of-joint-limits space. The current virtual pose will change while the robot does not.
  • In case you re-gain control of the robot because of the virtual pose landing back in the robot's reachable workspace, this pose will be probably far off the one at which the robot stopped motion due to joint limits.
  • The robot is commanded an instantaneous huge step in position-direct mode, hence nothing good can happen next.
@PeterBowman PeterBowman added bug Something isn't working priority: high labels Jan 27, 2020
@PeterBowman
Copy link
Member Author

PeterBowman commented Jan 29, 2020

Temporary workaround:

  1. Enable CSV mode (Implement cyclic synchronous velocity (CSV) mode yarp-devices#221): set ivar mvar all (enableCsv 1).
  2. Use twist commands in streamingDeviceController: just skip --movi (--gain becomes unused).

@PeterBowman PeterBowman changed the title Spnav controller does not dismiss out-of-limit poses while on movi mode Spnav controller does not dismiss out-of-limit poses (MOVI) Jul 14, 2021
@PeterBowman
Copy link
Member Author

PeterBowman commented Nov 25, 2021

How to tackle this:

  1. Perform IK on the streamingDeviceController, connect to the remote joint controller device and fetch current joint values and joint limits, compare current vs commanded joint values, block commands that exceed limits. Efficient, but overkill.
  2. In BCC::movi, which is currently checking against position limits, also make sure velocity limits are being considered (BUT see Implement MOVI command in streamingDeviceController app #173 (comment)):
    if (!checkJointLimits(currentQ, qdiff))
    {
    yCError(BCC) << "Joint position limits exceeded, not moving";
    return;
    }

The second option looks cleaner, although it requires the BCC to store previous commanded/actual cartesian values. In any case, this is only to prevent huge position command steps. In streamingDeviceController, the "virtual" TCP is not affected in any way, it's free to move beyond position limits. This also means that, in order to regain control (as allowed by BCC), the user needs to be lucky enough to move the virtual TCP exactly where it surpassed the robot's reachable space.

I'm inclined to close this as invalid. As explained in the linked issue, the velocity limitation is enforced by the low-level driver. Yes, we can really mess things up without proper care and if those limits are set to higher values. Still, it can't be really avoided in --movi mode.

@PeterBowman
Copy link
Member Author

The second option looks cleaner, although it requires the BCC to store previous commanded/actual cartesian values. In any case, this is only to prevent huge position command steps.

Note to self: this might not be a bad idea after all. I'd need to check all cases where limit checks are actually expected, both joint and cartesian controller sides. At #173 (comment), delegating velocity checks onto the joint controller seemed the correct way, but are they applied everywhere? BCC could perform a second (or first) check just to make sure. Otherwise, why would we bother having position checks in BCC if they could stay at the iPOS device?

@PeterBowman
Copy link
Member Author

PeterBowman commented Jul 15, 2022

I'm inclined to close this as invalid. As explained in the linked issue, the velocity limitation is enforced by the low-level driver. Yes, we can really mess things up without proper care and if those limits are set to higher values. Still, it can't be really avoided in --movi mode.

Closed as invalid, then. Now, passing --movi will display a warning: ff5092a. If you landed here after reading the inline comment, see workaround at #186 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid priority: high
Projects
None yet
Development

No branches or pull requests

1 participant