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

robot::ManipulatorJointTrajectory Class Reference

Inheritance diagram for robot::ManipulatorJointTrajectory:

Inheritance graph
[legend]
Collaboration diagram for robot::ManipulatorJointTrajectory:

Collaboration graph
[legend]
List of all members.

Public Types

enum  AngularUnits { Degrees, Radians }
enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }

Public Member Functions

 ManipulatorJointTrajectory (Int numJoints=6, AngularUnits units=Radians)
 default trajectory - all points & times range over [0..1] secs.

 ManipulatorJointTrajectory (const ManipulatorJointTrajectory &t)
 copy trajectory t

 ManipulatorJointTrajectory (const base::Vector &sq, const base::Time &st, const base::Vector &eq, const base::Time &et, AngularUnits units=Radians)
 simple line segment start[joint configuration|time] - end[joint configuration|time]

 ManipulatorJointTrajectory (const array< base::Vector > &qs, const array< base::Time > &times=array< base::Time >(), bool deltas=false, AngularUnits units=Radians)
virtual String className () const
Int getNumJoints () const
 get the number of joints for each trajectory point (dim of qi's)

void setNumJoints (Int numJoints, bool truncateInitial=false)
AngularUnits getAngularUnits () const
void setAngularUnits (AngularUnits units)
void convertComponentUnits (array< Int > components, AngularUnits units=Radians)
base::Vector q (const base::Time &t) const
 get joint-configuration at time t

base::Time time (Real s) const
 get time at s:[0..1]

Real distinguishedValue (Int i) const
Int numDistinguishedValues () const
 < number of distinguished s values

void shiftTime (const base::Time &dt)
 shift time by dt

void scaleTime (Real s)
 scale time by s

virtual Real gets (const base::Time &t) const
 get parameter s value at time t

virtual void serialize (base::Serializer &s)
 read or write object state to Serializer

virtual bool formatSupported (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 bool isSameKindAs (const Object &) const
virtual void externalize (Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

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 init (const array< base::Vector > &qs, const array< base::Time > &times, bool deltas)
Int findIndex (Real s) const
virtual void computeSis (Int dof)
 compute si's s.t. s:[0..1] maps to t:[start-time..end-time]


Protected Attributes

array< base::Vector > qs
 joint-configuration 'waypoints'

array< base::Time > times
 corresponding times

array< Real > si
 value of s:[0..1] corresponding to each waypoint.

AngularUnits angUnits
 are the angular elements to be considered as degrees or radians? (NB: there is no interpretation by this class)


Friends

std::ostream & operator<< (std::ostream &out, const ManipulatorJointTrajectory &t)

Detailed Description

Specifies a trajectory through a manipulator's joint-space. Each joint-position vector occurs at a specific time. The parameter s varies over time t:[start-time, end-time].
See also:
base::Trajectory for the equivelent trajectory in 6-space.

Definition at line 45 of file ManipulatorJointTrajectory.


Member Enumeration Documentation

enum robot::ManipulatorJointTrajectory::AngularUnits
 

Enumeration values:
Degrees 
Radians 

Definition at line 48 of file ManipulatorJointTrajectory.

Referenced by getAngularUnits().

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.


Constructor & Destructor Documentation

robot::ManipulatorJointTrajectory::ManipulatorJointTrajectory (  Int  numJoints = 6,
AngularUnits  units = Radians
) 
 

default trajectory - all points & times range over [0..1] secs.

robot::ManipulatorJointTrajectory::ManipulatorJointTrajectory (  const ManipulatorJointTrajectory &  t  ) 
 

copy trajectory t

robot::ManipulatorJointTrajectory::ManipulatorJointTrajectory (  const base::Vector &  sq,
const base::Time &  st,
const base::Vector &  eq,
const base::Time &  et,
AngularUnits  units = Radians
) 
 

simple line segment start[joint configuration|time] - end[joint configuration|time]

robot::ManipulatorJointTrajectory::ManipulatorJointTrajectory (  const array< base::Vector > &  qs,
const array< base::Time > &  times = array< base::Time >(),
bool  deltas = false,
AngularUnits  units = Radians
) 
 

a set of joint configuration 'waypoints' - and their corresponding times. if deltas is true, the arrays are considered to specify the inter-waypoint deltas instead (with the first point/orient being 0)


Member Function Documentation

virtual String robot::ManipulatorJointTrajectory::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 70 of file ManipulatorJointTrajectory.

virtual void robot::ManipulatorJointTrajectory::computeSis (  Int  dof  )  [protected, virtual]
 

compute si's s.t. s:[0..1] maps to t:[start-time..end-time]

void robot::ManipulatorJointTrajectory::convertComponentUnits (  array< Int >  components,
AngularUnits  units = Radians
) 
 

given a set of component indices, this will convert the components of all trajectory points to the specified units if they are not already expressed in those units as indicated by getAngularUnits()

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

Real robot::ManipulatorJointTrajectory::distinguishedValue (  Int  i  )  const [inline]
 

some values of s correspond to distinguished points along a trajectory. the values s=0 and s=1 are always distinguished values. There will be a distinguished value of s for each waypoint. 0 <= i < numDistinguishedValues()

Definition at line 103 of file ManipulatorJointTrajectory.

virtual void base::Externalizable::externalize (  Externalizer &  e,
String  format = "",
Real  version = 1.0
)  const [virtual, inherited]
 

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

Reimplemented in physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::PlatformDescription, robot::RobotDescription, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, and robot::ToolDescription.

virtual void robot::ManipulatorJointTrajectory::externalize (  base::Externalizer &  e,
String  format = "",
Real  version = 1.0
)  [virtual]
 

read or write object state to Externalizer

Implements base::Externalizable.

Int robot::ManipulatorJointTrajectory::findIndex (  Real  s  )  const [protected]
 

virtual bool robot::ManipulatorJointTrajectory::formatSupported (  String  format,
Real  version = 1.0,
ExternalizationType  type = IO
)  const [virtual]
 

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

Implements base::Externalizable.

AngularUnits robot::ManipulatorJointTrajectory::getAngularUnits (   )  const [inline]
 

even though this class doesn't interpret the values of the joint configuration vectors, it can be specified if the angular components are in degrees or radians (although which are angular is unknown to this class). This can be used to convert the appropriate elements when necessary

Definition at line 86 of file ManipulatorJointTrajectory.

References AngularUnits, and angUnits.

Int robot::ManipulatorJointTrajectory::getNumJoints (   )  const [inline]
 

get the number of joints for each trajectory point (dim of qi's)

Definition at line 73 of file ManipulatorJointTrajectory.

virtual Real robot::ManipulatorJointTrajectory::gets (  const base::Time &  t  )  const [virtual]
 

get parameter s value at time t

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.

void robot::ManipulatorJointTrajectory::init (  const array< base::Vector > &  qs,
const array< base::Time > &  times,
bool  deltas
)  [protected]
 

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

Definition at line 47 of file Object.

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

Int robot::ManipulatorJointTrajectory::numDistinguishedValues (   )  const [inline]
 

< number of distinguished s values

Definition at line 105 of file ManipulatorJointTrajectory.

base::Vector robot::ManipulatorJointTrajectory::q (  const base::Time &  t  )  const
 

get joint-configuration at time t

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]
 

void robot::ManipulatorJointTrajectory::scaleTime (  Real  s  ) 
 

scale time by s

virtual void robot::ManipulatorJointTrajectory::serialize (  base::Serializer &  s  )  [virtual]
 

read or write object state to Serializer

Implements base::Serializable.

void robot::ManipulatorJointTrajectory::setAngularUnits (  AngularUnits  units  )  [inline]
 

Definition at line 87 of file ManipulatorJointTrajectory.

References angUnits.

void robot::ManipulatorJointTrajectory::setNumJoints (  Int  numJoints,
bool  truncateInitial = false
) 
 

change the number of joints in the trajectory points. If numJoints is larger than the current dimension, the extra dimensions will have their elements set to 0. If numJoints is smaller than the current, the extra dimension are discarded (additionally if truncateInitial is true, the initial elements are

void robot::ManipulatorJointTrajectory::shiftTime (  const base::Time &  dt  ) 
 

shift time by dt

base::Time robot::ManipulatorJointTrajectory::time (  Real  s  )  const
 

get time at s:[0..1]


Friends And Related Function Documentation

std::ostream& operator<< (  std::ostream &  out,
const ManipulatorJointTrajectory &  t
)  [friend]
 

Definition at line 142 of file ManipulatorJointTrajectory.


Member Data Documentation

AngularUnits robot::ManipulatorJointTrajectory::angUnits [protected]
 

are the angular elements to be considered as degrees or radians? (NB: there is no interpretation by this class)

Definition at line 131 of file ManipulatorJointTrajectory.

Referenced by getAngularUnits(), and setAngularUnits().

array<base::Vector> robot::ManipulatorJointTrajectory::qs [protected]
 

joint-configuration 'waypoints'

Definition at line 127 of file ManipulatorJointTrajectory.

Referenced by robot::operator<<().

array<Real> robot::ManipulatorJointTrajectory::si [protected]
 

value of s:[0..1] corresponding to each waypoint.

Definition at line 129 of file ManipulatorJointTrajectory.

Referenced by robot::operator<<().

array<base::Time> robot::ManipulatorJointTrajectory::times [protected]
 

corresponding times

Definition at line 128 of file ManipulatorJointTrajectory.

Referenced by robot::operator<<().


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