-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feature Request: Directly manipulate forces/torques of joints #213
Comments
@mrernst Thanks for your interest in simulating robotics in TDW! I've tested Unity's articulation body API for joint torques and forces. They seem to act as if the force is being applied from outside the robot--in other words, a force will be as if something hit the robot. The force won't account for joint limits and the joint will rotate/slide back to its target. I don't think that's what you actually want, but perhaps I'm wrong? I could add a command to set target velocities instead of angles/positions. What if you combined that with the force limit (which you can control via |
@alters-mit Thanks for your quick reply. Let's see whether I understood you correctly. To me it seems that the methods already implemented (set_revolute_target) allows for position control: you set a target joint position and some controller (possibly PID-type) applies torques to get the joint there. This guarantees smooth transitions, but does not allow for fine-grained control. Another way to do the same thing is velocity control: you set a target joint velocity and some controller tries to get the joint to rotate at this angular velocity. And these are the methods that you could easily implement, right? The third common control style would be torque control, where you set the torque directly and the physics engine handles the rest. This is what we are interested in. Of course this approach should still respect joint limits and there should be no target set that it slides back to. Maybe this clears things up a bit: For the sticky-mitten avatar you actually have commands to set joint forces, but the documentation says they will be deprecated, is there a specific reason for that? https://github.com/threedworld-mit/tdw/blob/master/Documentation/api/command_api.md#set_joint_force |
I've added force and torque commands. See this PR: #220 Please run the test in the PR and let me know on the PR thread if it works as expected (if GitHub doesn't let you post on the PR thread, just post the result here instead).
The sticky mitten avatar is obsolete. It uses the older Unity3D HingeJoint component, which is very glitchy. The Magnebot and all other robots in TDW use ArticulationBody components. The Magnebot has been designed to supersede the Sticky Mitten Avatar: for a full comparison, read this. |
@mrernst Hi, thanks for engaging with us on this! What institution is your lab in? |
@alters-mit Thank you so much. We're extremely happy that you are acting so quickly on this. I'll try to get around testing this as fast as possible. |
Hi @mrernst, just checking in re: this PR. Have you had a chance to test it yet? |
Hi @mrernst , it would be great if you could test this. We would like to close the PR and merge these changes. Much appreciated! |
I'm extremely sorry for the delayed response. I didn't have access to our infrastructure and haven't tested it myself, but one of my co-workers told me it works fine, so thank you very much and keep up the good work. We'll come back to you if we discover any issues. |
Hi there,
thank you for starting such an ambitious and cool project!
We'd love to use tdw in our lab, but since we are working on autonomously learning low-level robotics tasks it is necessary for us to directly control forces and torques of robot joints.
Unless I've missed it, the robotics API only allows for target-setting of joints. Are you willing to implement a set_joint_torque method at some point, or should we apply for access to the C# backend?
Best regards,
The text was updated successfully, but these errors were encountered: