Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends
ecl::WayPoint< JointAngles > Class Template Reference

WayPoint specialisation with joint (motor) angle storage format. More...

#include <waypoint.hpp>

List of all members.

Public Types

typedef Array< double > JointDataArray
 A convenient typedef to the underlying storage array.

Public Member Functions

Array< double > & accelerations ()
 Handle to the joint angle accelerations array.
const Array< double > & accelerations () const
Array< double > & angles ()
 Handle to the joint angle array.
const Array< double > & angles () const
bool approx (const WayPoint< JointAngles > &other, const double &epsilon=0.01)
 Approximately operator for waypoints.
unsigned int dimension () const
 Return the waypoint dimension.
Array< double > & nominalRates ()
 Handle to the nominal angle rates array.
void nominalRates (double nom_rate)
 Configures the nominal rates with a common value.
bool operator!= (const WayPoint< JointAngles > &other) const
 Inequality operator for waypoints.
bool operator== (const WayPoint< JointAngles > &other) const
 Equality operator for waypoints.
Array< double > & rates ()
 Handle to the joint angle rates array.
const Array< double > & rates () const
void redimension (const unsigned int &dimension)
 WayPoint ()
 Default constructor.
 WayPoint (const unsigned int &dimension)
 Configures the waypoint for a specific dimension.
 WayPoint (const WayPoint< JointAngles > &waypoint)
 Copy constructor.
virtual ~WayPoint ()

Public Attributes

Parameter< bool > accelerations_configured
 Accelerations have been configured for this waypoint.
Parameter< double > duration
 Timestamp for this waypoint.
Parameter< std::string > name
 String name identifier.
Parameter< bool > rates_configured
 Rates have been configured for this waypoint.

Private Attributes

JointDataArray angle_accelerations
JointDataArray angle_positions
JointDataArray angle_rates
JointDataArray nominal_rates

Friends

template<typename OutputStream >
OutputStream & operator<< (OutputStream &ostream, WayPoint< JointAngles > &waypoint)
 Streaming output insertion operator for for waypoints.

Detailed Description

template<>
class ecl::WayPoint< JointAngles >

WayPoint specialisation with joint (motor) angle storage format.

This class can be used to store waypoints in joint/motor angle format. It is not especially useful for navigational waypoints, but often the only storage format required for robotic arm tasks. This is intended to be a very light class.

Template Parameters:
N: no. of degrees of freedom for this waypoint.
See also:
WayPoint.

Definition at line 73 of file waypoint.hpp.


Member Typedef Documentation

A convenient typedef to the underlying storage array.

Definition at line 76 of file waypoint.hpp.


Constructor & Destructor Documentation

Default constructor.

Configures the waypoint to be of zero dimension. Make sure you use the redimension function later to set the dimension.

Definition at line 88 of file waypoint.hpp.

ecl::WayPoint< JointAngles >::WayPoint ( const unsigned int &  dimension) [inline]

Configures the waypoint for a specific dimension.

Configuring the waypoint requires setting of many required and optional parameters, some of which are initialised at construction and some of which are later calculated. This is usually beyond the scope of defining a simple constructor (though a very simple configuration is deployed through the alternative constructor here). Consequently, manual configuration must be utilised if you use this constructor:

 Waypoint<JointAngles> waypoint(4);
 waypoint.name("Raised Position");               // String identifier (not req'd).
 waypoint.nominalRates(1.0);                     // Sets a common nominal rate to the next waypoint.
 waypoint.nominalRates << 1.0, 1.0, 0.8, 0.8;     // Sets specific angular rates to the next waypoint.
 waypoint.angles() << 1.57, 1.57, 0, 0;           // Joint angle specification.

Angle rates and accelerations are currently only configured by the interpolation techniques that act on the waypoints. At some stage though, this may change if we want more flexible, higher order interpolating functionalities.

 waypoint.rates() << 1.0, 1.0, 0.5, 0.5;          // Joint angle rates specification.
 waypoint.accelerations() << 0.0, 0.0, 0.0, 0.0;  // Joint angle accelerations specification.
 waypoint.duration(3.00);                        // Useful if you set a nominalRate of 0.0.

Definition at line 120 of file waypoint.hpp.

ecl::WayPoint< JointAngles >::WayPoint ( const WayPoint< JointAngles > &  waypoint) [inline]

Copy constructor.

Parameters:
waypoint
Returns:

Definition at line 137 of file waypoint.hpp.

virtual ecl::WayPoint< JointAngles >::~WayPoint ( ) [inline, virtual]

Definition at line 148 of file waypoint.hpp.


Member Function Documentation

Array<double>& ecl::WayPoint< JointAngles >::accelerations ( ) [inline]

Handle to the joint angle accelerations array.

Supplies a handle to the joint angle accelerations array which can be used to set/modify joint angle acceleration information (can use the comma initialiser).

The joint angle accelerations represent the specified angular acceleration that must be attained as a trajectory moves through this waypoint. It is not always necessary depending on the type of interpolation being used (cubic spline vs quintic spline) and the location of the waypoint in the trajectory (boundary vs internal).

When using this method, the waypoint is flagged as having had its angular accelerations configured.

Note a convenient way to set the information is to use the comma initialiser of the underlying angle array:

 waypoint.accelerations() = 1.0, 1.0, 0, 0;
Returns:
Array<double>& : handle to the joint angle accelerations array.

Definition at line 254 of file waypoint.hpp.

const Array<double>& ecl::WayPoint< JointAngles >::accelerations ( ) const [inline]

The const version of accelerations()

Returns:

