pinocchio  2.7.1
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
ocp Namespace Reference

Classes

class  CallBack
 

Functions

def cost (U)
 
def display (U, verbose=False)
 

Variables

 approx_grad
 
list bounds = [ [-env.umax,env.umax], ]*env.nu*NSTEPS
 
 c
 
 callback = CallBack()
 
 cost
 
 env = Pendulum(1)
 
 info
 
int NSTEPS = 50
 
 True
 
 U
 
 U0 = zero(NSTEPS*env.nu)-env.umax
 — OCP resolution
 
 x0 = env.reset().copy()
 

Detailed Description

Example of optimal control resolution by direct optimization of a single trajectory.

Function Documentation

◆ cost()

def ocp.cost (   U)
Cost for a trajectory starting at state X0 with control U

Definition at line 18 of file ocp.py.

◆ display()

def ocp.display (   U,
  verbose = False 
)
Display the trajectory on Gepetto viewer.

Definition at line 28 of file ocp.py.