Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

suddrey-qut/robotics-toolbox-python

Open more actions menu
 
 

Repository files navigation

Robotics Toolbox for Python

stability-wip Binder

Language grade: Python Build Status Coverage License: MIT QUT Centre for Robotics Open Source

A Python implementation of the Robotics Toolbox for MATLAB®

Synopsis

This toolbox brings robotics specific functionality to Python, and leverages the 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 create your own in Denavit-Hartenberg form, import a URDF file, or use supplied models for well known robots from Franka-Emika, Kinova, Universal Robotics, Rethink as well as classical robots such as the Puma 560 and the Stanford arm.

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.

Code Example

>>> import roboticstoolbox as rtb
>>> p560 = rtb.models.DH.Puma560()
>>> print(p560)

┏━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━┓
┃θⱼdⱼaⱼ   ┃  ⍺  ┃
┣━━━╋━━━━━━━━━╋━━━━━━━━╋━━━━━━┫
┃q10.6720None ┃
┃q200.4318None ┃
┃q30.150050.0203None ┃
┃q40.43180None ┃
┃q500None ┃
┃q600None ┃
┗━━━┻━━━━━━━━━┻━━━━━━━━┻━━━━━━┛

┌───┬────────────────────────────┐
│qz0°, 0°, 0°, 0°, 0°, 0°     │
│qr0°, 90°, -90°, 0°, 0°, 0°  │
│qs0°, 0°, -90°, 0°, 0°, 0°   │
│qn0°, 45°, 180°, 0°, 45°, 0° │
└───┴────────────────────────────┘

>>> p560.fkine([0, 0, 0, 0, 0, 0])  # forward kinematics
   1           0           0           0.4521       
   0           1           0          -0.15005      
   0           0           1           0.4318       
   0           0           0           1            

We can animate a path

qt = rtb.tools.trajectory.jtraj(p560.qz, p560.qr, 50)
p560.plot(qt.q)

Puma robot animation

which uses the default matplotlib backend. We can instantiate our robot inside the 3d simulation environment

env = rtb.backend.Sim()
env.launch()
env.add(p560)
# inv kienmatis example here
# jacobian

Getting going

Installing

You will need Python >= 3.6

Using pip

Install a snapshot from PyPI

pip3 install roboticstoolbox-python

Available options are:

  • vpython install VPython backend
  • collision install collision checking with pybullet

Put the options in a comma separated list like

pip3 install roboticstoolbox-python[optionlist]

From GitHub

To install the bleeding-edge version from GitHub

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

Installing Swift

Run some examples

The notebooks folder contains some tutorial Jupyter notebooks which you can browse on GitHub.

Or you can run them, and experiment with them, at mybinder.org.

About

Robotics Toolbox for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.8%
  • C 2.0%
  • Other 0.2%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.