versor  3.0
C++11 library for Geometric algebra
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vsr::cga::Chain Class Reference

A sequence of spatial Frames. More...

#include <vsr_chain.h>

Inheritance diagram for vsr::cga::Chain:
vsr::cga::Frame vsr::cga::Bennett

Public Member Functions

FramebaseFrame ()
 
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
 
Framelink (int k)
 set k's Link To Next Joint
 
Framejoint (int k)
 set kth joint's In Socket Transformation
 
Frameframe (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 ()
 
Frameoperator[] (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.
 
Framebase ()
 
Framefirst ()
 
Framelast ()
 
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)
 
Frameset (Pnt p, Rot r=Rot(1, 0, 0, 0))
 Set Position and Orientation from Point and Rotor.
 
Framescale (VSR_PRECISION s)
 Set Scale.
 
Framereset ()
 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.
 
Rotrot ()
 Get Rotor by reference.
 
Rotrotor ()
 
Framerot (const Rot &r)
 Set rotor with rotor.
 
Framerot (const Biv &B)
 Set rotor with bivector generator.
 
Rot quat () const
 Transpose rotor to quaternionic representation.
 
Frameorient (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...
 
Frameorient (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...
 
FrameorientX (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.
 
FramerelOrient (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.
 
FramerelTwist (const Frame &target, float t)
 Relative twist towards frame f by amt t.
 
FramerelTwistAway (const Frame &target, float t)
 Relative twist away frome frame f by amt t.
 
Point pos () const
 Get Position.
 
Pointpos ()
 Get / Set Position by Reference.
 
Vec vec () const
 Get Euclidean Vector of position.
 
Framepos (const Vec &v)
 Set Postion from Vec v.
 
Framepos (const Pnt &p)
 Set Position from Point p.
 
Framepos (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
 
Framemot (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.
 
Bivdb ()
 Set bivector velocity (rotational)
 
Biv db () const
 Get bivector velocity (rotational)
 
Vecdx ()
 Set vector velocity.
 
Vec dx () const
 Get vector velocity.
 
Framestep ()
 Move and Spin.
 
Framemove ()
 Translation Step (translate by velocity vector)
 
Framespin ()
 Spin Step (Local Rotation) */.
 
Framedilate (double t)
 Dilate by t around center.
 
Framedilate (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.
 
Framemove (VSR_PRECISION dx, VSR_PRECISION dy, VSR_PRECISION dz)
 Move by dx, dy, dz and return this.
 
Framemove (const Vec &v)
 Move by Vec.
 
Framerotate (const Biv &b)
 
Framerotate (const Rot &r)
 Rotate by Rot.
 
Frametwist (const Dll &)
 Twist by dualLine and return *this.
 
Frametwist (const Mot &)
 Twist by Motor and return *this.
 
Frameboost (const Par &)
 Boost by point pair and return *this.
 
Frameboost (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
 

Protected Member Functions

void _init ()
 

Protected Attributes

Frame mBaseFrame
 default zero, to tie chains together, set this to another chain's frame.
 
vector< FramemJoint
 In Socket Transformation (RDHC, etc) SET THIS directly using joint(i) (all others follow after calling fk() method)
 
vector< FramemLink
 Relative Link to NEXT joint.
 
vector< FramemFrame
 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.
 

Additional Inherited Members

- Public Types inherited from vsr::cga::Frame
using space = typename conformal< 5 >::types
 

Detailed Description

A sequence of spatial Frames.


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