#!/usr/bin/env python
"""
@author: Jesse Haviland
"""
import numpy as np
from ropy.robot.Link import Link
[docs]class Prismatic(Link):
"""
A class for prismatic link types
A subclass of the Link class for a prismatic joint: holds all information
related to a robot link such as kinematics parameters, rigid-body inertial
parameters, motor and transmission parameters.
:param theta: kinematic: joint angle
:type theta: float
:param d: kinematic - link offset
:type d: float
:param alpha: kinematic - link twist
:type alpha: float
:param a: kinematic - link length
:type a: float
:param sigma: kinematic - 0 if revolute, 1 if prismatic
:type sigma: int
:param mdh: kinematic - 0 if standard D&H, else 1
:type mdh: int
:param offset: kinematic - joint variable offset
:type offset: float
:param qlim: joint variable limits [min max]
:type qlim: float ndarray(1,2)
:param flip: joint moves in opposite direction
:type flip: bool
:param m: dynamic - link mass
:type m: float
:param r: dynamic - position of COM with respect to link frame
:type r: float ndarray(3)
:param I: dynamic - inertia of link with respect to COM
:type I: float ndarray(3,3)
:param Jm: dynamic - motor inertia
:type Jm: float
:param B: dynamic - motor viscous friction (1x1 or 2x1)
:type B: float
:param Tc: dynamic - motor Coulomb friction (1x2 or 2x1)
:type Tc: float ndarray(2)
:param G: dynamic - gear ratio
:type G: float
:references:
- Robotics, Vision & Control, P. Corke, Springer 2011, Chap 7.
"""
def __init__(
self,
alpha=0.0,
theta=0.0,
a=0.0,
mdh=0.0,
offset=0.0,
qlim=np.zeros(2),
flip=False,
m=0.0,
r=np.zeros(3),
I=np.zeros((3, 3)),
Jm=0.0,
B=0.0,
Tc=np.zeros(2),
G=1.0):
d = 0.0
sigma = 1
super(Prismatic, self).__init__(
d, alpha, theta, a, sigma, mdh, offset,
qlim, flip, m, r, I, Jm, B, Tc, G)