Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

robot::KinematicChain::Link Class Reference

Parameters for a single joint. More...

Inheritance diagram for robot::KinematicChain::Link:

Inheritance graph
[legend]
Collaboration diagram for robot::KinematicChain::Link:

Collaboration graph
[legend]
List of all members.

Public Types

enum  LinkType { FixedTransform, Prismatic, Revolute, Translating }
enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }

Public Member Functions

 Link ()
 Link (const Link &j)
 Link (LinkType type, Real alpha, Real a, Real d, Real theta, Real minLimit=KinematicChain::unboundedMinAngleLimit, Real maxLimit=KinematicChain::unboundedMaxAngleLimit, Real minAccel=0, Real maxAccel=0, bool active=true)
 Link (const Vector3 &direction, Real t, Real minLimit=KinematicChain::unboundedMinDistLimit, Real maxLimit=KinematicChain::unboundedMaxDistLimit, Real minAccel=0, Real maxAccel=0, bool active=true)
 Link (const Matrix4 &fixedTransform)
 ~Link ()
virtual String className () const
Linkoperator= (const Link &l)
LinkType type () const
bool isActive () const
bool isDHType () const
Int dof () const
 the number of degrees-of-freedom present in this link's joint (0 if no joint)

UnitType dofUnitType (Int dof=0) const
Matrix kinematicTransform (const base::Vector &q) const
 the forward kinematic transform for this link, with variable parameter values q (dim q must be link.dof())

Real getAlpha () const
 get twist angle (const) (radians)

Real getA () const
 get link length (const)

Real getD () const
 get distance between links (home pos)

Real getTheta () const
 get angle between links (home pos) (radians)

void setAlpha (Real alpha)
void setA (Real a)
void setD (Real d)
void setTheta (Real theta)
Vector3 getDirection () const
 get direction along which the joint translates by the variable distance

Real getT () const
 get distance to translate along direction (home pos)

void setDirection (const Vector3 &dir)
void setT (Real t)
Matrix4 getTransform () const
 FixedTransform links.

void setTransform (const Matrix4 &transform)
Real variable (Int dof=0) const
Real minLimit (Int dof=0) const
Real maxLimit (Int dof=0) const
Real minAccel (Int dof=0) const
Real maxAccel (Int dof=0) const
bool operator== (const Link &l) const
bool operator!= (const Link &l) const
virtual void serialize (base::Serializer &s)
 read or write object state to Serializer

virtual bool formatSupported (const String format, Real version=1.0, ExternalizationType type=IO) const
 < query if specific format is supported (for input, output or both)

virtual void externalize (base::Externalizer &e, String format="", Real version=1.0)
 read or write object state to Externalizer

virtual void externalize (base::Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

virtual base::array< base::BytehashCode () const
virtual bool isSameKindAs (const Object &) const
void load (ref< VFile > archive, const String &format="", Real version=1.0)
void save (ref< VFile > archive, const String &format="", Real version=1.0)

Static Public Member Functions

template<class BaseClass, class DerivedClass> void registerSerializableInstantiator (const SerializableInstantiator &instantiator)
void registerSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName, const SerializableInstantiator &instantiator)
template<class BaseClass> const SerializableInstantiator & getSerializableInstantiator (const String &derivedClassTypeName)
const SerializableInstantiator & getSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName)

Protected Member Functions

void dirtyHash () const

Protected Attributes

Real alpha
 twist angle (const) (radians)

Real a
 link length (const)

Real d
 distance between links (home pos)

Real theta
 angle between links (home pos) (radians)

Vector3 direction
 direction along which the joint translates by the variable distance

Real t
 distance to translate along direction (home pos)

Matrix4 transform
 FixedTransform.

Real jminLimit
Real jmaxLimit
 joint limits

Real jminAccel
Real jmaxAccel
 joint acceleration limits

LinkType linkType
bool active
 an inactive link's joints can't move

String frameName
 reference frame name of this link, or "" if unknown/unnamed

bool hashDirty
array< base::Bytehash

Friends

class KinematicChain

Detailed Description

Parameters for a single joint.

Definition at line 62 of file KinematicChain.


