libnifalcon::FalconKinematicStamper Class Reference
[Kinematics Classes]

#include <FalconKinematicStamper.h>

Inherits libnifalcon::FalconKinematic.

Collaboration diagram for libnifalcon::FalconKinematicStamper:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FalconKinematicStamper (bool init_now=true)
 ~FalconKinematicStamper ()
void initialize ()
virtual bool getForces (const boost::array< double, 3 >(&position), const boost::array< double, 3 >(&cart_force), boost::array< int, 3 >(&enc_force))
virtual bool getAngles (boost::array< double, 3 >(&position), boost::array< double, 3 >(&angles))
virtual bool getPosition (boost::array< int, 3 >(&angles), boost::array< double, 3 >(&position))
virtual void getWorkspaceOrigin (boost::array< double, 3 >(&origin))
void FK (const gmtl::Vec3d &theta0, gmtl::Vec3d &pos)
gmtl::Matrix33d jacobian (const StamperKinematicImpl::Angle &angles)
void IK (StamperKinematicImpl::Angle &angles, const gmtl::Vec3d &worldPosition)

Public Attributes

gmtl::Vec3d pos_


Detailed Description

This class is an implementation of the kinematics for a haptic device similar to the Novint Falcon, created by RL Stamper in his PhD Thesis. The thesis is available at

http://docs.nonpolynomial.com/libnifalcon/pdf/StamperThesis.pdf

This implementation was written by Alastair Barrow. The original code is available in the barrow_mechanics example.


Constructor & Destructor Documentation

libnifalcon::FalconKinematicStamper::FalconKinematicStamper ( bool  init_now = true  ) 

Constructor.

Parameters:
init_now If true, runs initialize() function on construction (can block). Defaults to true.
Returns:

libnifalcon::FalconKinematicStamper::~FalconKinematicStamper (  )  [inline]

Destructor

Returns:


Member Function Documentation

void libnifalcon::FalconKinematicStamper::FK ( const gmtl::Vec3d &  theta0,
gmtl::Vec3d &  pos 
)

Implementation of Forward Kinematics equation for kinematics model, by Alastair Barrow

Parameters:
theta0 Vector of joint angles to calculate end effector position from
pos Vector to store calculated cartesian end effector position to
Forward kinematics. Standard Newton-Raphson for linear systems using Jacobian to estimate slope. A small amount of adjustment in the step size is all that is requried to guarentee convergence

bool libnifalcon::FalconKinematicStamper::getAngles ( boost::array< double, 3 > &  position,
boost::array< double, 3 > &  angles 
) [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)

Implements libnifalcon::FalconKinematic.

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

Given a caretesian position (in meters), and force vector (in newtons), return the force values that need to be sent to the firmware. 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.

Implements libnifalcon::FalconKinematic.

bool libnifalcon::FalconKinematicStamper::getPosition ( boost::array< int, 3 > &  angles,
boost::array< double, 3 > &  position 
) [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:
angles 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)

Implements libnifalcon::FalconKinematic.

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

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

Parameters:
origin Array to store values in

Implements libnifalcon::FalconKinematic.

void libnifalcon::FalconKinematicStamper::IK ( StamperKinematicImpl::Angle angles,
const gmtl::Vec3d &  worldPosition 
)

Implementation of Inverse Kinematics equation for kinematics model, by Alastair Barrow

Parameters:
angles Angle structure to store calculated joint angles to
worldPosition Current cartesian position of end effector

void libnifalcon::FalconKinematicStamper::initialize (  ) 

Initializes lookup tables for kinematics (can block)

gmtl::Matrix33d libnifalcon::FalconKinematicStamper::jacobian ( const StamperKinematicImpl::Angle angles  ) 

Implementation of jacobian for kinematics model, by Alastair Barrow

Parameters:
angles Current joint angles
Returns:
Jacobian matrix for calculating forces
The velocity Jacobian where theta=J*Vel and Torque=J'*Force Derivation in a slightly different style to Stamper and may result in a couple of sign changes due to the configuration of the Falcon


Member Data Documentation

Internal position state


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

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