Git Product home page Git Product logo

Comments (6)

flobotics avatar flobotics commented on May 3, 2024

i tried with version 0.0.5, now it looks more "artistic" :) but the spring-behaviour is still there, i dont know how to get rid off it. Also the physics are strange, or?

Here is a gif https://github.com/flobotics/custom_ros2_documentation/blob/main/images/google-brax/crawler5-2.gif of this code https://github.com/flobotics/brax/blob/custom_envs_0.0.5/brax/envs/crawler5.py

from brax.

erikfrey avatar erikfrey commented on May 3, 2024

That is a very cool creature you have built :-)

re: "strange" physics, the moment/axis of rotation might seem a bit off, as the large box is flipping around when the small arm actuates. To make this movement look more realistic, you might want to try lowering the mass of the small arms compared to the large box (I noticed they are all 1.0 right now)

Also keep in mind that the system ignores collisions between parent and child joints, so where you are seeing some interpenetration right now, it is probably better to limit the joint angles than to rely on primitives. I'm not seeing any issues with the joint angles in that gif, but if you think there is a problem, please do open a separate issue with a reproable use case.

re: springy joints, yes this is on our roadmap to address. We are looking into techniques such as soft constraints: https://box2d.org/files/ErinCatto_SoftConstraints_GDC2011.pdf

In the mean time you can try increasing the stiffness of the joint, but if you raise it too high the system will explode. This can be mitigated by playing with damping/num physics substeps.

from brax.

flobotics avatar flobotics commented on May 3, 2024

hmm, thats frustrating. I set the masses to the real values, e.g. a servo weights 54grams, so i set mass: 0.054 and so on.

But now with this code ( https://github.com/flobotics/brax/blob/custom_envs_0.0.5/brax/envs/crawler5.py ) it only produces a grey-image after training ?

Also the training does not show anything in the chart output, so i think it is going NaN ?

I tried again alot of different settings, remembers me to #44

Also i need to_tf_model which does not work, i tried it again here #25

What do i wrong ? The creature wants to go on a walk :)

IMG_20210911_222351

thanks for your help

from brax.

EelcoHoogendoorn avatar EelcoHoogendoorn commented on May 3, 2024

The nans are indeed an example of the system 'exploding' mentioned above. The current numerical integrator is not unconditionally stable; that is, with the wrong parameters, this kind of thing is going to happen. It will require tuning to find stable and otherwise acceptable values.

from brax.

flobotics avatar flobotics commented on May 3, 2024

i made it "working" , but looks strange. If my creature could do this, it would be great :)

The stiffness of the first joint seemed "strong" , but of the next they move, which they should not.

The other joints rotate more than they should -90/+90. You can see it at the end.

Here is a gif https://github.com/flobotics/custom_ros2_documentation/blob/main/images/google-brax/crawler5-3.gif
and the same as a video https://github.com/flobotics/custom_ros2_documentation/blob/main/images/google-brax/crawler5-3.mp4 todo start,stop,etc. to see it better than the gif.

It would be nice to have the #45 early :) ,as if you need to play with dt and substeps, the training time increases. If you decrease num_timesteps and episode_length, you got a extreme short video which does not show you whats going on.

from brax.

erikfrey avatar erikfrey commented on May 3, 2024

Closing this issue, but feel free to reach out with any new problems.

from brax.

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.