Drake Tutorial
  • Drake Tutorial
  • To get started
  • Introduction
    • Drake Concepts
    • Drake Multibody
    • Drake Simulation
    • Drake Notation
    • Bazel basics
  • Things to do in drake
    • Hello, Drake!
    • Create a URDF/SDF robot
    • Visualize data in LCM
    • Visualize trajectory
    • [WIP] Visualize data
    • [WIP] Control Real KUKA arm
  • Drake Controllers
    • PID control of double pendulum
    • LQR on Cart Pole
    • Inverse Dynamics Control on fully-actuated KUKA arm
    • [WIP] Control a underactuated robot using Inverse Dynamics Controller
  • Drake Optimization
    • [WIP] Trajectory Optimization 1 - Direct Transcription
    • [WIP] Trajectory Optimization 2 - Direct Collocation
    • [WIP] Trajectory Optimization 3 - Shooting method
    • [WIP] Optimal Control 1 - Quadratic Programming
    • [WIP] Optimal Control 2 - Sequential Quadratic Programming
  • Q & A
    • FAQ
    • Use Drake as part of your project
  • Deprecated
    • Create a simple system
Powered by GitBook
On this page
  • Direct Transcription
  • Moving Box Example
  • Useful Resources

Was this helpful?

  1. Drake Optimization

[WIP] Trajectory Optimization 1 - Direct Transcription

An introduction to Trajectory Optimization and a tutorial on Direct Transcription.

Previous[WIP] Control a underactuated robot using Inverse Dynamics ControllerNext[WIP] Trajectory Optimization 2 - Direct Collocation

Last updated 1 year ago

Was this helpful?

Trajectory Optimization is a mathematical technique that generates optimal behaviors for robots. It is widely used in industries, such as humanoid robot, autonomous driving. There are different methods to do trajectory optimization. In this tutorial, we will cover Direct Transcription, Direct Collocation and Direct Shooting methods.

that gives a good on Trajectory Optimization. Also Russ Tedrake have a that gives a introduction on these techniques.

The trajectory optimization is an optimization problem that requires mathematical programming. Drake is good at solving mathematical program problems. Drake documentation provides a .

Direct Transcription

Direct Transcription is an intuitive method that discretize the trajectory and transform the optimization problem into a nonlinear programming problem that has this form:

min⁡.f(z)s.t.g(z)=0\min. \quad f(z)\\ {\rm s.t.} \quad g(z) = 0min.f(z)s.t.g(z)=0

The f(z)f(z)f(z) is goal function and g(z)g(z)g(z) is the constraint. In the robotics setting, the z usually includes the state and control input, while the constraint involves the dynamics equation of motion and state limits.

For a continuous trajectory, direct method discretize it into points at discrete times, which are called break points or knot points.

We give the solver a initial guess for all state and control at knot points. By solving this optimization problem, the resultant z will be our optimal states and its corresponding control that obeys the dynamical constraints.

Moving Box Example

Here we focus on using the Drake toolbox to solve mathematical programming for the optimal trajectory.

We use a simple example from Kelly's tutorial. we want to push and pull a box on a friction-free desk and move it to the desired state with minimum efforts.

Useful Resources

[1] Kelly, M. (2017). An introduction to trajectory optimization: How to do your own direct collocation authors matthew kelly. SIAM Review, 39.

Matthew Kelly
tutorial
note in the underactuated robotics course
tutorial on Drake mathematical programming