/dkt

A Tutorial on Manipulator Differential Kinematics

Primary LanguageJupyter NotebookMIT LicenseMIT

A Tutorial on Manipulator Differential Kinematics

Powered by the Robotics Toolbox PyPI - Python Version QUT Centre for Robotics Open Source License: MIT

By Jesse Haviland and Peter Corke

This repository contains a collection of Jupyter Notebooks designed to accompany the two-part Tutorial on Manipulator Differential Kinematics published in the IEEE Robotics and Automation Magazine. Each Notebook corresponds to a section within the tutorial articles. The notebooks are easily extensible to encourage experimentation. The intention is that you read a section of the tutorial and then complete the corresponding Notebook. The articles can be accessed via PDF via the links below.

Part 1: Kinematics, Velocity, and Applications
Jupyter Notebooks Open in Colab Link
1 Manipulator Kinematics Open In Colab
2 The Manipulator Jacobian Open In Colab
3 Resolved-Rate Motion Control Will not run on Colab
4 Numerical Inverse Kinematics Open In Colab
5 Manipulator Performance Measures Open In Colab
Part 2: Acceleration and Advanced Applications
Jupyter Notebooks Open in Colab Link
1 The Manipulator Hessian Open In Colab
2 Higher Order Derivatives Open In Colab
3 Analytic Forms Open In Colab
4 Null-Space Projection for Motion Control Will not run on Colab
5 Quadratic Programming for Motion Control Will not run on Colab
6 Advanced Numerical Inverse Kinematics Open In Colab
7 Quadratic-Rate Motion Control Will not run on Colab

Contents


Synopsis

Manipulator kinematics is concerned with the motion of each link within a manipulator without considering mass or force. A serial-link manipulator, which we refer to as a manipulator, is the formal name for a robot that comprises a chain of rigid links and joints, it may contain branches, but it can not have closed loops. Each joint provides one degree of freedom, which may be a prismatic joint providing translational freedom or a revolute joint providing rotational freedom. The base frame of a manipulator represents the reference frame of the first link in the chain, while the last link is known as the end-effector.

In Part I of the two-part Tutorial, we provide an introduction to modelling manipulator kinematics using the elementary transform sequence (ETS). Then we formulate the first-order differential kinematics, which leads to the manipulator Jacobian, which is the basis for velocity control and inverse kinematics. We describe essential classical techniques which rely on the manipulator Jacobian before exhibiting some contemporary applications.

In Part II of the Tutorial, we formulate the second-order differential kinematics, leading to a definition of manipulator Hessian. We then describe the differential kinematics' analytical forms, which are essential to dynamics applications. Subsequently, we provide a general formula for higher-order derivatives. The first application we consider is advanced velocity control. In this Section, we extend resolved-rate motion control to perform sub-tasks while still achieving the goal before redefining the algorithm as a quadratic program to enable greater flexibility and additional constraints. We then take another look at numerical inverse kinematics with an emphasis on adding constraints. Finally, we analyse how the manipulator Hessian can help to escape singularities.


Python Setup Guide

The Notebooks are written using Python and we use several python packages. We recommend that you set up a virtual environment/Python environment manager. We provide a guide to setting up Conda below but feel free to use any alternative such as virtualenv or venv.

The Notebooks have been tested to run on Ubuntu, Windows and Mac OS with any currently supported version of Python (currently 3.7, 3.8 3.9 and 3.10).

Conda Environment Setup Guide

Download miniconda from here while choosing the link for your operating system and architecture.

Follow the Conda install instructions from here.

In the terminal, make a new conda environment. We called our environment dktutorial and recommend choosing Python version 3.10

conda create --name dktutorial python=3.10

We need to activate our environment to use it

conda activate dktutorial

Check out this link for a handy Conda command cheat sheet. There is also a ~30 minute Conda Tutorial available here.

Python Package Install Guide

We require several Python packages to run the Notebooks. You should activate the Conda environment before completing this stage.

We use IPython and Jupyter notebook

pip install ipython notebook

Install the Robotics Toolbox for Python and associated packages. This will also install other requirements such as Swift and Spatialmath-Python.

pip install "roboticstoolbox-python>=1.1.0"

For Notebooks in Part II we need sympy and qpsolvers

pip install sympy qpsolvers[quadprog]

Running Notebooks Locally

We have tested the Notebooks in the default Jupyter Notebook web interface and the VSCode Notebook extension.

Clone the Repository

Firstly, you must clone the repository

git clone https://github.com/jhavl/dkt.git
cd dkt

Running in the Jupyter Notebook Web Interface

In terminal, activate the conda environment, navigate to the repository folder and run

conda activate dktutorial
cd "path_to_repo/dkt"
jupyter-notebook

Running in the VSCode Interface

Download and install VSCode from here.

Add the Python extension, see this link (if not already installed).

Add the Jupyter extension, see this link (if not already installed).

From VSCode, select Open Folder... and navigate to and select the repository folder. You may be prompted to select if you trust the contents of the folder. Warning If you decline to trust the folder, it is unlikely that you will be able to run any of the Notebooks.

After selecting the folder, choose which Notebook you would like to run from the Explorer menu on the left side of the screen.

Once a Notebook is open, you must select the kernel from the Select Kernel button on the top right side of the screen. Choose the conda environment we created earlier dktutorial (Python 3.10.X).


Running Notebooks on Google Colab

For the fastest and smoothest experience, it is recommended to run the Notebooks locally. However, most Notebooks can be run online on the Google Colab platform. Click the links in the table at the top of the page to open a Notebook in Colab.


Citation Info

Please cite us if you use this work in your research, for Part 1:

@article{haviland2023dkt1,
  author={Haviland, Jesse and Corke, Peter},
  title={Manipulator Differential Kinematics: Part I: Kinematics, Velocity, and Applications},
  journal={IEEE Robotics \& Automation Magazine}, 
  year={2023},
  pages={2-12},
  doi={10.1109/MRA.2023.3270228}
}

and for Part 2:

@article{haviland2023dkt2,
  author={Haviland, Jesse and Corke, Peter},
  title={Manipulator Differential Kinematics: Part II: Acceleration and Advanced Applications},
  journal={IEEE Robotics \& Automation Magazine}, 
  year={2023},
  pages={2-12},
  doi={10.1109/MRA.2023.3270221}
}

Acknowledgements

This research was supported by the Queensland University of Technology Centre for Robotics (QCR).