Public Member Functions | Public Attributes | List of all members
pendulum.Pendulum Class Reference

Public Member Functions

def __init__ (self, nbJoint=1)
 
def createPendulum (self, nbJoint, rootId=0, prefix="", jointPlacement=None)
 
def display (self, q)
 
def dynamics (self, x, u, display=False)
 
def nobs (self)
 
def nq (self)
 
def nu (self)
 
def nv (self)
 
def nx (self)
 
def obs (self, x)
 
def render (self)
 
def reset (self, x0=None)
 
def step (self, u)
 
def tip (self, q)
 

Public Attributes

 data
 
 DT
 
 Kf
 
 model
 
 NDT
 
 q0
 
 r
 
 umax
 
 viewer
 
 visuals
 
 vmax
 
 withSinCos
 
 x
 

Detailed Description

Define a class Robot with 7DOF (shoulder=3 + elbow=1 + wrist=3).
The configuration is nq=7. The velocity is the same.
The members of the class are:
* viewer: a display encapsulating a gepetto viewer client to create 3D objects and
  place them.
* model: the kinematic tree of the robot.
* data: the temporary variables to be used by the kinematic algorithms.
* visuals: the list of all the 'visual' 3D objects to render the robot, each element
  of the list being an object Visual (see above).

See tp1.py for an example of use.

Definition at line 43 of file pendulum.py.

Constructor & Destructor Documentation

◆ __init__()

def pendulum.Pendulum.__init__ (   self,
  nbJoint = 1 
)
Create a Pinocchio model of a N-pendulum, with N the argument <nbJoint>.

Definition at line 58 of file pendulum.py.

Member Function Documentation

◆ createPendulum()

def pendulum.Pendulum.createPendulum (   self,
  nbJoint,
  rootId = 0,
  prefix = "",
  jointPlacement = None 
)

Definition at line 75 of file pendulum.py.

◆ display()

def pendulum.Pendulum.display (   self,
  q 
)

Definition at line 127 of file pendulum.py.

◆ dynamics()

def pendulum.Pendulum.dynamics (   self,
  x,
  u,
  display = False 
)
Dynamic function: x,u -> xnext=f(x,y).
Put the result in x (the initial value is destroyed).
Also compute the cost of making this step.
Return x for convenience along with the cost.

Definition at line 182 of file pendulum.py.

◆ nobs()

def pendulum.Pendulum.nobs (   self)

Definition at line 146 of file pendulum.py.

◆ nq()

def pendulum.Pendulum.nq (   self)

Definition at line 134 of file pendulum.py.

◆ nu()

def pendulum.Pendulum.nu (   self)

Definition at line 150 of file pendulum.py.

◆ nv()

def pendulum.Pendulum.nv (   self)

Definition at line 138 of file pendulum.py.

◆ nx()

def pendulum.Pendulum.nx (   self)

Definition at line 142 of file pendulum.py.

◆ obs()

def pendulum.Pendulum.obs (   self,
  x 
)

Definition at line 168 of file pendulum.py.

◆ render()

def pendulum.Pendulum.render (   self)

Definition at line 222 of file pendulum.py.

◆ reset()

def pendulum.Pendulum.reset (   self,
  x0 = None 
)

Definition at line 153 of file pendulum.py.

◆ step()

def pendulum.Pendulum.step (   self,
  u 
)

Definition at line 163 of file pendulum.py.

◆ tip()

def pendulum.Pendulum.tip (   self,
  q 
)
Return the altitude of pendulum tip

Definition at line 177 of file pendulum.py.

Member Data Documentation

◆ data

pendulum.Pendulum.data

Definition at line 64 of file pendulum.py.

◆ DT

pendulum.Pendulum.DT

Definition at line 68 of file pendulum.py.

◆ Kf

pendulum.Pendulum.Kf

Definition at line 70 of file pendulum.py.

◆ model

pendulum.Pendulum.model

Definition at line 62 of file pendulum.py.

◆ NDT

pendulum.Pendulum.NDT

Definition at line 69 of file pendulum.py.

◆ q0

pendulum.Pendulum.q0

Definition at line 66 of file pendulum.py.

◆ r

pendulum.Pendulum.r

Definition at line 160 of file pendulum.py.

◆ umax

pendulum.Pendulum.umax

Definition at line 72 of file pendulum.py.

◆ viewer

pendulum.Pendulum.viewer

Definition at line 60 of file pendulum.py.

◆ visuals

pendulum.Pendulum.visuals

Definition at line 61 of file pendulum.py.

◆ vmax

pendulum.Pendulum.vmax

Definition at line 71 of file pendulum.py.

◆ withSinCos

pendulum.Pendulum.withSinCos

Definition at line 73 of file pendulum.py.

◆ x

pendulum.Pendulum.x

Definition at line 159 of file pendulum.py.


The documentation for this class was generated from the following file:


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:51