Member Enumeration Documentation

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.

enum robot::KinematicChain::Link::LinkType
 

FixedTransform - link described by a 4x4 matrix transform, no joint Prismatic - link with a 1-dof D-H type joint that transltes along the joint z-axis (varies the d parameter) Revolute - link with a 1-dof D-H type joint that rotates about the joint z-axis (varies the theta parameter) Translating - link with a 1-dof joint that translates along the specified direction vector

Enumeration values:
FixedTransform 
Prismatic 
Revolute 
Translating 

Definition at line 69 of file KinematicChain.

Referenced by type().


Constructor & Destructor Documentation

robot::KinematicChain::Link::Link  )  [inline]
 

Definition at line 76 of file KinematicChain.

References hashDirty, jmaxAccel, jmaxLimit, jminAccel, jminLimit, linkType, and Revolute.

robot::KinematicChain::Link::Link const Link j  )  [inline]
 

Definition at line 81 of file KinematicChain.

References hashDirty, jmaxAccel, jmaxLimit, jminAccel, jminLimit, and linkType.

robot::KinematicChain::Link::Link LinkType  type,
Real  alpha,
Real  a,
Real  d,
Real  theta,
Real  minLimit = KinematicChain::unboundedMinAngleLimit,
Real  maxLimit = KinematicChain::unboundedMaxAngleLimit,
Real  minAccel = 0,
Real  maxAccel = 0,
bool  active = true
[inline]
 

Definition at line 86 of file KinematicChain.

References dofUnitType(), hashDirty, jmaxAccel, jmaxLimit, jminAccel, jminLimit, linkType, maxLimit(), and minLimit().

robot::KinematicChain::Link::Link const Vector3 direction,
Real  t,
Real  minLimit = KinematicChain::unboundedMinDistLimit,
Real  maxLimit = KinematicChain::unboundedMaxDistLimit,
Real  minAccel = 0,
Real  maxAccel = 0,
bool  active = true
[inline]
 

Definition at line 102 of file KinematicChain.

References hashDirty, jmaxAccel, jmaxLimit, jminAccel, jminLimit, linkType, maxLimit(), minLimit(), and Translating.

robot::KinematicChain::Link::Link const Matrix4 fixedTransform  )  [inline]
 

Definition at line 111 of file KinematicChain.

References FixedTransform, hashDirty, and linkType.

robot::KinematicChain::Link::~Link  )  [inline]
 

Definition at line 115 of file KinematicChain.


Member Function Documentation

virtual String robot::KinematicChain::Link::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Definition at line 117 of file KinematicChain.

void robot::KinematicChain::Link::dirtyHash  )  const [inline, protected]
 

Definition at line 223 of file KinematicChain.

References hashDirty.

Referenced by serialize(), setA(), setAlpha(), setD(), setDirection(), setT(), setTheta(), and setTransform().

Int robot::KinematicChain::Link::dof  )  const [inline]
 

the number of degrees-of-freedom present in this link's joint (0 if no joint)

Definition at line 126 of file KinematicChain.

References isDHType(), linkType, and Translating.

Referenced by variable().

UnitType robot::KinematicChain::Link::dofUnitType Int  dof = 0  )  const [inline]
 

Definition at line 128 of file KinematicChain.

References isDHType(), linkType, and Revolute.

Referenced by Link(), and robot::KinematicChain::variableUnitType().

virtual void robot::KinematicChain::Link::externalize base::Externalizer e,
String  format = "",
Real  version = 1.0
const [inline, virtual]
 

write object state to Externalizer (throws if e is in Input)

Reimplemented from base::Externalizable.

Definition at line 192 of file KinematicChain.

virtual void robot::KinematicChain::Link::externalize base::Externalizer e,
String  format = "",
Real  version = 1.0
[virtual]
 

read or write object state to Externalizer

Implements base::Externalizable.

virtual bool robot::KinematicChain::Link::formatSupported const String  format,
Real  version = 1.0,
ExternalizationType  type = IO
const [inline, virtual]
 

< query if specific format is supported (for input, output or both)

Implements base::Externalizable.

Definition at line 189 of file KinematicChain.

