Public Member Functions | |
def | __init__ (self, nbJoint=1) |
def | createPendulum (self, nbJoint, rootId=0, prefix='', jointPlacement=None) |
def | display (self, q) |
def | nq (self) |
def | nv (self) |
def | nx (self) |
def | nobs (self) |
def | nu (self) |
def | reset (self, x0=None) |
def | step (self, u) |
def | obs (self, x) |
def | tip (self, q) |
def | dynamics (self, x, u, display=False) |
def | render (self) |
Public Attributes | |
viewer | |
visuals | |
model | |
data | |
q0 | |
DT | |
NDT | |
Kf | |
vmax | |
umax | |
withSinCos | |
x | |
r | |
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 41 of file pendulum.py.
def __init__ | ( | self, | |
nbJoint = 1 |
|||
) |
Create a Pinocchio model of a N-pendulum, with N the argument <nbJoint>.
Definition at line 55 of file pendulum.py.
References Pendulum.createPendulum(), MobileRobotWrapper.data, Pendulum.data, Pendulum.DT, DPendulum.dynamics(), Pendulum.dynamics(), se3.forwardKinematics(), Pendulum.Kf, Pendulum.model, Pendulum.NDT, Model.nq, Pendulum.nq(), DPendulum.nu(), Pendulum.nu(), Model.nv, Pendulum.nv(), FactorGraph.nx, DPendulum.nx(), Pendulum.nx(), Pendulum.obs(), Pendulum.q0, Pendulum.r, Pendulum.umax, Display.viewer, Pendulum.viewer, Pendulum.visuals, Pendulum.vmax, Pendulum.withSinCos, QValueNetwork.x, DPendulum.x, PolicyNetwork.x, ReplayItem.x, and Pendulum.x.
def 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 145 of file pendulum.py.
References se3.computeAllTerms(), MobileRobotWrapper.data, Pendulum.data, MobileRobotWrapper.display(), Pendulum.display(), Pendulum.DT, Pendulum.Kf, Pendulum.model, Pendulum.NDT, Model.nq, Pendulum.nq(), DPendulum.nu(), Pendulum.nu(), Pendulum.umax, Pendulum.vmax, QValueNetwork.x, DPendulum.x, PolicyNetwork.x, ReplayItem.x, and Pendulum.x.
Referenced by Pendulum.__init__().
def tip | ( | self, | |
q | |||
) |
Return the altitude of pendulum tip
Definition at line 140 of file pendulum.py.
References MobileRobotWrapper.data, Pendulum.data, and Pendulum.model.