C++ header files for performing forward kinematics using dual quaternion algebra.
Dual quaternions are extentions of quaternions as a dual number, just as quaternions of unit length can be used to represent 3D rotations, dual quaternions of unit length can be used to represent 3D rigid motions. Dual quaternions provide a more stable and compact form for representing rigid body motion, and a unified space for performing modelling, control and planning when compared to classical tranformation methods.
This library should help you model the kinemaics of your robot using only dual quaternions. The underlying assumption is that you know the DH parameters of each joint on your robot.
Support will be added soon for parameterization using screw theory and pose transforms of 6DOF joints.
Some changes have been made to the dualquat library (including new operators!) so I recommend using my version, all the dependencies are included in this file.
Here are some short examples of some of the functions included and how to use them,
- Create a robot joint using the
DH_joints
class
DH::DH_joint<double> J1(theta,alpha,a,d, DH::REVOLUTE, offset);
- Add all the joints in the order you need using the
RobotLinks
class
MyRobot.addJoint(J1);
MyRobot.addJoint(J2);
MyRobot.addJoint(J3);
- Use
ComputeForwardKinematics()
to compute the pose of the end frame wrt to the inerial frame. (Equivalent to${ }^0 T_{N} $ )
dualquat::DualQuaternion<T> pose = MyRobot.ComputeForwardKinematics()
- You can also compute the the Jacobian using
ComputeJacobian()
Eigen::Matrix<double,8,Eigen::Dynamic> J(ComputeJacobian(MyRobot));
- Compute rate of change of pose in dualquat coordinates using
compute_pose_dot()
Eigen::Matrix<T,8,1> pose_vec(compute_pose_dot(MyRobot));
Where
The relative pose from frame i to frame i-1 in dual quaternion space is given by:
Which in cartesian coordinates is represented by the Transformation matrix:
Where
Supports C++ 11 or higher.
Compiler | Version | Remarks |
---|---|---|
gcc | 5.5.0 or higher. | |
clang | 7.0.0 or higher. | |
msvc | 16.5.4 or higher. |
[1] Adorno, B.V. (2017) Robot Kinematic Modeling and Control Based on Dual Quaternion Algebra Part I: Fundamentals, ReasearchGate. Available at: https://hal.science/hal-01478225v1 (Accessed: April 9, 2023).
[2] Valverde, A. (2018) Spacecraft Robot Kinematics Using Dual Quaternions, MDPI. Available at: https://www.dcsl.gatech.edu/papers/mdpi18%20(Printed).pdf (Accessed: April 9, 2023).