![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7098604/game2020_presentation_hugo_eric.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7098606/pasted-from-clipboard.png)
The Team
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7098607/badge_white.png)
Queens' College
Gonville and Caius College
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7098613/pasted-from-clipboard.png)
Trinity College
Cambridge University Signal Processing and Communications Laboratory
CGA Robotics Motivation
Building algorithms to control robots is inherently geometric
Forward Kinematics is typically all about composing and chaining transformations (rotation and translation)
Inverse Kinematics requires finding intersections and reflections of geometric primitives (especially circles and spheres)
Conformal Geometric Algebra (CGA) combines many geometric primitives, intersections and transformations
Geometric Algebra Recap
Set up a bunch of orthogonal basis vectors, define the geometric product of a basis vector with itself, eg. for 3DGA
The multiplication of two orthogonal basis vectors anticommutes and we often use a shorthand to write it
If we now make two vectors and multiply them with the geometric product we can see what happens
Geometric Algebra Recap 2.
The result of the geometric product has both terms that are scalars and terms that are the multiplication of two basis vectors
Let's define an operation, the grade selection operation
If there is nothing of the grade in there, then it gives 0
Geometric Algebra Recap 3.
The result of the geometric product can be written with grade selection
Inner (dot) product
And this motivates us to define two new products...
Outer (wedge) product
Note: people define various different behaviours of the inner product with scalars
3D to 5D
CGA creates two more basis vectors that square to +1 and -1 respectively:
\[ e_1^2 = 1, e_2^2 = 1, e_3^2 = 1, \bf{e_4^2 = 1, e_5^2 = -1} \]
We use the extra basis vectors to construct two null vectors *
Then use the null vectors to embed our 3D point in 5D
* Note, people use a range of different notations here in papers etc, it doesn't really matter what you use as long as you are consistent!
For more info see references [1,2]
Properties of the mapping
This is not a random choice!
Dot product between points is proportional to the squared distance between them
The null vectors correspond to the origin and infinity!
Check:
Like in graphics programming where we work with 4D homogeneous coordinates, here we go to 5D for more power :)
Representing Primitives
Geometric primitives can be made by wedging points together (see [2,3])
Point
Point pair/line segment
Circle
Infinite line
Sphere
Infinite plane
Representing Primitives 2
Geometric primitives can be made from traditional parameterisations via their dual (see [2,3])
Point pair
line segment
Circle
Infinite line
Infinite plane
Sphere
Primitive Intersections
The meet or vee operator does intersection: \( \vee \)
(see [2,3])
The meet (wrt \(I_5\)) is a linear operator, it is distributive and associative
Intersections can be chained easily
Transformations
CGA transformations contain all the motors ie. rotation and translation, but they also contain scaling and inversion, (all angle preserving transformations)
Rotors can again be represented as the exponentiation of bivectors (Lie algebra -> Lie group mapping)
Can nicely chain and interpolate transformations
Almost everything is completely "covariant", ie. you can prove it at the origin and it will hold everywhere
Transformations 2
Rotation rotor
Translation rotor
Scaling rotor
All rotors are applied the same way:
Reflections in CGA
Reflections are done by sandwiching one object inside another
Introduction to serial robots
Serial robots have a series of joints, one after another
Known as a serial kinematic chain
Most common type of industrial robot
Common Serial Robots
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/6999089/3_Industrial_Robots.png)
Building Cars
Colaborating with people
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7099053/pasted-from-clipboard.png)
Serial Robot Forward Kinematics 3DGA
Consider a 2-link 3 degree of freedom serial robot arm
Where does the end point go as we change the motor angles?
Get the end point
Construct the base rotors
Get the elbow point
Construct the elbow rotor
Serial Robot Forward Kinematics CGA
What if we want the full orientation of the endpoint?
Can we construct a rotor from origin to endpoint?
Construct the base rotors
Construct the first link's translation rotor
Construct the elbow and link 2 translation rotor
The combined rotor is the product of all of them
Serial Robot Inverse Kinematics
(If \(P^2 < 0 \) then y is out of reach)
Construct a sphere at the base, \(n_0\)
Construct a sphere at the endpoint, y
Intersect the spheres to give a circle
Define a vertical plane through the endpoint and base
Intersect the circle and the plane to give a point pair
Choose one of the elbow position solutions
Parallel Robots
Parallel robots are composed of multiple kinematic chains
Inverse kinematics typically easy
Forward kinematics hard
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7062913/delta_robot.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7062934/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7062937/pasted-from-clipboard.png)
Delta Robot
Agile Eye
Stewart Platform
The Agile Eye
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7062949/pasted-from-clipboard.png)
The Agile Eye is a parallel robot originally designed for orienting cameras very quickly
(a) 3DoF Agile Eye
(b) 2DoF Agile Eye
2DoF version can change the orientation of the camera but cannot freely roll about the camera axis
Forward Kinematics of 2dof Agile Eye
Construct the drive rotors
Find the elbow points
Get the point pair on the camera plate
Get the normal to the plate
Inverse Kinematics of 3DoF Agile Eye
The axes of the motors all intersect at a single point, the centre of rotation
We define a rotation rotor R that fully defines the plate position
Each point on the plate defines an additional circle where the elbow could be
The fixed axis of each motor defines a fixed circle on which the elbow must lie
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/7093886/pasted-from-clipboard.png)
Delta Robots
- Very fast moving
- Simple forward and inverse kinematics
- Cheap and easy to build
History of the Delta Robot
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/6875103/clavel.png)
- Invented by Reymond Clavel at EPFL in 1985
- Inspired by a visit to a chocolate factory
Model of a Delta Robot
![](https://upload.wikimedia.org/wikipedia/commons/5/56/DeltaRamki.gif)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/900934/images/6778240/pasted-from-clipboard.png)
Forward Kinematics
Get the pseudo-elbow point \(A_i\)
Construct a sphere about the pseudo-elbow
The intersection of the three spheres (one from each limb) correspond to the two possible possitions of the centre of the end plate
Reachable Volume
Inverse Kinematics
If \(T_i^2 < 0\) then the target point is unreachable
Construct three possible elbow position circles
Construct three possible elbow position spheres
Intersect each sphere with its corresponding circle and select one possible intersection solution per limb
Finally get the motor angles
Linear Function to Matrix
Many GA operations are linear and chainable
Linear functions can be converted to matrices (if you so desire..)
Linearity is great for differentiation!
This turns out to be very useful for robotics
CALCULUS ON THE VERTICAL SLIDES BELOW
Forward Jacobian
-
Move only one motor
- This fixes two of the spheres, they intersect in a circle
- We are therefore interested in the differential of the end point of the point pair made from intersection of the circle and the moving sphere
- First we need to find how the center of the sphere changes as we move theta
- How does point pair move with the sphere?
Forward Jacobian (2)
- Now we need to know how the conformal endpoint of the point pair changes
- How does the 3D endpoint change with the conformal endpoint change? (derivative of 'down' function)
Forward Jacobian (3)
- We now have a closed form expression for the derivative of the endpoint wrt. theta and we didn't have to use maple once!
- We can use this for control and optimisation. Consider a cost function:
Forward Jacobian In Use
- We therefore have a closed form for
and so can do gradient descent
- Given the forward jacobian we can simply invert the 3x3 matrix at each point to get the inverse jacobian
OR
- We can differentiate our inverse kinematic equations..
Inverse Jacobian
Starting with \(\Sigma_i \)
Differentiate wrt. a scalar param \( \alpha \)
the sphere centred at the meeting of the 4 bar mechanism and the end platform
- Now we need to know how the elbow positions vary with \alpha
Inverse Jacobian (2)
- Here \(A_i\) is the conformal elbow position
- Finally we need to know how the joints vary with elbow position
Inverse Jacobian (3)
- We are done (Once again no Maple!)
- The inverse jacobian allows us to map velocity of the endpoint to velocity of joints
Inverse Jacobian in Use
- In other words, to minimise cost at maximum rate drive the end point linearly at our target point (obviously)
- With the inverse jacobian we can do exactly that
Kinematics and dynamics for mechanics
So far we have dealt with geometry of robots, constraints and kinematics of the end effector
Now we would like to also deal more generally with statics and dynamics
Ideally our setup should be familiar/intuitive to robotics practitioners and researchers to make it easy to use.
Forces as lines
Forces have a line of action, an orientation, and a magnitude
We can therefore naturally encode a force as an infinite line in CGA
force magnitude
force direction
3d point through which the line passes
Note we have used the dual construction of the line here, ie. F is a bivector
Conditions for static equilibrium of a rigid body
The conditions for static equilibrium of a body subject to external forces and moments:
No net linear force
No net moment
What does this mean for our CGA force line formulation?
The Sum of CGA Lines 1.
What is the sum of two CGA force lines?
Another force line + something else.. (see [10])
Let's consider a simple case: two force lines in a plane
The Sum of CGA Lines 2.
So when the force lines meet at a point the sum of lines is just another line, ie:
The resultant force line passes through p which is the point at which they intersect. It also points in the direction of, and has magnitude the same as, the vector sum \( \lambda_1\hat{m_1} + \lambda_2\hat{m_2}\):
The Sum of CGA Lines 3.
So for parallel force lines:
But for anti-parallel force lines of equal magnitude:
Physically speaking, balanced anti-parallel forces create a pure moment
is the moment generated by the geometric arrangement of forces
Moment of a force line about a point
OK so we know how to do forces and we have a representation of a moment, but how do we calculate the moment of a line about a point?
For a point P and dual force line \(F_1\) the moment bivector M is given by:
This again produces a moment bivector of the from: \( a\wedge n_{\infty} \) , where \(|a|\) is the magnitude of the moment and \(\hat{a}\) is the direction of the moment axis
Wrenches: Forces and moments as screws
Both dual force lines and our bivector moments are screws, and specifically because they carry forces/moments they are known as wrenches (see [12])
If h is 0 then we have a force line
Iif m is 0 magnitude we have a pure moment
The general form of a screw is:
We can add and subtract screws at will and we will still stay on the screw manifold
Static equilibrium, external forces and moments
With both external moments \(M_j \) and forces \(F_i \) our static equilibrium equation is:
We could also think of all the force and moments as screws and so:
But what happens if they don't sum to 0?
Screw momentum and screw velocity
And we can define a screw velocity \(\dot{B}\) such that:
We will define a screw momentum quantity, \(\Omega\),
such that the sum of external wrenches is its time derivative
where \(R\) is the rotor that transforms things from the body frame to the world frame (see [11,14])
Principal Screws of Inertia
Screw momentum and screw velocity are related by screw inertia (see [13])
We can quantify screw inertia by considering how much a wrench would effect the body if it was already moving in one of 6 specific ways, these movements are the Principal Screws of Inertia
What is the response if it is rotating about axis \(e_1\) or \(e_2\) or \(e_3\)?
What is the response if it is translating along axis \(e_1\) or \(e_2\) or \(e_3\)?
The screw inertia tensor
Principal screws of inertia
The screw inertia tensor \(M\) and its inverse \(M^-1\) map between screw velocity \(\dot{B_b}\) and screw momentum \(\Omega_b\) in the body frame (aligned with the principal axes)
Reciprocal principal screws of inertia
\(m\) is the body's mass
\(\gamma_i\) is the body's second moment of area about each axis
Setting up for simulation
To integrate all our bits and bobs we will use a standard 4'th order Runge-Kutta method (RK4)
To use the RK4 method we need to define our state \(y\) and a function \(f\) that returns the derivative of that state at a given time t and an initial value of \(y\) to start the simulation off at \(t_0\)
Our goal will be to simulate a couple of interesting dynamics phenomena as a test of correctness
The governing equations
The state we track is the rotor \(R\) that transforms from the body frame to the world frame and the screw momentum \(\Omega\) in the world frame
The body is under the influence of a time varying wrench \(W_b\) expressed in the body frame
Summary
CGA combines primitives, intersections, transformations (+Lie groups, algebras) and easy derivatives (wrt scalars)
(C)GA is not some alien language, it is the tools and techniques you already know and love packaged with a common interface
CGA is easy to work with and computationally feasable for real time applications (all the demos here are running in the browser!)
Thanks for listening!
If you are interested in getting involved then check out the pygae github group and have a go with the python clifford package for numerical GA
Run some GA code today!
- Javascript
- Fully in browser
- Great for interactive demos like the ones in this slide
![](https://s3.amazonaws.com/media-p.slid.es/uploads/723953/images/7113251/pasted-from-clipboard.png)
ganja.js
Run some GA code today!
- Python
- Access to a vast library of scientific toolkits:
- numpy
- scipy
- jupyter
- ...
clifford
![](https://www.jpl.nasa.gov/images/universe/20190410/blackhole20190410.jpg)
Event Horizon Telescope Collaboration
Run some GA code today!
- Best of both worlds
- Run your python computations, visualize in-browser
pyganja
Let's get started
![](https://s3.amazonaws.com/media-p.slid.es/uploads/723953/images/7113285/pasted-from-clipboard.png)
References
- Chris Doran and Anthony Lasenby, Geometric Algebra for Physicists (Cambridge: Cambridge University Press, 2003), https://doi.org/10.1017/CBO9780511807497.
- Leo Dorst, Daniel Fontijne, and Stephen Mann, Geometric Algebra for Computer Science: An Object-Oriented Approach to Geometry, Morgan Kaufmann Series in Computer Graphics (Amsterdam : San Francisco: Elsevier ; Morgan Kaufmann, 2007).
- Anthony Lasenby, Joan Lasenby and Rich Wareham (2004) A covariant approach to geometry using geometric algebra. Technical Report. University of Cambridge Department of Engineering, Cambridge, UK.
- Rich Wareham and Joan Lasenby, ‘Mesh Vertex Pose and Position Interpolation Using Geometric Algebra’, in Articulated Motion and Deformable Objects, ed. Francisco J. Perales and Robert B. Fisher, Lecture Notes in Computer Science (Springer Berlin Heidelberg, 2008), 122–31.
- Lars Tingelstad and Olav Egeland, ‘Motor Parameterization’, Advances in Applied Clifford Algebras 28, no. 2 (May 2018): 34, https://doi.org/10.1007/s00006-018-0850-2.
- Imme Ebert-Uphoff et al., ‘Rapid Prototyping for Robotics’, in Cutting Edge Robotics, ed. Vedran Kordic, Aleksandar Lazinica, and Munir Mer (Pro Literatur Verlag, Germany, 2005), https://doi.org/10.5772/4639.
- Massimo Callegari et al., ‘Parallel Wrists for Enhancing Grasping Performance’, in Grasping in Robotics, ed. Giuseppe Carbone, vol. 10 (London: Springer London, 2013), 189–219, https://doi.org/10.1007/978-1-4471-4664-3_8.
- Alessandro Cammarata et al., ‘Dynamic Stiffness Model of Spherical Parallel Robots’, Journal of Sound and Vibration 384 (December 2016): 312–24, https://doi.org/10.1016/j.jsv.2016.08.014.
-
Rosquist, K. (2013).Modelling and Control of a Parallel Kinematic Robot. ISRNLUTFD2/TFRT–5929–SE. Master’s Thesis. Department of Automatic Control,LTH, Lund University, Lund, Sweden
-
H. Hadfield and J. Lasenby, ‘Direct Linear Interpolation of Geometric Objects in Conformal Geometric Algebra’, Advances in Applied Clifford Algebras 29, no. 4 (September 2019): 85, https://doi.org/10.1007/s00006-019-1003-y.
-
Anthony Lasenby, Robert Lasenby, and Chris Doran, ‘Rigid Body Dynamics and Conformal Geometric Algebra’, in Guide to Geometric Algebra in Practice, ed. Leo Dorst and Joan Lasenby (London: Springer, 2011), 3–24, https://doi.org/10.1007/978-0-85729-811-9_1.
-
Jaime Gallardo-Alvarado, Kinematic Analysis of Parallel Manipulators by Algebraic Screw Theory (Springer International Publishing, 2016), https://doi.org/10.1007/978-3-319-31126-5.
-
Tischler, C.R., Downing, D.M., Lucas, S.R., Martins, D.: Rigid-body inertia and screw geometry. In: Proceedings of a symposium commemorating the legacy, works, and life of Sir Robert Stawell Ball upon the 100th anniversary of a treatise on the theory of screws. Cambridge (2000)
-
Michael Boyle, ‘The Integration of Angular Velocity’, Advances in Applied Clifford Algebras 27, no. 3 (1 September 2017): 2345–74, https://doi.org/10.1007/s00006-017-0793-z.