Giter Club home page Giter Club logo

Comments (8)

alters-mit avatar alters-mit commented on September 6, 2024

@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 set_robot_joint_drive? Would that give you sufficient control over the forces and torques applied to the joint? If so, I could easily write the new commands.

from tdw.

mrernst avatar mrernst commented on September 6, 2024

@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:
https://robotics.stackexchange.com/questions/10052/position-control-vs-velocity-control-vs-torque-control

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

from tdw.

alters-mit avatar alters-mit commented on September 6, 2024

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).

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?

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.

from tdw.

instbldrjems avatar instbldrjems commented on September 6, 2024

@mrernst Hi, thanks for engaging with us on this! What institution is your lab in?

from tdw.

mrernst avatar mrernst commented on September 6, 2024

@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.
@instbldrjems I am working for the Triesch Lab at Frankfurt Institute for Advanced Studies, it's an external institute affiliated with the Goethe-University Frankfurt, Germany (https://www.fias.science/en/neuroscience/research-groups/jochen-triesch/)

from tdw.

alters-mit avatar alters-mit commented on September 6, 2024

Hi @mrernst, just checking in re: this PR. Have you had a chance to test it yet?

from tdw.

jemsMIT avatar jemsMIT commented on September 6, 2024

Hi @mrernst , it would be great if you could test this. We would like to close the PR and merge these changes. Much appreciated!

from tdw.

mrernst avatar mrernst commented on September 6, 2024

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.

from tdw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.