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

[Question] Effort control mode (instead of position control) #29

Closed
ADebor opened this issue Mar 28, 2023 · 2 comments
Closed

[Question] Effort control mode (instead of position control) #29

ADebor opened this issue Mar 28, 2023 · 2 comments

Comments

@ADebor
Copy link

ADebor commented Mar 28, 2023

Hi there,

I'm currently modifying the ShadowHand example you provide in order to control the hand using efforts rather than position control. To do that, I use the set_joint_efforts method on the hand view (instance of ShadowHandView(ArticulationView)) instead of setting position targets and using set_joint_position_targets as done in the provided example.

This seems to work (the hand does move when using a random policy), but since the get_applied_joint_efforts method isn't working (apparently a known bug that will be fixed soon, or is fixed and the problem is on my side) and returns nothing but zero efforts in the joints, I cannot really investigate and check that everything is working properly.

What I am curious about is the set_drive call in the ShadowHand class. This call sets the drive type to either linear or angular through pxr.UsdPhysics.DriveAPI, as well as the target position or velocity to 0.0. Is this some kind of initialization step required with usd, or is this related to some behind-the-scene mechanism underlying the control of the hand, not depending on the type of control I choose using the Python API (e.g. by using switch_control_mode), and preventing me from doing effort control on the hand?

I apologize if this is a silly question, and don't hesitate to tell me if it shoud be asked on the dev forum rather than here. Thanks!

@ADebor ADebor changed the title [Question] Effort control mode (instead of position) [Question] Effort control mode (instead of position control) Mar 28, 2023
@kellyguo11
Copy link
Collaborator

Hi there, the UsdPhysics.DriveAPI schema shouldn't be required for effort control. You can set both the damping and stiffness values on the drives to be 0 for effort control. They are used mainly for position/velocity target controls. You can find more details about it in the USD documentation here.

@ADebor
Copy link
Author

ADebor commented Apr 5, 2023

Thanks a lot @kellyguo11!

@ADebor ADebor closed this as completed Apr 5, 2023
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