Classes | Functions | Variables
ocp Namespace Reference

Classes

class  CallBack
 

Functions

def cost (U)
 
def 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
 — OCP resolution More...
 
 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 29 of file ocp.py.

Variable Documentation

◆ approx_grad

ocp.approx_grad

Definition at line 81 of file ocp.py.

◆ bounds

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

Definition at line 71 of file ocp.py.

◆ c

ocp.c

Definition at line 80 of file ocp.py.

◆ callback

ocp.callback = CallBack()

Definition at line 66 of file ocp.py.

◆ cost

ocp.cost

Definition at line 81 of file ocp.py.

◆ env

ocp.env = Pendulum(1)

Definition at line 13 of file ocp.py.

◆ info

ocp.info

Definition at line 80 of file ocp.py.

◆ NSTEPS

int ocp.NSTEPS = 50

Definition at line 14 of file ocp.py.

◆ True

ocp.True

Definition at line 81 of file ocp.py.

◆ U

ocp.U

Definition at line 80 of file ocp.py.

◆ U0

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

— OCP resolution

Definition at line 70 of file ocp.py.

◆ x0

ocp.x0 = env.reset().copy()

Definition at line 15 of file ocp.py.



pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:35