versor
3.0
C++11 library for Geometric algebra
|
The bennett 4 bar linkage. More...
#include <vsr_linkages.h>
Public Member Functions | |
Bennett (VSR_PRECISION theta, VSR_PRECISION lengthA, VSR_PRECISION lengthB) | |
Bennett (VSR_PRECISION theta, VSR_PRECISION lengthA, VSR_PRECISION lengthB, VSR_PRECISION offset) | |
void | set (VSR_PRECISION theta, VSR_PRECISION lengthA, VSR_PRECISION lengthB, VSR_PRECISION offset=0.0) |
void | init () |
VSR_PRECISION | lengthA () const |
VSR_PRECISION | lengthB () const |
VSR_PRECISION & | lengthA () |
VSR_PRECISION & | lengthB () |
VSR_PRECISION | offsetA () const |
VSR_PRECISION | offsetB () const |
VSR_PRECISION & | offsetA () |
VSR_PRECISION & | offsetB () |
VSR_PRECISION | theta () const |
VSR_PRECISION | phi () const |
Circle | circleMeet () |
Meet of 1st and 3rd spheres of possibilities. | |
Pair | pairMeet () |
Circle | orbit () |
Bennett & | operator() (VSR_PRECISION amt) |
Bennett | linkRatio (VSR_PRECISION th, VSR_PRECISION a=.5, VSR_PRECISION b=.5, VSR_PRECISION la=0, VSR_PRECISION lb=0) |
A linked Bennett mechanism, determined by ratio of original. | |
Bennett | linkAt (int N=2, VSR_PRECISION th=1, VSR_PRECISION a=.5, VSR_PRECISION b=.5, VSR_PRECISION la=0, VSR_PRECISION lb=0) |
A linked Bennett mechanism at joint N determined by ratio of original We first create a sublinkage inside the first, and then use the [2] frame to set the base of our resulting linkage. More... | |
Bennett | linkAt_ (int N, VSR_PRECISION th=1, VSR_PRECISION a=.5, VSR_PRECISION b=.5, VSR_PRECISION la=0, VSR_PRECISION lb=0) |
Public Member Functions inherited from vsr::cga::Chain | |
Frame & | baseFrame () |
Frame | baseFrame () const |
void | resetJoints () |
void | reset () |
Chain (const string &s) | |
Chain (int n=3) | |
void | alloc (const string &s) |
void | alloc (int n) |
void | frameSet () |
int | num () const |
Frame & | link (int k) |
set k's Link To Next Joint | |
Frame & | joint (int k) |
set kth joint's In Socket Transformation | |
Frame & | frame (int k) |
set Absolute Displacement Motor | |
Frame | link (int k) const |
Get k's Link To Next joint. | |
Frame | joint (int k) const |
Get kth Joint's In Socket Transformation. | |
Frame | frame (int k) const |
Get Absolute Displacement Motor. | |
vector< Frame > & | links () |
vector< Frame > & | joints () |
Frame & | operator[] (int k) |
Set kth Absolute Frame. | |
Frame | operator[] (int k) const |
Get kth Absolute Frame. | |
Dls | nextSphere (int k) const |
Sphere Centered at Joint K Going Through Joint K+1. | |
Dls | prevSphere (int k) const |
Sphere Centered at Joint K Going Through Joint K-1. | |
Dlp | nextPlane (int k) const |
Dual Plane of rotation of kth joint (translated by link rejection from yz) | |
Dlp | prevPlane (int k) const |
Dual Plane of rotation of k-1th joint (translated by link rejection from yz) | |
Circle | nextCircle (int k) const |
Dual Circle Centered at Joint K Going Through Joint K+1 (in plane of rotation) | |
Circle | prevCircle (int k) const |
Dual Circle Centered at Joint K Going Through Joint K-1 (in plane of rotation) | |
Dls | goalSphere (const Pnt &p, int k) |
Sphere at Point p through Joint K. | |
Dls | lastSphere (const Pnt &p) |
Sphere at point p through last link (default, or set arbitary link) | |
Pnt | at (int idx, double t=0.0) |
Pnt at position t along Link idx. | |
Frame & | base () |
Frame & | first () |
Frame & | last () |
Dlp | xy (const Pnt &p) |
Vert xy Plane Containing Root Target Point v ( NORMALIZED ) | |
Dlp | xz (const Pnt &p) |
Horiz xz Plane Containing Target Point v. | |
Dll | linkf (int k) |
Dual Line Forward: Line from kth frame to kth Link. | |
Dll | linf (int k) |
Dual Line Forward: Line from kth frame to kth+1 joint. | |
Dll | linb (int k) |
Dual Line Backward: Line from kth frame to kth-1 joint. | |
Dll | lin (const Pnt &p) |
Dual Line From Kth Joint to Input Target (Default is From Last joint) | |
Mot | rel (int k) |
relative transformation (lagrangian) at kth joint | |
void | calcBase () |
void | fk () |
Forward Kinematics: Absolute Concatenations of previous frame, previous link, and current joint. | |
void | fk (int end) |
Forward Kinematics: calculate forward to "end" joint. | |
void | fk (int begin, int end) |
Forward Kinematics: calculate forward from "begin" to "end" joint. | |
void | ik (int end, int begin) |
void | fabrik (const Pnt &p, int end, int begin, double err=.01) |
"FABRIK" Iterative Solver [see paper "Inverse Kinematic Solutions using Conformal Geometric Algebra", by Aristodou and Lasenby] feed target point, end frame and beginning frame, | |
void | calcJoints (int start=0, bool bLoop=false) |
Derive Joint Rotations from Current Positions. | |
void | calcLinks (bool bOrientation=false) |
Derive New Relative Link Frames from current Positions @ param bOrientation: whether to consider current orientation of frames when reverse engineering links. | |
void | angle (int k, double theta) |
Satisfy Specific Angle Constraint at frame k. | |
Public Member Functions inherited from vsr::cga::Frame | |
Frame () | |
Default Constructor. | |
Frame (VSR_PRECISION _x, VSR_PRECISION _y, VSR_PRECISION _z) | |
Construct from x,y,z Coordinates. | |
Frame (const Vec &v, const Rotor &r=Rot(1, 0, 0, 0), VSR_PRECISION s=1) | |
Construct from Vec. | |
Frame (const Point &p, const Rotor &r=Rot(1, 0, 0, 0), VSR_PRECISION s=1) | |
Construct from Point, Rotor, and Scale. | |
Frame (const DualLine &d) | |
Construct from Dual Line (log of motor relative to origin) | |
Frame (const Motor &m) | |
Construct from Motor (relative to origin) | |
Frame & | set (Pnt p, Rot r=Rot(1, 0, 0, 0)) |
Set Position and Orientation from Point and Rotor. | |
Frame & | scale (VSR_PRECISION s) |
Set Scale. | |
Frame & | reset () |
Reset to Origin. | |
VSR_PRECISION | scale () const |
Get Scale. | |
VSR_PRECISION & | scale () |
Rotor | rot () const |
Get 4x4 Rotation Matrix. More... | |
Rotor | rotor () const |
Get Rotor. | |
Rot & | rot () |
Get Rotor by reference. | |
Rot & | rotor () |
Frame & | rot (const Rot &r) |
Set rotor with rotor. | |
Frame & | rot (const Biv &B) |
Set rotor with bivector generator. | |
Rot | quat () const |
Transpose rotor to quaternionic representation. | |
Frame & | orient (const Vec &v, bool pos=true) |
Orient z axis towards coordinate v, keeping y axis as vertical as possible (uses projection) boolean parameter uses negative z (i.e. More... | |
Frame & | orient (const Vec &v, float amt, bool pos=true) |
Orient z axis towards coordinate v, by amt t, keeping y axis as vertical as possible (uses projection) boolean parameter uses negative z (i.e. More... | |
Frame & | orientX (const Vec &v, float amt, bool pos=true) |
Orient X axis towards coordinate v, by amt t, keeping y axis as vertical as possible (uses projection) boolean parameter uses negative z (i.e. More... | |
Rotor | relOrientRot (const Vec &v, bool pos=true) |
Rotor to Orient Current Orientation towards v Rotor to Orient Current Orientation towards v. | |
Biv | relOrientBiv (const Vec &v, bool pos=true) |
Get Bivector generator to Orient towards v. | |
Frame & | relOrient (const Vec &v, float t, bool pos=true) |
Relative Orientation by amt t. | |
Motor | relMotor (const Frame &target) |
Relative Motor to Take this to Frame f. | |
Frame & | relTwist (const Frame &target, float t) |
Relative twist towards frame f by amt t. | |
Frame & | relTwistAway (const Frame &target, float t) |
Relative twist away frome frame f by amt t. | |
Point | pos () const |
Get Position. | |
Point & | pos () |
Get / Set Position by Reference. | |
Vec | vec () const |
Get Euclidean Vector of position. | |
Frame & | pos (const Vec &v) |
Set Postion from Vec v. | |
Frame & | pos (const Pnt &p) |
Set Position from Point p. | |
Frame & | pos (VSR_PRECISION _x, VSR_PRECISION _y, VSR_PRECISION _z) |
Set Position from x,y,z coordinates. | |
Vec | x () const |
Local x. | |
Vec | y () const |
Local y. | |
Vec | z () const |
Local z. | |
Point | posX () const |
Point | negX () const |
Point | posY () const |
Point | negY () const |
Point | posZ () const |
Point | negZ () const |
Biv | xy () const |
xz euclidean bivector | |
Biv | xz () const |
xy euclidean bivector | |
Biv | yz () const |
yz euclidean bivector | |
Lin | lx () const |
x direction direct line | |
Lin | ly () const |
y direction direct line | |
Lin | lz () const |
z direction direct line | |
Dll | dlx () const |
x direction dual line | |
Dll | dly () const |
y direction dual line | |
Dll | dlz () const |
z direction dual line | |
Dlp | dxz () const |
xz dual plane | |
Dlp | dxy () const |
xy dual plane | |
Dlp | dyz () const |
yz dual plane | |
Par | px () const |
x direction point pair around center | |
Par | py () const |
y direction point pair around center | |
Par | pz () const |
z direction point pair around center | |
Par | ipx () const |
x direction imaginary point pair around center | |
Par | ipy () const |
y direction imaginary point pair around center | |
Par | ipz () const |
z direction imaginary point pair around center | |
Par | tx () const |
Null Point Pair in local x direction. | |
Par | ty () const |
Null Point Pair in local y direction. | |
Par | tz () const |
Null Point Pair in local z direction. | |
Par | tx (VSR_PRECISION v) const |
Null Point Pair in local x direction. | |
Par | ty (VSR_PRECISION v) const |
Null Point Pair in local y direction. | |
Par | tz (VSR_PRECISION v) const |
Null Point Pair in local z direction. | |
Cir | cxy () const |
xy circle (real, direct) | |
Cir | cxz () const |
xz circle (real, direct) | |
Cir | cyz () const |
yz circle (real, direct) | |
Cir | icxy () const |
xy circle (imaginary, direct) | |
Cir | icxz () const |
xz circle (imaginary, direct) | |
Cir | icyz () const |
yz circle (imaginary, direct) | |
Vec | right () const |
Vec | up () const |
Vec | forward () const |
Frame & | mot (const Mot &m) |
Set position and orientation by motor (absolute) | |
Trs | trs () const |
Generate Translation versor based on Position. | |
Mot | mot () const |
Get Absolute Motor Relative to Origin. | |
Motor | motor () const |
Get Absolute Motor Relative to Origin. | |
Dls | bound () const |
Dual Sphere Shell. | |
Dls | ibound () const |
Dual Imaginary Sphere Shell. | |
Dll | dll () const |
DualLine Representation of Pose. | |
DualLine | dualLine () const |
VSR_PRECISION & | ab () |
Set bivector accelerator (rotational) | |
VSR_PRECISION | ab () const |
Get bivector accelerator (rotational) | |
VSR_PRECISION & | ax () |
Set vector accelerator. | |
VSR_PRECISION | ax () const |
Get vector accelerator. | |
Biv & | db () |
Set bivector velocity (rotational) | |
Biv | db () const |
Get bivector velocity (rotational) | |
Vec & | dx () |
Set vector velocity. | |
Vec | dx () const |
Get vector velocity. | |
Frame & | step () |
Move and Spin. | |
Frame & | move () |
Translation Step (translate by velocity vector) | |
Frame & | spin () |
Spin Step (Local Rotation) */. | |
Frame & | dilate (double t) |
Dilate by t around center. | |
Frame & | dilate (const Point &p, double t) |
Dilate by t around some point p. | |
Frame | rotXY (VSR_PRECISION amt) const |
Rotate around local xy and return a new frame. | |
Frame & | move (VSR_PRECISION dx, VSR_PRECISION dy, VSR_PRECISION dz) |
Move by dx, dy, dz and return this. | |
Frame & | move (const Vec &v) |
Move by Vec. | |
Frame & | rotate (const Biv &b) |
Frame & | rotate (const Rot &r) |
Rotate by Rot. | |
Frame & | twist (const Dll &) |
Twist by dualLine and return *this. | |
Frame & | twist (const Mot &) |
Twist by Motor and return *this. | |
Frame & | boost (const Par &) |
Boost by point pair and return *this. | |
Frame & | boost (const Bst &) |
Boost by bst and return *this. | |
Frame | moveX (VSR_PRECISION amt) const |
Frame | moveY (VSR_PRECISION amt) const |
Frame | moveZ (VSR_PRECISION amt) const |
Additional Inherited Members | |
Public Types inherited from vsr::cga::Frame | |
using | space = typename conformal< 5 >::types |
Protected Member Functions inherited from vsr::cga::Chain | |
void | _init () |
Protected Attributes inherited from vsr::cga::Chain | |
Frame | mBaseFrame |
default zero, to tie chains together, set this to another chain's frame. | |
vector< Frame > | mJoint |
In Socket Transformation (RDHC, etc) SET THIS directly using joint(i) (all others follow after calling fk() method) | |
vector< Frame > | mLink |
Relative Link to NEXT joint. | |
vector< Frame > | mFrame |
Absolute frames of Joints = prevFrame * prevLink * joint. | |
int | mNum |
Protected Attributes inherited from vsr::cga::Frame | |
Point | mPos |
Position. | |
Rotor | mRot |
Orientation. | |
VSR_PRECISION | aBiv |
Rotational acceleration. | |
Biv | dBiv |
Rotational Velocity. | |
VSR_PRECISION | aVec |
Translational acceleration. | |
Vec | dVec |
Translational Velocity. | |
VSR_PRECISION | mScale |
Scale. | |
The bennett 4 bar linkage.
lb 2----------—1 | | la | | la | | 3----------—0 lb
|
inline |
A linked Bennett mechanism at joint N determined by ratio of original We first create a sublinkage inside the first, and then use the [2] frame to set the base of our resulting linkage.
Nth | link (default 2) |
linkage | skew RELATIVE to parent |
length | along edge a (default .5) |
length | along edge b (default .5) |
new | length a (default same as parent) |
new | length b (default same as parent) |