#include <FalconKinematic.h>
Inherits libnifalcon::FalconCore.
Inherited by libnifalcon::FalconKinematicStamper.
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 |
anonymous enum |
libnifalcon::FalconKinematic::FalconKinematic | ( | ) | [inline] |
Constructor
virtual libnifalcon::FalconKinematic::~FalconKinematic | ( | ) | [inline, virtual] |
Destructor
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
position | Position to get the angles for (in cartesian coordinates, meters) | |
angles | Array to write result into |
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.
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 |
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.
encoders | Encoder values for the 3 legs | |
position | Array to write result into |
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)
encoder_value | Encoder ticks for a leg |
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].
origin | Array to store values in |
Implemented in libnifalcon::FalconKinematicStamper.