Real robot::KinematicChain::Link::getA  )  const [inline]
 

get link length (const)

Definition at line 136 of file KinematicChain.

Referenced by robot::operator<<().

Real robot::KinematicChain::Link::getAlpha  )  const [inline]
 

get twist angle (const) (radians)

Definition at line 135 of file KinematicChain.

Referenced by robot::operator<<().

Real robot::KinematicChain::Link::getD  )  const [inline]
 

get distance between links (home pos)

Definition at line 137 of file KinematicChain.

Referenced by robot::operator<<().

Vector3 robot::KinematicChain::Link::getDirection  )  const [inline]
 

get direction along which the joint translates by the variable distance

Definition at line 146 of file KinematicChain.

Referenced by robot::operator<<().

const SerializableInstantiator& base::Serializable::getSerializableInstantiator const String baseClassTypeName,
const String derivedClassTypeName
[static, inherited]
 

template<class BaseClass>
const SerializableInstantiator& base::Serializable::getSerializableInstantiator const String derivedClassTypeName  )  [inline, static, inherited]
 

Definition at line 71 of file Serializable.

References base::String.

Real robot::KinematicChain::Link::getT  )  const [inline]
 

get distance to translate along direction (home pos)

Definition at line 147 of file KinematicChain.

Referenced by robot::operator<<().

Real robot::KinematicChain::Link::getTheta  )  const [inline]
 

get angle between links (home pos) (radians)

Definition at line 138 of file KinematicChain.

Referenced by robot::operator<<().

Matrix4 robot::KinematicChain::Link::getTransform  )  const [inline]
 

FixedTransform links.

Definition at line 153 of file KinematicChain.

Referenced by robot::operator<<().

virtual base::array<base::Byte> robot::KinematicChain::Link::hashCode  )  const [virtual]
 

Whenever invoked on the same object more than once, the same byte array must be returned, provided no information used in == comparisons on the object is modified.

Implements base::Hashable.

bool robot::KinematicChain::Link::isActive  )  const [inline]
 

Definition at line 122 of file KinematicChain.

Referenced by robot::operator<<().

bool robot::KinematicChain::Link::isDHType  )  const [inline]
 

Definition at line 123 of file KinematicChain.

References linkType, Prismatic, and Revolute.

Referenced by dof(), dofUnitType(), and variable().

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

Matrix robot::KinematicChain::Link::kinematicTransform const base::Vector q  )  const
 

the forward kinematic transform for this link, with variable parameter values q (dim q must be link.dof())

void base::Externalizable::load ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

Real robot::KinematicChain::Link::maxAccel Int  dof = 0  )  const [inline]
 

Definition at line 169 of file KinematicChain.

References jmaxAccel.

Referenced by robot::KinematicChain::variableMaxAccel().

Real robot::KinematicChain::Link::maxLimit Int  dof = 0  )  const [inline]
 

Definition at line 167 of file KinematicChain.

References jmaxLimit.

Referenced by Link(), and robot::KinematicChain::variableMaxLimit().

Real robot::KinematicChain::Link::minAccel Int  dof = 0  )  const [inline]
 

Definition at line 168 of file KinematicChain.

References jminAccel.

Referenced by robot::KinematicChain::variableMinAccel().

Real robot::KinematicChain::Link::minLimit Int  dof = 0  )  const [inline]
 

Definition at line 166 of file KinematicChain.

References jminLimit.

Referenced by Link(), and robot::KinematicChain::variableMinLimit().

bool robot::KinematicChain::Link::operator!= const Link l  )  const [inline]
 

Definition at line 172 of file KinematicChain.

Link& robot::KinematicChain::Link::operator= const Link l  ) 
 

bool robot::KinematicChain::Link::operator== const Link l  )  const
 

void base::Serializable::registerSerializableInstantiator const String baseClassTypeName,
const String derivedClassTypeName,
const SerializableInstantiator instantiator
[static, inherited]
 

template<class BaseClass, class DerivedClass>
void base::Serializable::registerSerializableInstantiator const SerializableInstantiator instantiator  )  [inline, static, inherited]
 

Definition at line 62 of file Serializable.

