Implements the kinematics for the Katana6M180. More...
#include <kinematics6M180.h>
Classes | |
struct | angles_calc |
struct | position |
structs, type and constants used in inverse kinematics calculation More... | |
Public Member Functions | |
bool | directKinematics (std::vector< double > &aPosition, const std::vector< double > aAngles) |
bool | enc2rad (std::vector< double > &aAngles, const std::vector< int > aEncoders) |
std::vector< double > | getAngMax () |
get angle max | |
std::vector< double > | getAngMin () |
get angle min | |
std::vector< double > | getAngOff () |
get angle offset | |
std::vector< double > | getAngRange () |
get angle range | |
std::vector< double > | getAngStop () |
get angle stop | |
std::vector< int > | getDir () |
get direction | |
std::vector< int > | getEncOff () |
get encoder offset | |
std::vector< int > | getEpc () |
get encoders per cycle | |
std::vector< double > | getLinkLength () |
get link length | |
bool | inverseKinematics (std::vector< double > &aAngles, const std::vector< double > aPosition, const std::vector< double > aStartingAngles) |
Kinematics6M180 () | |
Constructor. | |
bool | rad2enc (std::vector< int > &aEncoders, const std::vector< double > aAngles) |
bool | setAngOff (const std::vector< double > aAngOff) |
set angle offset | |
bool | setAngStop (const std::vector< double > aAngStop) |
set angle stop | |
bool | setLinkLength (const std::vector< double > aLengths) |
set link length | |
~Kinematics6M180 () | |
Destructor. | |
Private Types | |
typedef std::vector< angles_calc > | angles_container |
Private Member Functions | |
bool | angledef (angles_calc &a) const |
bool | AnglePositionTest (const angles_calc &a) const |
void | IK_b1b2costh3_6M180 (angles_calc &a, const position &p) const |
helper functions | |
bool | initialize () |
initialization routine | |
bool | PositionTest6M180 (const angles_calc &a, const position &p) const |
void | thetacomp (angles_calc &a, const position &p_m) const |
Private Attributes | |
std::vector< double > | mAngleOffset |
Angle offset vector [rad]. | |
std::vector< double > | mAngleStop |
Angle stop vector [rad]. | |
std::vector< int > | mEncoderOffset |
Encoder offset vector. | |
std::vector< int > | mEncodersPerCycle |
Encoders per cycle vector. | |
bool | mIsInitialized |
Initialized flag. | |
int | mNumberOfMotors |
Number of motors of the robot. | |
int | mNumberOfSegments |
Number of segments of the robot. | |
std::vector< int > | mRotationDirection |
Rotation direction vector [1|-1]. | |
std::vector< double > | mSegmentLength |
Effector segment lengths vector [m]. | |
Static Private Attributes | |
static const int | cNrOfPossibleSolutions = 8 |
Implements the kinematics for the Katana6M180.
This class implemets the abstract kinematics interface for the Katana6M180
Definition at line 30 of file kinematics6M180.h.
typedef std::vector<angles_calc> AnaGuess::Kinematics6M180::angles_container [private] |
Definition at line 68 of file kinematics6M180.h.
Constructor.
Definition at line 11 of file kinematics6M180.cpp.
Destructor.
Definition at line 15 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::angledef | ( | angles_calc & | a | ) | const [private] |
Definition at line 473 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::AnglePositionTest | ( | const angles_calc & | a | ) | const [private] |
Definition at line 494 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::directKinematics | ( | std::vector< double > & | aPosition, |
const std::vector< double > | aAngles | ||
) | [virtual] |
calculates the direct kinematics
aPosition | empty vector to store the position |
aAngles | the angle vector |
Implements AnaGuess::Kinematics.
Definition at line 140 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::enc2rad | ( | std::vector< double > & | aAngles, |
const std::vector< int > | aEncoders | ||
) | [virtual] |
calculates the angles corresponding to the given encoders
aAngles | empty vector to store the angles |
aEncoders | the encoder vector |
Implements AnaGuess::Kinematics.
Definition at line 125 of file kinematics6M180.cpp.
std::vector< double > AnaGuess::Kinematics6M180::getAngMax | ( | ) | [virtual] |
std::vector< double > AnaGuess::Kinematics6M180::getAngMin | ( | ) | [virtual] |
std::vector< double > AnaGuess::Kinematics6M180::getAngOff | ( | ) | [virtual] |
get angle offset
Implements AnaGuess::Kinematics.
Definition at line 39 of file kinematics6M180.cpp.
std::vector< double > AnaGuess::Kinematics6M180::getAngRange | ( | ) | [virtual] |
std::vector< double > AnaGuess::Kinematics6M180::getAngStop | ( | ) | [virtual] |
std::vector< int > AnaGuess::Kinematics6M180::getDir | ( | ) | [virtual] |
std::vector< int > AnaGuess::Kinematics6M180::getEncOff | ( | ) | [virtual] |
get encoder offset
Implements AnaGuess::Kinematics.
Definition at line 29 of file kinematics6M180.cpp.
std::vector< int > AnaGuess::Kinematics6M180::getEpc | ( | ) | [virtual] |
get encoders per cycle
Implements AnaGuess::Kinematics.
Definition at line 24 of file kinematics6M180.cpp.
std::vector< double > AnaGuess::Kinematics6M180::getLinkLength | ( | ) | [virtual] |
void AnaGuess::Kinematics6M180::IK_b1b2costh3_6M180 | ( | angles_calc & | a, |
const position & | p | ||
) | const [private] |
helper functions
Definition at line 439 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::initialize | ( | ) | [private, virtual] |
initialization routine
Implements AnaGuess::Kinematics.
Definition at line 382 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::inverseKinematics | ( | std::vector< double > & | aAngles, |
const std::vector< double > | aPosition, | ||
const std::vector< double > | aStartingAngles | ||
) | [virtual] |
caltulates the inverse kinematics
aAngles | empty vector to store the angles |
aPosition | the position vector |
aStartingAngles | starting angle vector to find the best (nearest) solution |
NoSolutionException | if no solutios exists |
Implements AnaGuess::Kinematics.
Definition at line 202 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::PositionTest6M180 | ( | const angles_calc & | a, |
const position & | p | ||
) | const [private] |
Definition at line 459 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::rad2enc | ( | std::vector< int > & | aEncoders, |
const std::vector< double > | aAngles | ||
) | [virtual] |
calculates the encoders corresponding to the given angles
aEncoders | empty vector to store the encoders |
aAngles | the angle vector |
Implements AnaGuess::Kinematics.
Definition at line 132 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::setAngOff | ( | const std::vector< double > | aAngOff | ) | [virtual] |
set angle offset
Implements AnaGuess::Kinematics.
Definition at line 100 of file kinematics6M180.cpp.
bool AnaGuess::Kinematics6M180::setAngStop | ( | const std::vector< double > | aAngStop | ) | [virtual] |
bool AnaGuess::Kinematics6M180::setLinkLength | ( | const std::vector< double > | aLengths | ) | [virtual] |
void AnaGuess::Kinematics6M180::thetacomp | ( | angles_calc & | a, |
const position & | p_m | ||
) | const [private] |
Definition at line 448 of file kinematics6M180.cpp.
const int AnaGuess::Kinematics6M180::cNrOfPossibleSolutions = 8 [static, private] |
Definition at line 69 of file kinematics6M180.h.
std::vector<double> AnaGuess::Kinematics6M180::mAngleOffset [private] |
Angle offset vector [rad].
Reimplemented from AnaGuess::Kinematics.
Definition at line 39 of file kinematics6M180.h.
std::vector<double> AnaGuess::Kinematics6M180::mAngleStop [private] |
Angle stop vector [rad].
Reimplemented from AnaGuess::Kinematics.
Definition at line 41 of file kinematics6M180.h.
std::vector<int> AnaGuess::Kinematics6M180::mEncoderOffset [private] |
Encoder offset vector.
Reimplemented from AnaGuess::Kinematics.
Definition at line 45 of file kinematics6M180.h.
std::vector<int> AnaGuess::Kinematics6M180::mEncodersPerCycle [private] |
Encoders per cycle vector.
Reimplemented from AnaGuess::Kinematics.
Definition at line 43 of file kinematics6M180.h.
bool AnaGuess::Kinematics6M180::mIsInitialized [private] |
Initialized flag.
Definition at line 49 of file kinematics6M180.h.
int AnaGuess::Kinematics6M180::mNumberOfMotors [private] |
Number of motors of the robot.
Reimplemented from AnaGuess::Kinematics.
Definition at line 33 of file kinematics6M180.h.
int AnaGuess::Kinematics6M180::mNumberOfSegments [private] |
Number of segments of the robot.
Reimplemented from AnaGuess::Kinematics.
Definition at line 35 of file kinematics6M180.h.
std::vector<int> AnaGuess::Kinematics6M180::mRotationDirection [private] |
Rotation direction vector [1|-1].
Reimplemented from AnaGuess::Kinematics.
Definition at line 47 of file kinematics6M180.h.
std::vector<double> AnaGuess::Kinematics6M180::mSegmentLength [private] |
Effector segment lengths vector [m].
Reimplemented from AnaGuess::Kinematics.
Definition at line 37 of file kinematics6M180.h.