roboticstoolbox-python


Nameroboticstoolbox-python JSON
Version 1.1.1 PyPI version JSON
download
home_pageNone
SummaryA Python library for robotics education and research
upload_time2024-05-11 10:57:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2020 jhavl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python robotics robotics-toolbox kinematics dynamics motion-planning trajectory-generation jacobian hessian control simulation robot-manipulator mobile-robot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Robotics Toolbox for Python

[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
[![Powered by Spatial Maths](https://raw.githubusercontent.com/petercorke/spatialmath-python/master/.github/svg/sm_powered.min.svg)](https://github.com/petercorke/spatialmath-python)
[![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)

[![PyPI version](https://badge.fury.io/py/roboticstoolbox-python.svg)](https://badge.fury.io/py/roboticstoolbox-python)
[![Anaconda version](https://anaconda.org/conda-forge/roboticstoolbox-python/badges/version.svg)](https://anaconda.org/conda-forge/roboticstoolbox-python)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/roboticstoolbox-python.svg)

[![Build Status](https://github.com/petercorke/robotics-toolbox-python/workflows/Test/badge.svg?branch=master)](https://github.com/petercorke/robotics-toolbox-python/actions?query=workflow%3ATest)
[![Coverage](https://codecov.io/gh/petercorke/robotics-toolbox-python/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/robotics-toolbox-python)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/roboticstoolbox-python)](https://pypistats.org/packages/roboticstoolbox-python)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<table style="border:0px">
<tr style="border:0px">
<td style="border:0px">
<img src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/RobToolBox_RoundLogoB.png" width="200"></td>
<td style="border:0px">
A Python implementation of the <a href="https://github.com/petercorke/robotics-toolbox-matlab">Robotics Toolbox for MATLAB<sup>&reg;</sup></a>
<ul>
<li><a href="https://github.com/petercorke/robotics-toolbox-python">GitHub repository </a></li>
<li><a href="https://petercorke.github.io/robotics-toolbox-python">Documentation</a></li>
<li><a href="#6">ICRA Paper</a></li>
<li><a href="https://github.com/petercorke/robotics-toolbox-python/wiki">Wiki (examples and details)</a></li>
</ul>
</td>
</tr>
</table>

<!-- <br> -->

## Contents

- [Synopsis](#1)
- [Getting going](#2)
- [Tutorials](#3)
- [Code Examples](#4)
- [Toolbox Research Applications](#5)
- [Toolbox ICRA Paper and Citation Info](#6)
- [Using the Toolbox in your Open Source Code?](#7)
- [Common Issues and Solutions](#8)

<br>

<a id='1'></a>

## Synopsis

This toolbox brings robotics-specific functionality to Python, and leverages
Python's advantages of portability, ubiquity and support, and the capability of
the open-source ecosystem for linear algebra (numpy, scipy), graphics
(matplotlib, three.js, WebGL), interactive development (jupyter, jupyterlab,
mybinder.org), and documentation (sphinx).

The Toolbox provides tools for representing the kinematics and dynamics of
serial-link manipulators - you can easily create your own in Denavit-Hartenberg
form, import a URDF file, or use over 30 supplied models for well-known
contemporary robots from Franka-Emika, Kinova, Universal Robotics, Rethink as
well as classical robots such as the Puma 560 and the Stanford arm.

The Toolbox contains fast implementations of kinematic operations. The forward
kinematics and the manipulator Jacobian can be computed in less than 1 microsecond
while numerical inverse kinematics can be solved in as little as 4 microseconds.

The toolbox also supports mobile robots with functions for robot motion models
(unicycle, bicycle), path planning algorithms (bug, distance transform, D\*,
PRM), kinodynamic planning (lattice, RRT), localization (EKF, particle filter),
map building (EKF) and simultaneous localization and mapping (EKF).

The Toolbox provides:

- code that is mature and provides a point of comparison for other
  implementations of the same algorithms;
- routines which are generally written in a straightforward manner which
  allows for easy understanding, perhaps at the expense of computational
  efficiency;
- source code which can be read for learning and teaching;
- backward compatability with the Robotics Toolbox for MATLAB

The Toolbox leverages the [Spatial Maths Toolbox for Python](https://github.com/petercorke/spatialmath-python) to
provide support for data types such as SO(n) and SE(n) matrices, quaternions, twists and spatial vectors.

<br>

<a id='2'></a>

## Getting going

You will need Python >= 3.6

### Using pip

Install a snapshot from PyPI

```shell script
pip3 install roboticstoolbox-python
```

Available options are:

- `collision` install collision checking with [pybullet](https://pybullet.org)

Put the options in a comma separated list like

```shell script
pip3 install roboticstoolbox-python[optionlist]
```

[Swift](https://github.com/jhavl/swift), a web-based visualizer, is
installed as part of Robotics Toolbox.

### From GitHub

To install the bleeding-edge version from GitHub

```shell script
git clone https://github.com/petercorke/robotics-toolbox-python.git
cd robotics-toolbox-python
pip3 install -e .
```

<br>

<a id='3'></a>

## Tutorials

<table style="border:0px">
<tr style="border:0px">
<td style="border:0px"><a href="https://bit.ly/3ak5GDi"><img src="https://github.com/jhavl/dkt/raw/main/img/article1.png" width="400"></a></td>
<td style="border:0px"><a href="https://bit.ly/3ak5GDi"><img src="https://github.com/jhavl/dkt/raw/main/img/article2.png" width="400"></a></td>
<td style="border:0px">
Do you want to learn about manipulator kinematics, differential kinematics, inverse-kinematics and motion control? Have a look at our
<a href="https://bit.ly/3ak5GDi">tutorial</a>.
This tutorial comes with two articles to cover the theory and 12 Jupyter Notebooks providing full code implementations and examples. Most of the Notebooks are also Google Colab compatible allowing them to run online.
</td>
</tr>
</table>

<br>

<a id='4'></a>

## Code Examples

We will load a model of the Franka-Emika Panda robot defined by a URDF file

```python
import roboticstoolbox as rtb
robot = rtb.models.Panda()
print(robot)

	ERobot: panda (by Franka Emika), 7 joints (RRRRRRR), 1 gripper, geometry, collision
	┌─────┬──────────────┬───────┬─────────────┬────────────────────────────────────────────────┐
	│link │     link     │ joint │   parent    │              ETS: parent to link               │
	├─────┼──────────────┼───────┼─────────────┼────────────────────────────────────────────────┤
	│   0 │ panda_link0  │       │ BASE        │                                                │
	│   1 │ panda_link1  │     0 │ panda_link0 │ SE3(0, 0, 0.333) ⊕ Rz(q0)                      │
	│   2 │ panda_link2  │     1 │ panda_link1 │ SE3(-90°, -0°, 0°) ⊕ Rz(q1)                    │
	│   3 │ panda_link3  │     2 │ panda_link2 │ SE3(0, -0.316, 0; 90°, -0°, 0°) ⊕ Rz(q2)       │
	│   4 │ panda_link4  │     3 │ panda_link3 │ SE3(0.0825, 0, 0; 90°, -0°, 0°) ⊕ Rz(q3)       │
	│   5 │ panda_link5  │     4 │ panda_link4 │ SE3(-0.0825, 0.384, 0; -90°, -0°, 0°) ⊕ Rz(q4) │
	│   6 │ panda_link6  │     5 │ panda_link5 │ SE3(90°, -0°, 0°) ⊕ Rz(q5)                     │
	│   7 │ panda_link7  │     6 │ panda_link6 │ SE3(0.088, 0, 0; 90°, -0°, 0°) ⊕ Rz(q6)        │
	│   8 │ @panda_link8 │       │ panda_link7 │ SE3(0, 0, 0.107)                               │
	└─────┴──────────────┴───────┴─────────────┴────────────────────────────────────────────────┘

	┌─────┬─────┬────────┬─────┬───────┬─────┬───────┬──────┐
	│name │ q0  │ q1     │ q2  │ q3    │ q4  │ q5    │ q6   │
	├─────┼─────┼────────┼─────┼───────┼─────┼───────┼──────┤
	│  qr │  0° │ -17.2° │  0° │ -126° │  0° │  115° │  45° │
	│  qz │  0° │  0°    │  0° │  0°   │  0° │  0°   │  0°  │
	└─────┴─────┴────────┴─────┴───────┴─────┴───────┴──────┘
```

The symbol `@` indicates the link as an end-effector, a leaf node in the rigid-body
tree (Python prompts are not shown to make it easy to copy+paste the code, console output is indented).
We will compute the forward kinematics next

```
Te = robot.fkine(robot.qr)  # forward kinematics
print(Te)

	0.995     0         0.09983   0.484
	0        -1         0         0
	0.09983   0        -0.995     0.4126
	0         0         0         1
```

We can solve inverse kinematics very easily. We first choose an SE(3) pose
defined in terms of position and orientation (end-effector z-axis down (A=-Z) and finger
orientation parallel to y-axis (O=+Y)).

```python
from spatialmath import SE3

Tep = SE3.Trans(0.6, -0.3, 0.1) * SE3.OA([0, 1, 0], [0, 0, -1])
sol = robot.ik_LM(Tep)         # solve IK
print(sol)

	(array([ 0.20592815,  0.86609481, -0.79473206, -1.68254794,  0.74872915,
			2.21764746, -0.10255606]), 1, 114, 7, 2.890164057230228e-07)

q_pickup = sol[0]
print(robot.fkine(q_pickup))    # FK shows that desired end-effector pose was achieved

	 1         -8.913e-05  -0.0003334  0.5996
	-8.929e-05 -1          -0.0004912 -0.2998
	-0.0003334  0.0004912  -1          0.1001
	 0          0           0          1
```

We can animate a path from the ready pose `qr` configuration to this pickup configuration

```python
qt = rtb.jtraj(robot.qr, q_pickup, 50)
robot.plot(qt.q, backend='pyplot', movie='panda1.gif')
```

<p align="center">
	<img src="./docs/figs/panda1.gif">
</p>

where we have specified the matplotlib `pyplot` backend. Blue arrows show the joint axes and the coloured frame shows the end-effector pose.

We can also plot the trajectory in the Swift simulator (a browser-based 3d-simulation environment built to work with the Toolbox)

```python
robot.plot(qt.q)
```

<p align="center">
	<img src="./docs/figs/panda2.gif">
</p>

We can also experiment with velocity controllers in Swift. Here is a resolved-rate motion control example

```python
import swift
import roboticstoolbox as rtb
import spatialmath as sm
import numpy as np

env = swift.Swift()
env.launch(realtime=True)

panda = rtb.models.Panda()
panda.q = panda.qr

Tep = panda.fkine(panda.q) * sm.SE3.Trans(0.2, 0.2, 0.45)

arrived = False
env.add(panda)

dt = 0.05

while not arrived:

    v, arrived = rtb.p_servo(panda.fkine(panda.q), Tep, 1)
    panda.qd = np.linalg.pinv(panda.jacobe(panda.q)) @ v
    env.step(dt)

# Uncomment to stop the browser tab from closing
# env.hold()
```

<p align="center">
	<img src="./docs/figs/panda3.gif">
</p>

### Run some examples

The [`notebooks`](https://github.com/petercorke/robotics-toolbox-python/tree/master/notebooks) folder contains some tutorial Jupyter notebooks which you can browse on GitHub. Additionally, have a look in the [`examples`](https://github.com/petercorke/robotics-toolbox-python/tree/master/roboticstoolbox/examples) folder for many ready to run examples.

<br>

<a id='5'></a>

## Toolbox Research Applications

The toolbox is incredibly useful for developing and prototyping algorithms for research, thanks to the exhaustive set of well documented and mature robotic functions exposed through clean and painless APIs. Additionally, the ease at which a user can visualize their algorithm supports a rapid prototyping paradigm.

### Publication List

J. Haviland, N. Sünderhauf and P. Corke, "**A Holistic Approach to Reactive Mobile Manipulation**," in _IEEE Robotics and Automation Letters_, doi: 10.1109/LRA.2022.3146554. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.

[[Arxiv Paper](https://arxiv.org/abs/2109.04749)] [[IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/9695298)] [[Project Website](https://jhavl.github.io/holistic/)] [[Video](https://youtu.be/-DXBQPeLIV4)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/holistic_mm_non_holonomic.py)]

<p>
  <a href="https://youtu.be/-DXBQPeLIV4">
    <img src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/holistic_youtube.png" width="560">
  </a>
</p>

J. Haviland and P. Corke, "**NEO: A Novel Expeditious Optimisation Algorithm for Reactive Motion Control of Manipulators**," in _IEEE Robotics and Automation Letters_, doi: 10.1109/LRA.2021.3056060. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.

[[Arxiv Paper](https://arxiv.org/abs/2010.08686)] [[IEEE Xplore](https://ieeexplore.ieee.org/document/9343718)] [[Project Website](https://jhavl.github.io/neo/)] [[Video](https://youtu.be/jSLPJBr8QTY)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/neo.py)]

<p>
  <a href="https://youtu.be/jSLPJBr8QTY">
    <img src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/neo_youtube.png" width="560">
  </a>
</p>

**A Purely-Reactive Manipulability-Maximising Motion Controller**, J. Haviland and P. Corke. In the video, the robot is controlled using the Robotics toolbox for Python.

[[Paper](https://arxiv.org/abs/2002.11901)] [[Project Website](https://jhavl.github.io/mmc/)] [[Video](https://youtu.be/Vu_rcPlaADI)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/mmc.py)]

<p>
  <a href="https://youtu.be/Vu_rcPlaADI">
    <img src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/mmc_youtube.png" width="560">
  </a>
</p>

<br>

<br>

<a id='6'></a>

## Toolbox ICRA Paper and Citation Info

Check out our ICRA 2021 paper on [IEEE Xplore](https://ieeexplore.ieee.org/document/9561366) or get the PDF from [Peter's website](https://bit.ly/3ChcyNp).

If the toolbox helped you in your research, please cite

```
@inproceedings{rtb,
  title={Not your grandmother’s toolbox--the Robotics Toolbox reinvented for Python},
  author={Corke, Peter and Haviland, Jesse},
  booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)},
  pages={11357--11363},
  year={2021},
  organization={IEEE}
}
```

<br>

<a id='7'></a>

## Using the Toolbox in your Open Source Code?

If you are using the Toolbox in your open source code, feel free to add our badge to your readme!

For the powered by robotics toolbox badge

[![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)

copy the following

```
[![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)
```

For the powered by python robotics badge

[![Powered by Python Robotics](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/pr_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)

copy the following

```
[![Powered by Python Robotics](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/pr_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
```

<br>

<a id='8'></a>

## Common Issues and Solutions

See the common issues with fixes [here](https://github.com/petercorke/robotics-toolbox-python/wiki/Common-Issues).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "roboticstoolbox-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "python, robotics, robotics-toolbox, kinematics, dynamics, motion-planning, trajectory-generation, jacobian, hessian, control, simulation, robot-manipulator, mobile-robot",
    "author": null,
    "author_email": "Jesse Haviland <j.haviland@qut.edu.au>, Peter Corke <rvc@petercorke.com>",
    "download_url": "https://files.pythonhosted.org/packages/06/ba/c7534df8fb3f04c48862f24f1b4118c0d1e793fdf78e90fe514cbf404e01/roboticstoolbox_python-1.1.1.tar.gz",
    "platform": null,
    "description": "# Robotics Toolbox for Python\n\n[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)\n[![Powered by Spatial Maths](https://raw.githubusercontent.com/petercorke/spatialmath-python/master/.github/svg/sm_powered.min.svg)](https://github.com/petercorke/spatialmath-python)\n[![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)\n\n[![PyPI version](https://badge.fury.io/py/roboticstoolbox-python.svg)](https://badge.fury.io/py/roboticstoolbox-python)\n[![Anaconda version](https://anaconda.org/conda-forge/roboticstoolbox-python/badges/version.svg)](https://anaconda.org/conda-forge/roboticstoolbox-python)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/roboticstoolbox-python.svg)\n\n[![Build Status](https://github.com/petercorke/robotics-toolbox-python/workflows/Test/badge.svg?branch=master)](https://github.com/petercorke/robotics-toolbox-python/actions?query=workflow%3ATest)\n[![Coverage](https://codecov.io/gh/petercorke/robotics-toolbox-python/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/robotics-toolbox-python)\n[![PyPI - Downloads](https://img.shields.io/pypi/dw/roboticstoolbox-python)](https://pypistats.org/packages/roboticstoolbox-python)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<table style=\"border:0px\">\n<tr style=\"border:0px\">\n<td style=\"border:0px\">\n<img src=\"https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/RobToolBox_RoundLogoB.png\" width=\"200\"></td>\n<td style=\"border:0px\">\nA Python implementation of the <a href=\"https://github.com/petercorke/robotics-toolbox-matlab\">Robotics Toolbox for MATLAB<sup>&reg;</sup></a>\n<ul>\n<li><a href=\"https://github.com/petercorke/robotics-toolbox-python\">GitHub repository </a></li>\n<li><a href=\"https://petercorke.github.io/robotics-toolbox-python\">Documentation</a></li>\n<li><a href=\"#6\">ICRA Paper</a></li>\n<li><a href=\"https://github.com/petercorke/robotics-toolbox-python/wiki\">Wiki (examples and details)</a></li>\n</ul>\n</td>\n</tr>\n</table>\n\n<!-- <br> -->\n\n## Contents\n\n- [Synopsis](#1)\n- [Getting going](#2)\n- [Tutorials](#3)\n- [Code Examples](#4)\n- [Toolbox Research Applications](#5)\n- [Toolbox ICRA Paper and Citation Info](#6)\n- [Using the Toolbox in your Open Source Code?](#7)\n- [Common Issues and Solutions](#8)\n\n<br>\n\n<a id='1'></a>\n\n## Synopsis\n\nThis toolbox brings robotics-specific functionality to Python, and leverages\nPython's advantages of portability, ubiquity and support, and the capability of\nthe open-source ecosystem for linear algebra (numpy, scipy), graphics\n(matplotlib, three.js, WebGL), interactive development (jupyter, jupyterlab,\nmybinder.org), and documentation (sphinx).\n\nThe Toolbox provides tools for representing the kinematics and dynamics of\nserial-link manipulators - you can easily create your own in Denavit-Hartenberg\nform, import a URDF file, or use over 30 supplied models for well-known\ncontemporary robots from Franka-Emika, Kinova, Universal Robotics, Rethink as\nwell as classical robots such as the Puma 560 and the Stanford arm.\n\nThe Toolbox contains fast implementations of kinematic operations. The forward\nkinematics and the manipulator Jacobian can be computed in less than 1 microsecond\nwhile numerical inverse kinematics can be solved in as little as 4 microseconds.\n\nThe toolbox also supports mobile robots with functions for robot motion models\n(unicycle, bicycle), path planning algorithms (bug, distance transform, D\\*,\nPRM), kinodynamic planning (lattice, RRT), localization (EKF, particle filter),\nmap building (EKF) and simultaneous localization and mapping (EKF).\n\nThe Toolbox provides:\n\n- code that is mature and provides a point of comparison for other\n  implementations of the same algorithms;\n- routines which are generally written in a straightforward manner which\n  allows for easy understanding, perhaps at the expense of computational\n  efficiency;\n- source code which can be read for learning and teaching;\n- backward compatability with the Robotics Toolbox for MATLAB\n\nThe Toolbox leverages the [Spatial Maths Toolbox for Python](https://github.com/petercorke/spatialmath-python) to\nprovide support for data types such as SO(n) and SE(n) matrices, quaternions, twists and spatial vectors.\n\n<br>\n\n<a id='2'></a>\n\n## Getting going\n\nYou will need Python >= 3.6\n\n### Using pip\n\nInstall a snapshot from PyPI\n\n```shell script\npip3 install roboticstoolbox-python\n```\n\nAvailable options are:\n\n- `collision` install collision checking with [pybullet](https://pybullet.org)\n\nPut the options in a comma separated list like\n\n```shell script\npip3 install roboticstoolbox-python[optionlist]\n```\n\n[Swift](https://github.com/jhavl/swift), a web-based visualizer, is\ninstalled as part of Robotics Toolbox.\n\n### From GitHub\n\nTo install the bleeding-edge version from GitHub\n\n```shell script\ngit clone https://github.com/petercorke/robotics-toolbox-python.git\ncd robotics-toolbox-python\npip3 install -e .\n```\n\n<br>\n\n<a id='3'></a>\n\n## Tutorials\n\n<table style=\"border:0px\">\n<tr style=\"border:0px\">\n<td style=\"border:0px\"><a href=\"https://bit.ly/3ak5GDi\"><img src=\"https://github.com/jhavl/dkt/raw/main/img/article1.png\" width=\"400\"></a></td>\n<td style=\"border:0px\"><a href=\"https://bit.ly/3ak5GDi\"><img src=\"https://github.com/jhavl/dkt/raw/main/img/article2.png\" width=\"400\"></a></td>\n<td style=\"border:0px\">\nDo you want to learn about manipulator kinematics, differential kinematics, inverse-kinematics and motion control? Have a look at our\n<a href=\"https://bit.ly/3ak5GDi\">tutorial</a>.\nThis tutorial comes with two articles to cover the theory and 12 Jupyter Notebooks providing full code implementations and examples. Most of the Notebooks are also Google Colab compatible allowing them to run online.\n</td>\n</tr>\n</table>\n\n<br>\n\n<a id='4'></a>\n\n## Code Examples\n\nWe will load a model of the Franka-Emika Panda robot defined by a URDF file\n\n```python\nimport roboticstoolbox as rtb\nrobot = rtb.models.Panda()\nprint(robot)\n\n\tERobot: panda (by Franka Emika), 7 joints (RRRRRRR), 1 gripper, geometry, collision\n\t\u250c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\t\u2502link \u2502     link     \u2502 joint \u2502   parent    \u2502              ETS: parent to link               \u2502\n\t\u251c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\t\u2502   0 \u2502 panda_link0  \u2502       \u2502 BASE        \u2502                                                \u2502\n\t\u2502   1 \u2502 panda_link1  \u2502     0 \u2502 panda_link0 \u2502 SE3(0, 0, 0.333) \u2295 Rz(q0)                      \u2502\n\t\u2502   2 \u2502 panda_link2  \u2502     1 \u2502 panda_link1 \u2502 SE3(-90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q1)                    \u2502\n\t\u2502   3 \u2502 panda_link3  \u2502     2 \u2502 panda_link2 \u2502 SE3(0, -0.316, 0; 90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q2)       \u2502\n\t\u2502   4 \u2502 panda_link4  \u2502     3 \u2502 panda_link3 \u2502 SE3(0.0825, 0, 0; 90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q3)       \u2502\n\t\u2502   5 \u2502 panda_link5  \u2502     4 \u2502 panda_link4 \u2502 SE3(-0.0825, 0.384, 0; -90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q4) \u2502\n\t\u2502   6 \u2502 panda_link6  \u2502     5 \u2502 panda_link5 \u2502 SE3(90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q5)                     \u2502\n\t\u2502   7 \u2502 panda_link7  \u2502     6 \u2502 panda_link6 \u2502 SE3(0.088, 0, 0; 90\u00b0, -0\u00b0, 0\u00b0) \u2295 Rz(q6)        \u2502\n\t\u2502   8 \u2502 @panda_link8 \u2502       \u2502 panda_link7 \u2502 SE3(0, 0, 0.107)                               \u2502\n\t\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n\t\u250c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\t\u2502name \u2502 q0  \u2502 q1     \u2502 q2  \u2502 q3    \u2502 q4  \u2502 q5    \u2502 q6   \u2502\n\t\u251c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\t\u2502  qr \u2502  0\u00b0 \u2502 -17.2\u00b0 \u2502  0\u00b0 \u2502 -126\u00b0 \u2502  0\u00b0 \u2502  115\u00b0 \u2502  45\u00b0 \u2502\n\t\u2502  qz \u2502  0\u00b0 \u2502  0\u00b0    \u2502  0\u00b0 \u2502  0\u00b0   \u2502  0\u00b0 \u2502  0\u00b0   \u2502  0\u00b0  \u2502\n\t\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nThe symbol `@` indicates the link as an end-effector, a leaf node in the rigid-body\ntree (Python prompts are not shown to make it easy to copy+paste the code, console output is indented).\nWe will compute the forward kinematics next\n\n```\nTe = robot.fkine(robot.qr)  # forward kinematics\nprint(Te)\n\n\t0.995     0         0.09983   0.484\n\t0        -1         0         0\n\t0.09983   0        -0.995     0.4126\n\t0         0         0         1\n```\n\nWe can solve inverse kinematics very easily. We first choose an SE(3) pose\ndefined in terms of position and orientation (end-effector z-axis down (A=-Z) and finger\norientation parallel to y-axis (O=+Y)).\n\n```python\nfrom spatialmath import SE3\n\nTep = SE3.Trans(0.6, -0.3, 0.1) * SE3.OA([0, 1, 0], [0, 0, -1])\nsol = robot.ik_LM(Tep)         # solve IK\nprint(sol)\n\n\t(array([ 0.20592815,  0.86609481, -0.79473206, -1.68254794,  0.74872915,\n\t\t\t2.21764746, -0.10255606]), 1, 114, 7, 2.890164057230228e-07)\n\nq_pickup = sol[0]\nprint(robot.fkine(q_pickup))    # FK shows that desired end-effector pose was achieved\n\n\t 1         -8.913e-05  -0.0003334  0.5996\n\t-8.929e-05 -1          -0.0004912 -0.2998\n\t-0.0003334  0.0004912  -1          0.1001\n\t 0          0           0          1\n```\n\nWe can animate a path from the ready pose `qr` configuration to this pickup configuration\n\n```python\nqt = rtb.jtraj(robot.qr, q_pickup, 50)\nrobot.plot(qt.q, backend='pyplot', movie='panda1.gif')\n```\n\n<p align=\"center\">\n\t<img src=\"./docs/figs/panda1.gif\">\n</p>\n\nwhere we have specified the matplotlib `pyplot` backend. Blue arrows show the joint axes and the coloured frame shows the end-effector pose.\n\nWe can also plot the trajectory in the Swift simulator (a browser-based 3d-simulation environment built to work with the Toolbox)\n\n```python\nrobot.plot(qt.q)\n```\n\n<p align=\"center\">\n\t<img src=\"./docs/figs/panda2.gif\">\n</p>\n\nWe can also experiment with velocity controllers in Swift. Here is a resolved-rate motion control example\n\n```python\nimport swift\nimport roboticstoolbox as rtb\nimport spatialmath as sm\nimport numpy as np\n\nenv = swift.Swift()\nenv.launch(realtime=True)\n\npanda = rtb.models.Panda()\npanda.q = panda.qr\n\nTep = panda.fkine(panda.q) * sm.SE3.Trans(0.2, 0.2, 0.45)\n\narrived = False\nenv.add(panda)\n\ndt = 0.05\n\nwhile not arrived:\n\n    v, arrived = rtb.p_servo(panda.fkine(panda.q), Tep, 1)\n    panda.qd = np.linalg.pinv(panda.jacobe(panda.q)) @ v\n    env.step(dt)\n\n# Uncomment to stop the browser tab from closing\n# env.hold()\n```\n\n<p align=\"center\">\n\t<img src=\"./docs/figs/panda3.gif\">\n</p>\n\n### Run some examples\n\nThe [`notebooks`](https://github.com/petercorke/robotics-toolbox-python/tree/master/notebooks) folder contains some tutorial Jupyter notebooks which you can browse on GitHub. Additionally, have a look in the [`examples`](https://github.com/petercorke/robotics-toolbox-python/tree/master/roboticstoolbox/examples) folder for many ready to run examples.\n\n<br>\n\n<a id='5'></a>\n\n## Toolbox Research Applications\n\nThe toolbox is incredibly useful for developing and prototyping algorithms for research, thanks to the exhaustive set of well documented and mature robotic functions exposed through clean and painless APIs. Additionally, the ease at which a user can visualize their algorithm supports a rapid prototyping paradigm.\n\n### Publication List\n\nJ. Haviland, N. S\u00fcnderhauf and P. Corke, \"**A Holistic Approach to Reactive Mobile Manipulation**,\" in _IEEE Robotics and Automation Letters_, doi: 10.1109/LRA.2022.3146554. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.\n\n[[Arxiv Paper](https://arxiv.org/abs/2109.04749)] [[IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/9695298)] [[Project Website](https://jhavl.github.io/holistic/)] [[Video](https://youtu.be/-DXBQPeLIV4)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/holistic_mm_non_holonomic.py)]\n\n<p>\n  <a href=\"https://youtu.be/-DXBQPeLIV4\">\n    <img src=\"https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/holistic_youtube.png\" width=\"560\">\n  </a>\n</p>\n\nJ. Haviland and P. Corke, \"**NEO: A Novel Expeditious Optimisation Algorithm for Reactive Motion Control of Manipulators**,\" in _IEEE Robotics and Automation Letters_, doi: 10.1109/LRA.2021.3056060. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.\n\n[[Arxiv Paper](https://arxiv.org/abs/2010.08686)] [[IEEE Xplore](https://ieeexplore.ieee.org/document/9343718)] [[Project Website](https://jhavl.github.io/neo/)] [[Video](https://youtu.be/jSLPJBr8QTY)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/neo.py)]\n\n<p>\n  <a href=\"https://youtu.be/jSLPJBr8QTY\">\n    <img src=\"https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/neo_youtube.png\" width=\"560\">\n  </a>\n</p>\n\n**A Purely-Reactive Manipulability-Maximising Motion Controller**, J. Haviland and P. Corke. In the video, the robot is controlled using the Robotics toolbox for Python.\n\n[[Paper](https://arxiv.org/abs/2002.11901)] [[Project Website](https://jhavl.github.io/mmc/)] [[Video](https://youtu.be/Vu_rcPlaADI)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/roboticstoolbox/examples/mmc.py)]\n\n<p>\n  <a href=\"https://youtu.be/Vu_rcPlaADI\">\n    <img src=\"https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/mmc_youtube.png\" width=\"560\">\n  </a>\n</p>\n\n<br>\n\n<br>\n\n<a id='6'></a>\n\n## Toolbox ICRA Paper and Citation Info\n\nCheck out our ICRA 2021 paper on [IEEE Xplore](https://ieeexplore.ieee.org/document/9561366) or get the PDF from [Peter's website](https://bit.ly/3ChcyNp).\n\nIf the toolbox helped you in your research, please cite\n\n```\n@inproceedings{rtb,\n  title={Not your grandmother\u2019s toolbox--the Robotics Toolbox reinvented for Python},\n  author={Corke, Peter and Haviland, Jesse},\n  booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)},\n  pages={11357--11363},\n  year={2021},\n  organization={IEEE}\n}\n```\n\n<br>\n\n<a id='7'></a>\n\n## Using the Toolbox in your Open Source Code?\n\nIf you are using the Toolbox in your open source code, feel free to add our badge to your readme!\n\nFor the powered by robotics toolbox badge\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\ncopy the following\n\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```\n\nFor the powered by python robotics badge\n\n[![Powered by Python Robotics](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/pr_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)\n\ncopy the following\n\n```\n[![Powered by Python Robotics](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/pr_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)\n```\n\n<br>\n\n<a id='8'></a>\n\n## Common Issues and Solutions\n\nSee the common issues with fixes [here](https://github.com/petercorke/robotics-toolbox-python/wiki/Common-Issues).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 jhavl  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A Python library for robotics education and research",
    "version": "1.1.1",
    "project_urls": {
        "documentation": "https://petercorke.github.io/robotics-toolbox-python/",
        "homepage": "https://github.com/petercorke/robotics-toolbox-python",
        "repository": "https://github.com/petercorke/robotics-toolbox-python"
    },
    "split_keywords": [
        "python",
        " robotics",
        " robotics-toolbox",
        " kinematics",
        " dynamics",
        " motion-planning",
        " trajectory-generation",
        " jacobian",
        " hessian",
        " control",
        " simulation",
        " robot-manipulator",
        " mobile-robot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a551ed9799fc96dbac9147c683acbd9531bcc7492ed16081784b12d7ad626880",
                "md5": "041488da517bd34cdf9a6777884c64fc",
                "sha256": "70880605dde08c96b7c1f03ca16abaf79cd7e6501ba7ddfe4ccea933d15bdc08"
            },
            "downloads": -1,
            "filename": "roboticstoolbox_python-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "041488da517bd34cdf9a6777884c64fc",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.7",
            "size": 1958926,
            "upload_time": "2024-05-11T10:57:46",
            "upload_time_iso_8601": "2024-05-11T10:57:46.833043Z",
            "url": "https://files.pythonhosted.org/packages/a5/51/ed9799fc96dbac9147c683acbd9531bcc7492ed16081784b12d7ad626880/roboticstoolbox_python-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06bac7534df8fb3f04c48862f24f1b4118c0d1e793fdf78e90fe514cbf404e01",
                "md5": "3fd301b0faebe64f00e0ed8314cf0f59",
                "sha256": "2615f808784b91907927ab40e39cc2e34db89a53e71a14b40f973756122ea9e4"
            },
            "downloads": -1,
            "filename": "roboticstoolbox_python-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3fd301b0faebe64f00e0ed8314cf0f59",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1458926,
            "upload_time": "2024-05-11T10:57:56",
            "upload_time_iso_8601": "2024-05-11T10:57:56.394369Z",
            "url": "https://files.pythonhosted.org/packages/06/ba/c7534df8fb3f04c48862f24f1b4118c0d1e793fdf78e90fe514cbf404e01/roboticstoolbox_python-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 10:57:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "petercorke",
    "github_project": "robotics-toolbox-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "roboticstoolbox-python"
}
        
Elapsed time: 0.26565s