void base::Externalizable::save ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

virtual void robot::KinematicChain::Link::serialize base::Serializer s  )  [inline, virtual]
 

read or write object state to Serializer

Implements base::Serializable.

Definition at line 174 of file KinematicChain.

References dirtyHash(), base::Serializer::isInput(), jmaxAccel, jmaxLimit, jminAccel, jminLimit, linkType, and Translating.

void robot::KinematicChain::Link::setA Real  a  )  [inline]
 

Definition at line 141 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setAlpha Real  alpha  )  [inline]
 

Definition at line 140 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setD Real  d  )  [inline]
 

Definition at line 142 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setDirection const Vector3 dir  )  [inline]
 

Definition at line 149 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setT Real  t  )  [inline]
 

Definition at line 150 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setTheta Real  theta  )  [inline]
 

Definition at line 143 of file KinematicChain.

References dirtyHash().

void robot::KinematicChain::Link::setTransform const Matrix4 transform  )  [inline]
 

Definition at line 154 of file KinematicChain.

References dirtyHash().

LinkType robot::KinematicChain::Link::type  )  const [inline]
 

Definition at line 121 of file KinematicChain.

References linkType, and LinkType.

Referenced by robot::operator<<().

Real robot::KinematicChain::Link::variable Int  dof = 0  )  const [inline]
 

Definition at line 157 of file KinematicChain.

References Assert, dof(), Exception, isDHType(), linkType, Revolute, and Translating.


Friends And Related Function Documentation

friend class KinematicChain [friend]
 

Definition at line 225 of file KinematicChain.


Member Data Documentation

Real robot::KinematicChain::Link::a [protected]
 

link length (const)

Definition at line 202 of file KinematicChain.

bool robot::KinematicChain::Link::active [protected]
 

an inactive link's joints can't move

Definition at line 217 of file KinematicChain.

Real robot::KinematicChain::Link::alpha [protected]
 

twist angle (const) (radians)

Definition at line 201 of file KinematicChain.

Real robot::KinematicChain::Link::d [protected]
 

distance between links (home pos)

Definition at line 203 of file KinematicChain.

Vector3 robot::KinematicChain::Link::direction [protected]
 

direction along which the joint translates by the variable distance

Definition at line 207 of file KinematicChain.

String robot::KinematicChain::Link::frameName [protected]
 

reference frame name of this link, or "" if unknown/unnamed

Definition at line 219 of file KinematicChain.

array<base::Byte> robot::KinematicChain::Link::hash [mutable, protected]
 

Definition at line 222 of file KinematicChain.

bool robot::KinematicChain::Link::hashDirty [mutable, protected]
 

Definition at line 221 of file KinematicChain.

Referenced by dirtyHash(), and Link().

Real robot::KinematicChain::Link::jmaxAccel [protected]
 

joint acceleration limits

Definition at line 214 of file KinematicChain.

Referenced by Link(), maxAccel(), and serialize().

Real robot::KinematicChain::Link::jmaxLimit [protected]
 

joint limits

Definition at line 213 of file KinematicChain.

Referenced by Link(), maxLimit(), and serialize().

Real robot::KinematicChain::Link::jminAccel [protected]
 

Definition at line 214 of file KinematicChain.

Referenced by Link(), minAccel(), and serialize().

Real robot::KinematicChain::Link::jminLimit [protected]
 

Definition at line 213 of file KinematicChain.

Referenced by Link(), minLimit(), and serialize().

LinkType robot::KinematicChain::Link::linkType [protected]
 

Definition at line 216 of file KinematicChain.

Referenced by dof(), dofUnitType(), isDHType(), Link(), serialize(), type(), and variable().

Real robot::KinematicChain::Link::t [protected]
 

distance to translate along direction (home pos)

Definition at line 208 of file KinematicChain.

Real robot::KinematicChain::Link::theta [protected]
 

angle between links (home pos) (radians)

Definition at line 204 of file KinematicChain.

Matrix4 robot::KinematicChain::Link::transform [protected]
 

FixedTransform.

Definition at line 211 of file KinematicChain.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:41:54 2004 for OpenSim by doxygen 1.3.6