Giter VIP home page Giter VIP logo

cartpole-physics's People

Contributors

colgreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cartpole-physics's Issues

Cart horizontal acceleration

Hi Colin,

Thanks so much for your code. I tried to understand the formulas behind it, but that made me nauseated :) This example has been a great help.

But (there's always a but, isn't there) I think I found a tiny little mistake in your horizontal calculation of the cart:

xa = (g * ((m*sin_theta*cos_theta) + (m2*sin_theta2*cos_theta2))
     - (7f/3f) * (f +(m*l_hat*thetav_sqr*sin_theta) + (m2*l2_hat*thetav2_sqr*sin_theta2) - mu_c*xv)
     - (((mu_p*thetav*cos_theta)/l_hat) + ((mu_p*thetav2*cos_theta2)/l2_hat)))
     - / ((m*cos_theta_sqr) + (m2*cos_theta2_sqr) - (7/3)*M);`

At the end of this calculation you wrote (7/3), but I think you ment to write (7f/3f). It resulted in a tiny difference between you code and my Swift implementation of it.

I thought I'd mention it ...

  • daniel

Screen Shot 2021-05-25 at 16 25 47

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.