libnifalcon::FalconKinematic Class Reference
[Core ClassesKinematics Classes]

#include <FalconKinematic.h>

Inherits libnifalcon::FalconCore.

Inherited by libnifalcon::FalconKinematicStamper.

Collaboration diagram for libnifalcon::FalconKinematic:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { FALCON_KINEMATIC_OUT_OF_RANGE = 5000 }

Public Member Functions

 FalconKinematic ()
virtual ~FalconKinematic ()
double getTheta (int encoder_value)
virtual bool getAngles (boost::array< double, 3 > &position, boost::array< double, 3 > &angles)=0
virtual bool getPosition (boost::array< int, 3 > &encoders, boost::array< double, 3 > &position)=0
virtual void getWorkspaceOrigin (boost::array< double, 3 > &origin)=0
virtual bool getForces (const boost::array< double, 3 > &position, const boost::array< double, 3 > &cart_force, boost::array< int, 3 > &enc_force)=0


Detailed Description

The Kinematic base class provides virtual functions for forward and inverse kinematic functions, as well as utility functions that all kinematics cores can share.

Member Enumeration Documentation

anonymous enum

Enumerator:
FALCON_KINEMATIC_OUT_OF_RANGE  Returned if value requested is out of workspace range


Constructor & Destructor Documentation

libnifalcon::FalconKinematic::FalconKinematic (  )  [inline]

Constructor

virtual libnifalcon::FalconKinematic::~FalconKinematic (  )  [inline, virtual]

Destructor


Member Function Documentation

virtual bool libnifalcon::FalconKinematic::getAngles ( boost::array< double, 3 > &  position,
boost::array< double, 3 > &  angles 
) [pure virtual]

Given a caretesian position (in meters), return the angle of the legs requires to achieve the positions

Parameters:
position Position to get the angles for (in cartesian coordinates, meters)
angles Array to write result into
Returns:
true if angles are found, false otherwise (i.e. position out of workspace range)

Implemented in libnifalcon::FalconKinematicStamper.

virtual bool libnifalcon::FalconKinematic::getForces ( const boost::array< double, 3 > &  position,
const boost::array< double, 3 > &  cart_force,
boost::array< int, 3 > &  enc_force 
) [pure virtual]

Given a caretesian position (in meters), and force vector (in newtons), return the force values that need to be sent to the firmware. Force values are capped at 4096.

Parameters:
position Current position of the end effector
cart_force Force vector to apply to the end effector
enc_force Force to be sent to the firmware
Returns:
true if forces are generated, false otherwise.

Implemented in libnifalcon::FalconKinematicStamper.

virtual bool libnifalcon::FalconKinematic::getPosition ( boost::array< int, 3 > &  encoders,
boost::array< double, 3 > &  position 
) [pure virtual]

Given a set of encoder values, return the cartesian position (in meters) of the end effector in relation to the origin. Note: Origin subject to change based on kinematics system. Use the workspaceOrigin() function to get what the system thinks its origin is.

Parameters:
encoders Encoder values for the 3 legs
position Array to write result into
Returns:
true if angles are found, false otherwise (i.e. position out of workspace range)

Implemented in libnifalcon::FalconKinematicStamper.

double libnifalcon::FalconKinematic::getTheta ( int  encoder_value  )  [inline]

Given an encoder value, return the angle (in degrees) the leg is at (in the leg's local reference frame)

Parameters:
encoder_value Encoder ticks for a leg
Returns:
Angle (in degrees) the leg is at

virtual void libnifalcon::FalconKinematic::getWorkspaceOrigin ( boost::array< double, 3 > &  origin  )  [pure virtual]

Returns the center point of the workspace. May not always be [0,0,0].

Parameters:
origin Array to store values in

Implemented in libnifalcon::FalconKinematicStamper.


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

Generated on Sun Sep 20 12:24:30 2009 for libnifalcon by  doxygen 1.5.9