{"id":28233115,"url":"https://github.com/jhavl/dkt","last_synced_at":"2025-10-14T20:34:23.694Z","repository":{"id":43551528,"uuid":"507704401","full_name":"jhavl/dkt","owner":"jhavl","description":"A Tutorial on Manipulator Differential Kinematics","archived":false,"fork":false,"pushed_at":"2023-07-27T21:05:31.000Z","size":2077,"stargazers_count":435,"open_issues_count":0,"forks_count":55,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-14T21:41:40.239Z","etag":null,"topics":["hessian","inverse-kinematics","jacobian","kinematics","manipulation","python","robot-manipulation","robot-manipulator","robotics","robotics-control","robotics-simulation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhavl.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-26T23:09:58.000Z","updated_at":"2025-06-12T08:26:22.000Z","dependencies_parsed_at":"2023-01-30T02:45:40.044Z","dependency_job_id":null,"html_url":"https://github.com/jhavl/dkt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhavl/dkt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhavl%2Fdkt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhavl%2Fdkt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhavl%2Fdkt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhavl%2Fdkt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhavl","download_url":"https://codeload.github.com/jhavl/dkt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhavl%2Fdkt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020901,"owners_count":26086948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hessian","inverse-kinematics","jacobian","kinematics","manipulation","python","robot-manipulation","robot-manipulator","robotics","robotics-control","robotics-simulation"],"created_at":"2025-05-18T20:10:34.527Z","updated_at":"2025-10-14T20:34:23.680Z","avatar_url":"https://github.com/jhavl.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Tutorial on Manipulator Differential Kinematics\n\n[![Powered by the Robotics Toolbox](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/rtb_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/roboticstoolbox-python.svg)\n[![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**By [Jesse Haviland](https://jhavl.com/) and [Peter Corke](https://petercorke.com/)**\n\nThis 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.\n\n\u003ctable style=\"border:0px\"\u003e\n\u003ctr style=\"border:0px\"\u003e\n    \u003ctd style=\"border:0px\"\u003e\n        \u003ca href=\"https://bit.ly/3P37X4v\"\u003e\u003cimg src=\"https://github.com/jhavl/dkt/raw/main/img/article1.png\" width=\"260\"\u003e\u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"border:0px\"\u003e\n        \u003cb\u003ePart 1: Kinematics, Velocity, and Applications\u003c/b\u003e\n        \u003cul\u003e\n            \u003cli\u003e\n                \u003ca href=\"https://bit.ly/42Zoxcr\"\u003eAccess Published Article via IEEE Xplore \u003c/a\u003e\n            \u003c/li\u003e\n            \u003cli\u003e\n                \u003ca href=\"https://bit.ly/3P37X4v\"\u003eAccess Article Preprint from Arxiv \u003c/a\u003e\n            \u003c/li\u003e\n        \u003c/ul\u003e\n        \u003ctable\u003e\n            \u003ctr\u003e\n                \u003cth\u003eJupyter Notebooks\u003c/th\u003e\n                \u003cth\u003eOpen in Colab Link\u003c/th\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%201/1%20Manipulator%20Kinematics.ipynb\"\u003e1 Manipulator Kinematics \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%201/1%20Manipulator%20Kinematics.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%201/2%20The%20Manipulator%20Jacobian.ipynb\"\u003e2 The Manipulator Jacobian \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%201/2%20The%20Manipulator%20Jacobian.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%201/3%20Resolved-Rate%20Motion%20Control.ipynb\"\u003e3 Resolved-Rate Motion Control \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    Will not run on Colab\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%201/4%20Numerical%20Inverse%20Kinematics.ipynb\"\u003e4 Numerical Inverse Kinematics \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%201/4%20Numerical%20Inverse%20Kinematics.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%201/5%20Manipulator%20Performance%20Measures.ipynb\"\u003e5 Manipulator Performance Measures \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%201/5%20Manipulator%20Performance%20Measures.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/table\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable style=\"border:0px\"\u003e\n\u003ctr style=\"border:0px\"\u003e\n    \u003ctd style=\"border:0px\"\u003e\n        \u003ca href=\"https://bit.ly/3bPKu8v\"\u003e\u003cimg src=\"https://github.com/jhavl/dkt/raw/main/img/article2.png\" width=\"260\"\u003e \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"border:0px\"\u003e\n        \u003cb\u003ePart 2: Acceleration and Advanced Applications\u003c/b\u003e\n        \u003cul\u003e\n            \u003cli\u003e\n                \u003ca href=\"https://bit.ly/41MHPks\"\u003eAccess Published Article via IEEE Xplore \u003c/a\u003e\n            \u003c/li\u003e\n            \u003cli\u003e\n                \u003ca href=\"https://bit.ly/3bPKu8v\"\u003eAccess Article Preprint from Arxiv \u003c/a\u003e\n            \u003c/li\u003e\n        \u003c/ul\u003e\n        \u003ctable\u003e\n            \u003ctr\u003e\n                \u003cth\u003eJupyter Notebooks\u003c/th\u003e\n                \u003cth\u003eOpen in Colab Link\u003c/th\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/1%20The%20Manipulator%20Hessian.ipynb\"\u003e1 The Manipulator Hessian  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%202/1%20The%20Manipulator%20Hessian.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/2%20Higher%20Order%20Derivatives.ipynb\"\u003e2 Higher Order Derivatives  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%202/2%20Higher%20Order%20Derivatives.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/3%20Analytic%20Forms.ipynb\"\u003e3 Analytic Forms  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%202/3%20Analytic%20Forms.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/4%20Null-Space%20Projection%20for%20Motion%20Control.ipynb\"\u003e4 Null-Space Projection for Motion Control  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    Will not run on Colab\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/5%20Quadratic%20Programming%20for%20Motion%20Control.ipynb\"\u003e5 Quadratic Programming for Motion Control  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd\u003e\n                    Will not run on Colab\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/6%20Advanced%20Numerical%20Inverse%20Kinematics.ipynb\"\u003e6 Advanced Numerical Inverse Kinematics  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    \u003ca href=\"https://colab.research.google.com/github/jhavl/dkt/blob/main/Part%202/6%20Advanced%20Numerical%20Inverse%20Kinematics.ipynb\"\u003e\n                        \u003cimg alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" /\u003e\n                    \u003c/a\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\n                    \u003ca href=\"https://github.com/jhavl/dkt/blob/main/Part%202/7%20Quadratic-Rate%20Motion%20Control.ipynb\"\u003e7 Quadratic-Rate Motion Control  \u003c/a\u003e\n                \u003c/td\u003e\n                \u003ctd style=\"text-align: center; vertical-align: middle;\"\u003e\n                    Will not run on Colab\n                \u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/table\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n## Contents\n\n- [Synopsis](#1)\n- [Python Setup Guide](#2)\n- [Running Notebooks Locally](#3)\n- [Running Notebooks on Google Colab](#4)\n- [Citation Info](#5)\n- [Acknowledgements](#6)\n\n\u003cbr\u003e\n\n\u003ca id='1'\u003e\u003c/a\u003e\n\n## Synopsis\n\nManipulator 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.\n\nIn 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.\n\nIn 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.\n\n\u003cbr\u003e\n\n\u003ca id='2'\u003e\u003c/a\u003e\n\n## Python Setup Guide\n\nThe 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`.\n\nThe 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).\n\n### Conda Environment Setup Guide\n\nDownload `miniconda` from [here](https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links) while choosing the link for your operating system and architecture.\n\nFollow the Conda install instructions from [here](https://conda.io/projects/conda/en/latest/user-guide/install/index.html#installation).\n\nIn the terminal, make a new `conda` environment. We called our environment `dktutorial` and recommend choosing Python version `3.10`\n\n```bash\nconda create --name dktutorial python=3.10\n```\n\nWe need to activate our environment to use it\n\n```bash\nconda activate dktutorial\n```\n\nCheck out this [link](https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf) for a handy Conda command cheat sheet. There is also a ~30 minute Conda Tutorial available [here](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html).\n\n### Python Package Install Guide\n\nWe require several Python packages to run the Notebooks. You should activate the Conda environment before completing this stage.\n\nWe use IPython and Jupyter notebook\n\n```bash\npip install ipython notebook\n```\n\nInstall the Robotics Toolbox for Python and associated packages. This will also install other requirements such as Swift and Spatialmath-Python.\n\n```bash\npip install \"roboticstoolbox-python\u003e=1.1.0\"\n```\n\nFor Notebooks in Part II we need `sympy` and `qpsolvers`\n\n```bash\npip install sympy qpsolvers[quadprog]\n```\n\n\u003cbr\u003e\n\n\u003ca id='3'\u003e\u003c/a\u003e\n\n## Running Notebooks Locally\n\nWe have tested the Notebooks in the default Jupyter Notebook web interface and the VSCode Notebook extension.\n\n### Clone the Repository\n\nFirstly, you must clone the repository\n\n```bash\ngit clone https://github.com/jhavl/dkt.git\ncd dkt\n```\n\n### Running in the Jupyter Notebook Web Interface\n\nIn terminal, activate the conda environment, navigate to the repository folder and run\n\n```bash\nconda activate dktutorial\ncd \"path_to_repo/dkt\"\njupyter-notebook\n```\n\n### Running in the VSCode Interface\n\nDownload and install VSCode from [here](https://code.visualstudio.com/).\n\nAdd the `Python` extension, see this [link](https://marketplace.visualstudio.com/items?itemName=ms-python.python) (if not already installed).\n\nAdd the `Jupyter` extension, see this [link](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) (if not already installed).\n\nFrom 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.\n\nAfter selecting the folder, choose which Notebook you would like to run from the Explorer menu on the left side of the screen.\n\nOnce 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)`.\n\n\u003cbr\u003e\n\n\u003ca id='4'\u003e\u003c/a\u003e\n\n## Running Notebooks on Google Colab\n\nFor 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.\n\n\u003cbr\u003e\n\n\u003ca id='5'\u003e\u003c/a\u003e\n\n## Citation Info\n\nPlease cite us if you use this work in your research, for Part 1:\n\n```\n@article{haviland2023dkt1,\n  author={Haviland, Jesse and Corke, Peter},\n  title={Manipulator Differential Kinematics: Part I: Kinematics, Velocity, and Applications},\n  journal={IEEE Robotics \\\u0026 Automation Magazine}, \n  year={2023},\n  pages={2-12},\n  doi={10.1109/MRA.2023.3270228}\n}\n```\n\nand for Part 2:\n\n```\n@article{haviland2023dkt2,\n  author={Haviland, Jesse and Corke, Peter},\n  title={Manipulator Differential Kinematics: Part II: Acceleration and Advanced Applications},\n  journal={IEEE Robotics \\\u0026 Automation Magazine}, \n  year={2023},\n  pages={2-12},\n  doi={10.1109/MRA.2023.3270221}\n}\n```\n\n\u003cbr\u003e\n\n\u003ca id='6'\u003e\u003c/a\u003e\n\n## Acknowledgements\n\nThis research was supported by the Queensland University of Technology Centre for Robotics ([QCR](https://research.qut.edu.au/qcr/)).\n\n\u003cimg src=\"https://github.com/jhavl/dkt/raw/main/img/qcr.png\" width=\"600\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhavl%2Fdkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhavl%2Fdkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhavl%2Fdkt/lists"}