Definition at line 262 of file waypoint.hpp.

Array<double>& ecl::WayPoint< JointAngles >::angles ( ) [inline]

Handle to the joint angle array.

Supplies a handle to the joint angle array which can be used to set/modify joint angle information (can use the comma initialiser).

Note a convenient way to set the angle information is to use the comma initialiser of the underlying angle array:

 waypoint.angles() = 1.57, 1.57, 0, 0;
Returns:
Array<double>& : handle to the joint angle array.

Definition at line 186 of file waypoint.hpp.

const Array<double>& ecl::WayPoint< JointAngles >::angles ( ) const [inline]

The const version of angles()

Returns:

Definition at line 191 of file waypoint.hpp.

bool ecl::WayPoint< JointAngles >::approx ( const WayPoint< JointAngles > &  other,
const double &  epsilon = 0.01 
) [inline]

Approximately operator for waypoints.

This is useful as a quick check to see if one waypoint is very similar to another. It returns false if any individual angle difference (not the sum) is greater than the supplied epsilon.

Parameters:
other: the waypoint to check against.
epsilon: approximate to this value of approximateness.
Returns:
bool : true if all angles are approximately equal, false otherwise.

Definition at line 346 of file waypoint.hpp.

unsigned int ecl::WayPoint< JointAngles >::dimension ( ) const [inline]

Return the waypoint dimension.

The number of joints used to compose the waypoint.

Returns:
const unsigned int& the dimension of the waypoint.

Definition at line 160 of file waypoint.hpp.

Array<double>& ecl::WayPoint< JointAngles >::nominalRates ( ) [inline]

Handle to the nominal angle rates array.

Supplies a handle to the nominal rates array which can be used to set/modify the individual nominal rates (can use the comma initialiser).

The nominal rates represent the recommended (which may be ignored by the interpolation method) average angular rate to be used over the ensuing segment until the next waypoint is reached.

Note a convenient way to set the values is to use the comma initialiser of the underlying array:

 waypoint.nominalRates() = 1.00, 1.00, 0.60, 0.60;
Returns:
Array<double>>& : handle to the maximum rates array.

Definition at line 284 of file waypoint.hpp.

void ecl::WayPoint< JointAngles >::nominalRates ( double  nom_rate) [inline]

Configures the nominal rates with a common value.

Configures the nominal angular rate the next segment of each joint to a common value.

Parameters:
nom_rate: the blanket nominal angular rate to set for each joint.

Definition at line 293 of file waypoint.hpp.

bool ecl::WayPoint< JointAngles >::operator!= ( const WayPoint< JointAngles > &  other) const [inline]

Inequality operator for waypoints.

This is useful as a quick check to see if one waypoint doesn't match another.

Parameters:
other: the waypoint to check against.
Returns:
bool : true if not all angles are equal, false otherwise.

Definition at line 326 of file waypoint.hpp.

bool ecl::WayPoint< JointAngles >::operator== ( const WayPoint< JointAngles > &  other) const [inline]

Equality operator for waypoints.

This is useful as a quick check to see if one waypoint doesn't match another.

Parameters:
other: the waypoint to check against.
Returns:
bool : true if all angles are equal, false otherwise.

Definition at line 308 of file waypoint.hpp.

Array<double>& ecl::WayPoint< JointAngles >::rates ( ) [inline]

Handle to the joint angle rates array.

Supplies a handle to the joint angle rates array which can be used to set/modify joint angle rate information (can use the comma initialiser).

The joint angle rates represent the specified angular rate that must be attained as a trajectory moves through this waypoint. It is not always necessary depending on the type of interpolation being used (cubic spline vs quintic spline) and the location of the waypoint in the trajectory (boundary vs internal).

When using this method, the waypoint is flagged as having had its angular rates configured.

Note a convenient way to set the information is to use the comma initialiser of the underlying angle array:

 waypoint.rates() << 1.0, 1.0, 0, 0;

I don't actually really like this - because we've actually got no real guarantee that the lazy bastard outside the class actually configured the values.

Returns:
Array<double>& : handle to the joint angle rates array.

Definition at line 219 of file waypoint.hpp.

const Array<double>& ecl::WayPoint< JointAngles >::rates ( ) const [inline]

The const version of rates().

Returns:

Definition at line 227 of file waypoint.hpp.

void ecl::WayPoint< JointAngles >::redimension ( const unsigned int &  dimension) [inline]
Parameters:
dimension

Definition at line 166 of file waypoint.hpp.


Friends And Related Function Documentation

template<typename OutputStream >
OutputStream& operator<< ( OutputStream &  ostream,
WayPoint< JointAngles > &  waypoint 
) [friend]

Streaming output insertion operator for for waypoints.

Streaming output insertion operator for waypoints.

Template Parameters:
OutputStream: the type of stream being used.
Parameters:
ostream: the output stream being used.
waypoint: the waypoint.
Returns:
OutputStream : the output stream.

Definition at line 392 of file waypoint.hpp.


Member Data Documentation

Accelerations have been configured for this waypoint.

Definition at line 378 of file waypoint.hpp.

Definition at line 383 of file waypoint.hpp.

Definition at line 381 of file waypoint.hpp.

Definition at line 382 of file waypoint.hpp.

Timestamp for this waypoint.

Definition at line 376 of file waypoint.hpp.

String name identifier.

Definition at line 375 of file waypoint.hpp.

Definition at line 384 of file waypoint.hpp.

Rates have been configured for this waypoint.

Definition at line 377 of file waypoint.hpp.


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


ecl_manipulators
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:35:27