libnifalcon  1.0.1
Public Types | Public Member Functions | List of all members
libnifalcon::FalconKinematic Class Referenceabstract

#include <FalconKinematic.h>

+ Inheritance diagram for libnifalcon::FalconKinematic:
+ Collaboration diagram for libnifalcon::FalconKinematic:

Public Types

enum  { FALCON_KINEMATIC_OUT_OF_RANGE = 5000 }
 

Public Member Functions

 FalconKinematic ()
 
virtual ~FalconKinematic ()
 
double getTheta (int encoder_value)
 
virtual bool getAngles (std::array< double, 3 > &position, std::array< double, 3 > &angles)=0
 
virtual bool getPosition (std::array< int, 3 > &encoders, std::array< double, 3 > &position)=0
 
virtual void getWorkspaceOrigin (std::array< double, 3 > &origin)=0
 
virtual bool getForces (const std::array< double, 3 > &position, const std::array< double, 3 > &cart_force, std::array< int, 3 > &enc_force)=0
 
- Public Member Functions inherited from libnifalcon::FalconCore
 FalconCore ()
 
virtual ~FalconCore ()
 
int getErrorCode ()
 

Additional Inherited Members

- Protected Attributes inherited from libnifalcon::FalconCore
int m_errorCode
 

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 ( )
inlinevirtual

Destructor

Member Function Documentation

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

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

Parameters
positionPosition to get the angles for (in cartesian coordinates, meters)
anglesArray 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 std::array< double, 3 > &  position,
const std::array< double, 3 > &  cart_force,
std::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
positionCurrent position of the end effector
cart_forceForce vector to apply to the end effector
enc_forceForce to be sent to the firmware
Returns
true if forces are generated, false otherwise.

Implemented in libnifalcon::FalconKinematicStamper.

virtual bool libnifalcon::FalconKinematic::getPosition ( std::array< int, 3 > &  encoders,
std::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
encodersEncoder values for the 3 legs
positionArray 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_valueEncoder ticks for a leg
Returns
Angle (in degrees) the leg is at
virtual void libnifalcon::FalconKinematic::getWorkspaceOrigin ( std::array< double, 3 > &  origin)
pure virtual

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

Parameters
originArray to store values in

Implemented in libnifalcon::FalconKinematicStamper.


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