Coder Social home page Coder Social logo

ilqr-ddp's Introduction

Trajectory Optimization for 2 DoF arm

This project uses iLQR/DDP to generate a swing up motion of the arm. The main optimization method used in this code is based on [1]. This optimization method can be classified as indirect, shooting method. Each iteration of the optimization consist of a backward and a a forward pass through the time steps. Backward pass runs from the final k=N to the initial k=0 time step and minimizes cost-to-go function along the way. Forward pass runs in the other direction by forward stepping the dynamics. Each iteration generates a slightly better trajectory in terms of the cost function until convergence.

The cost function consists of the running and the final cost. The final cost penalizes deviations from the final state, and the running cost penalizes large torques.

The main optimization method is based on [2]. It adds, however, the possibility to use more accurate symbolic derivatives.

To generate and visualize the motion run iLQR_and_DDP_for_DoF_Arm.m. Optimization parameters, initial state as well as the time horizon can all be changed in this file as well. If you need help implementing this method in your own use case, feel free to contact me: [email protected]

Arm.gif.mp4

References

[1] Tassa, Yuval and Mansard, Nicolas and Todorov, Emo, Control-limited differential dynamic programming, 2014 IEEE International Conference on Robotics and Automation (ICRA)

[2] Yuval (2022). iLQG/DDP trajectory optimization (https://www.mathworks.com/matlabcentral/fileexchange/52069-ilqg-ddp-trajectory-optimization), MATLAB Central File Exchange. Retrieved April 19, 2022.

ilqr-ddp's People

Contributors

b-filip avatar filip7b avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.