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

Public Member Functions

 __init__ (self, nbJoint=1)
 
 createPendulum (self, nbJoint, rootId=0, prefix="", jointPlacement=None)
 
 display (self, q)
 
 dynamics (self, x, u, display=False)
 
 nobs (self)
 
 nq (self)
 
 nu (self)
 
 nv (self)
 
 nx (self)
 
 obs (self, x)
 
 render (self)
 
 reset (self, x0=None)
 
 step (self, u)
 
 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__()

__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()

createPendulum (   self,
  nbJoint,
  rootId = 0,
  prefix = "",
  jointPlacement = None 
)

Definition at line 75 of file pendulum.py.

◆ display()

display (   self,
  q 
)

Definition at line 127 of file pendulum.py.

◆ dynamics()

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()

nobs (   self)

Definition at line 146 of file pendulum.py.

◆ nq()

nq (   self)

Definition at line 134 of file pendulum.py.

◆ nu()

nu (   self)

Definition at line 150 of file pendulum.py.

◆ nv()

nv (   self)

Definition at line 138 of file pendulum.py.

◆ nx()

nx (   self)

Definition at line 142 of file pendulum.py.

◆ obs()

obs (   self,
  x 
)

Definition at line 168 of file pendulum.py.

◆ render()

render (   self)

Definition at line 222 of file pendulum.py.

◆ reset()

reset (   self,
  x0 = None 
)

Definition at line 153 of file pendulum.py.

◆ step()

step (   self,
  u 
)

Definition at line 163 of file pendulum.py.

◆ tip()

tip (   self,
  q 
)
Return the altitude of pendulum tip

Definition at line 177 of file pendulum.py.

Member Data Documentation

◆ data

data

Definition at line 64 of file pendulum.py.

◆ DT

DT

Definition at line 68 of file pendulum.py.

◆ Kf

Kf

Definition at line 70 of file pendulum.py.

◆ model

model

Definition at line 62 of file pendulum.py.

◆ NDT

NDT

Definition at line 69 of file pendulum.py.

◆ q0

q0

Definition at line 66 of file pendulum.py.

◆ r

r

Definition at line 160 of file pendulum.py.

◆ umax

umax

Definition at line 72 of file pendulum.py.

◆ viewer

viewer

Definition at line 60 of file pendulum.py.

◆ visuals

visuals

Definition at line 61 of file pendulum.py.

◆ vmax

vmax

Definition at line 71 of file pendulum.py.

◆ withSinCos

withSinCos

Definition at line 73 of file pendulum.py.

◆ x

x

Definition at line 159 of file pendulum.py.


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