Classes | Functions | Variables
cartpole Namespace Reference

Classes

class  CartpoleDynamics
 
class  PinocchioCasadi
 

Functions

def integrate_no_control (x0, nsteps)
 
def make_cartpole (ub=True)
 

Variables

 a0 = cartpole.acc_func(q0, v, u)
 
 cartpole = CartpoleDynamics(timestep=dt)
 
float dt = 0.02
 
 model = cartpole.model
 
 q0 = np.array([0.0, 0.95, 0.01])
 
 q_trajectory
 
def qs_ = states_[: model.nq, :].T
 
def states_ = integrate_no_control(x0, nsteps=400)
 
 u = np.zeros(1)
 
 v = np.zeros(model.nv)
 
 viz
 
 x0 = np.append(q0, v)
 
 xnext = cartpole.forward(x0, u)
 

Function Documentation

◆ integrate_no_control()

def cartpole.integrate_no_control (   x0,
  nsteps 
)

Definition at line 163 of file cartpole.py.

◆ make_cartpole()

def cartpole.make_cartpole (   ub = True)

Definition at line 11 of file cartpole.py.

Variable Documentation

◆ a0

cartpole.a0 = cartpole.acc_func(q0, v, u)

Definition at line 155 of file cartpole.py.

◆ cartpole

cartpole.cartpole = CartpoleDynamics(timestep=dt)

Definition at line 146 of file cartpole.py.

◆ dt

cartpole.dt = 0.02

Definition at line 145 of file cartpole.py.

◆ model

cartpole.model = cartpole.model

Definition at line 147 of file cartpole.py.

◆ q0

cartpole.q0 = np.array([0.0, 0.95, 0.01])

Definition at line 151 of file cartpole.py.

◆ q_trajectory

cartpole.q_trajectory

Definition at line 186 of file cartpole.py.

◆ qs_

cartpole.qs_ = states_[: model.nq, :].T

Definition at line 185 of file cartpole.py.

◆ states_

cartpole.states_ = integrate_no_control(x0, nsteps=400)

Definition at line 172 of file cartpole.py.

◆ u

cartpole.u = np.zeros(1)

Definition at line 154 of file cartpole.py.

◆ v

cartpole.v = np.zeros(model.nv)

Definition at line 153 of file cartpole.py.

◆ viz

cartpole.viz
Initial value:
1 = MeshcatVisualizer(
2  model=model,
3  collision_model=cartpole.collision_model,
4  visual_model=cartpole.visual_model,
5  )

Definition at line 176 of file cartpole.py.

◆ x0

cartpole.x0 = np.append(q0, v)

Definition at line 159 of file cartpole.py.

◆ xnext

cartpole.xnext = cartpole.forward(x0, u)

Definition at line 160 of file cartpole.py.



pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:14