pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
ocp Namespace Reference

Classes

class  CallBack
 

Functions

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

Variables

 approx_grad
 
tuple bounds
 
 c
 
 callback = CallBack()
 
 cost
 
 env = Pendulum(1)
 
 info
 
int NSTEPS = 50
 
 True
 
 U
 
 U0 = np.zeros(NSTEPS * env.nu) - env.umax
 
 x0 = env.reset().copy()
 

Detailed Description

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

Function Documentation

◆ cost()

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

Definition at line 18 of file ocp.py.

◆ display()

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

Definition at line 29 of file ocp.py.

Variable Documentation

◆ approx_grad

approx_grad

Definition at line 82 of file ocp.py.

◆ bounds

bounds
Initial value:
1= (
2 [
3 [-env.umax, env.umax],
4 ]
5 * env.nu
6 * NSTEPS
7)

Definition at line 72 of file ocp.py.

◆ c

c

Definition at line 81 of file ocp.py.

◆ callback

callback = CallBack()

Definition at line 66 of file ocp.py.

◆ cost

cost

Definition at line 82 of file ocp.py.

◆ env

env = Pendulum(1)

Definition at line 13 of file ocp.py.

◆ info

info

Definition at line 81 of file ocp.py.

◆ NSTEPS

int NSTEPS = 50

Definition at line 14 of file ocp.py.

◆ True

True

Definition at line 82 of file ocp.py.

◆ U

U

Definition at line 81 of file ocp.py.

◆ U0

U0 = np.zeros(NSTEPS * env.nu) - env.umax

Definition at line 71 of file ocp.py.

◆ x0

x0 = env.reset().copy()

Definition at line 15 of file ocp.py.