Skip to main content

PyPI version Build Status Coverage License: MIT

ropy

A robotics library for Python

Used in

J. Haviland and P. Corke, "Maximising manipulability during resolved-rate motion control," arXiv preprint arXiv:2002.11901, 2020. [arxiv] [project website] [video]

Installing

Requires Python ≥ 3.5.

git clone https://github.com/jhavl/ropy.git
cd ropy
pip3 install -e .

Usage

Arm-Type Robots

import ropy as rp
import numpy as np

# Initialise a Franka-Emika Panda robot
panda = rp.Panda()

# Set the joint angles of the robot
q0 = np.array([0, -1.57, -1.57, 1.57, 0, -1.57, 1.57])
panda.q = q0

# Calculate the forward kinematics of the robot at joint angles q0
panda.fkine(q0)
# or
panda.fkine()  # Use the robot's attribute q set by panda.q =

# Calculate the Kinematic Jacobian (in the world frame) at joint angles q0
panda.jacob0(q0)
# or
panda.jacob0()

# Calculate the manipulability of the robot at joint angles q0
panda.manipulability(q0)
# or
panda.manipulability()

# Calculate the Kinematic Hessian (in the world frame) at joint angles q0
panda.hessian0(q0)
# or
panda.hessian0()

# Print the Elementary Transform Sequence (ETS) of the robot
print(panda)

Manipulability Motion Control Example

This example implements Manipulability Motion Control from this paper within a position-based servoing scheme. We use the library qpsolvers to solve the optimisation function. However, you can use whichever solver you wish.

import ropy as rp
import numpy as np
import spatialmath as sm
import qpsolvers as qp

# Initialise a Franka-Emika Panda Robot
panda = rp.Panda()

# The current joint angles of the Panda
# You need to obtain these from however you interfave with your robot
# eg. ROS messages, PyRep etc.
panda.q = np.array([0, -3, 0, -2.3, 0, 2, 0])

# The current pose of the robot
wTe = panda.fkine()

# The desired pose of the robot
# = Current pose offset 20cm in the x-axis
wTep = wTe * sm.SE3.Tx(0.2)

# Gain term (lambda) for control minimisation
Y = 0.005

# Quadratic component of objective function
Q = Y * np.eye(7)

arrived = False
while not arrived:

    # The current joint angles of the Panda
    # You need to obtain these from however you interfave with your robot
    # eg. ROS messages, PyRep etc.
    panda.q = np.array([0, -3, 0, -2.3, 0, 2, 0])

    # The desired end-effecor spatial velocity
    v, arrived = rp.p_servo(wTe, wTep)

    # Form the equality constraints
    # The kinematic Jacobian in the end-effecor frame
    Aeq = panda.jacobe()
    beq = v.reshape((6,))

    # Linear component of objective function: the manipulability Jacobian
    c = -panda.jacobm().reshape((7,))

    # Solve for the joint velocities dq
    dq = qp.solve_qp(Q, c, None, None, Aeq, beq)

    # Send the joint velocities to the robot
    # eg. ROS messages, PyRep etc.

Resolved-Rate Motion Control Example

This example implements resolved-rate motion control within a position-based servoing scheme

import ropy as rp
import numpy as np
import spatialmath as sm

# Initialise a Franka-Emika Panda Robot
panda = rp.Panda()

# The current joint angles of the Panda
# You need to obtain these from however you interfave with your robot
# eg. ROS messages, PyRep etc.
panda.q = np.array([0, -3, 0, -2.3, 0, 2, 0])

# The current pose of the robot
wTe = panda.fkine()

# The desired pose of the robot
# = Current pose offset 20cm in the x-axis
wTep = wTe * sm.SE3.Tx(0.2)

arrived = False
while not arrived:

    # The current joint angles of the Panda
    # You need to obtain these from however you interfave with your robot
    # eg. ROS messages, PyRep etc.
    panda.q = np.array([0, -3, 0, -2.3, 0, 2, 0])

    # The desired end-effecor spatial velocity
    v, arrived = rp.p_servo(wTe, wTep)

    # Solve for the joint velocities dq
    # Perfrom the pseudoinverse of the manipulator Jacobian in the end-effector frame
    dq = np.linalg.pinv(panda.jacobe()) @ v

    # Send the joint velocities to the robot
    # eg. ROS messages, PyRep etc.

Metadata

Release files for ropy 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ropy 0.3.7
File Size Uploaded Provenance
ropy-0.3.7.tar.gz 92.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for ropy 0.3.7
File
ropy-0.3.7-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
ropy-0.3.7-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
ropy-0.3.7-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
ropy-0.3.7-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details
ropy-0.3.7-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
ropy-0.3.7-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
ropy-0.3.7-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
ropy-0.3.7-cp37-cp37m-macosx_10_14_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 Details
ropy-0.3.7-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
ropy-0.3.7-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details
ropy-0.3.7-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
ropy-0.3.7-cp36-cp36m-macosx_10_14_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.14+ x86-64 Details
ropy-0.3.7-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
ropy-0.3.7-cp35-cp35m-manylinux2010_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 Details
ropy-0.3.7-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
ropy-0.3.7-cp35-cp35m-macosx_10_14_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.14+ x86-64 Details

Total release size: 253.5 MB

Release files / ropy-0.3.7.tar.gz

Download URL ropy-0.3.7.tar.gz
Size 92.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f4a343e08c6983ccc6ccdb53e73de2d0bf24ac15b5f02f4363b8736c2e40332
BLAKE2b-256 checksum
How to use checksums
9cbf1395e9c4a3dceb006587fa6d89b006e5f836312d5f2cb8a97ee944683a9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp38-cp38-win_amd64.whl

Download URL ropy-0.3.7-cp38-cp38-win_amd64.whl
Size 15.8 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
2383aa29597a3fb0b8aaf92adb0dd747ec2318fcad2fd52199c1a8355b8af58c
BLAKE2b-256 checksum
How to use checksums
f985efe38c920f4e7e4c79286ed96fb6e18e8cd64f21572253f90f58d3b18d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / ropy-0.3.7-cp38-cp38-manylinux2010_x86_64.whl

Download URL ropy-0.3.7-cp38-cp38-manylinux2010_x86_64.whl
Size 15.8 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
005f89665a56391fcf15cff793710fd7a0ec796d5fb9a39107ad47d92445a466
BLAKE2b-256 checksum
How to use checksums
cceb06314d6946c9645ca423aedc5b6d9024347b8ebe478511c3bcdf6b2b156b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp38-cp38-manylinux1_x86_64.whl

Download URL ropy-0.3.7-cp38-cp38-manylinux1_x86_64.whl
Size 15.8 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f0b101278c9baa0a037b823baa5953a739647bc41fc58a2724b2ad8122718d63
BLAKE2b-256 checksum
How to use checksums
27f7f8cc7c83333cb219de4adfb2e1dcaf056074aa0b838325a70c9ff721ae75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp38-cp38-macosx_10_14_x86_64.whl

Download URL ropy-0.3.7-cp38-cp38-macosx_10_14_x86_64.whl
Size 15.8 MB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
275d09b3a7132711b285d94f398cf82ecf9e1222eeba8a894c8dceb7cffebbc8
BLAKE2b-256 checksum
How to use checksums
d0525bd7ba6d3eab3a775c452229d37f80ba8c9344e37b79f781de99d614d3b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / ropy-0.3.7-cp37-cp37m-win_amd64.whl

Download URL ropy-0.3.7-cp37-cp37m-win_amd64.whl
Size 15.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
e317bd5a469572f2e547e12e373e100cca5f76ae1b445ce4160ad9408c481e29
BLAKE2b-256 checksum
How to use checksums
135b04d5c146cc9bfc3b5b2e533cdcfdf7f04a39f9656f3883ed03148fa7e7fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp37-cp37m-manylinux2010_x86_64.whl

Download URL ropy-0.3.7-cp37-cp37m-manylinux2010_x86_64.whl
Size 15.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
e746c08bff134ab843923b14bd0df5023441e2e06de58937ebe65ba18fd43b6f
BLAKE2b-256 checksum
How to use checksums
f852dea02df7c5946563b13873679aecebb8a7ec4c36d11ec28b3ae1bd7c1fcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp37-cp37m-manylinux1_x86_64.whl

Download URL ropy-0.3.7-cp37-cp37m-manylinux1_x86_64.whl
Size 15.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
634603b3e1e55f620c406a5b0ef3656d664db4b8e6608325365cfa2823fc0fe5
BLAKE2b-256 checksum
How to use checksums
1f70f6f7f3e86f585392ca4eae832f7a4f7d800fbc46592e5f88743fa0841704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp37-cp37m-macosx_10_14_x86_64.whl

Download URL ropy-0.3.7-cp37-cp37m-macosx_10_14_x86_64.whl
Size 15.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
22ddaede605391ab474752f8be1d383bbce22a04fa35d0da174a0be5ffdd106c
BLAKE2b-256 checksum
How to use checksums
1ffcd529d3af505bbde88992043cfce940dc053915858e1c42219c6cb5b429a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp36-cp36m-win_amd64.whl

Download URL ropy-0.3.7-cp36-cp36m-win_amd64.whl
Size 15.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
f96142c987143dfb78e73cc210f67ed40bc97a1c536ebbc1c3f0f2a3c1b3e7f4
BLAKE2b-256 checksum
How to use checksums
21a82d3b2f0032f532ad92f190e8a0c71e55f3af57195808c25845fea352697a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

Release files / ropy-0.3.7-cp36-cp36m-manylinux2010_x86_64.whl

Download URL ropy-0.3.7-cp36-cp36m-manylinux2010_x86_64.whl
Size 15.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
344d180e5b165149d6c849a13f71fb889bbda0cc34352078970dc5a3f3a18e93
BLAKE2b-256 checksum
How to use checksums
4e681b6d622bc0a3ad647e62a39777d54edbf78a8ae8256ccc903f1d18b18edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp36-cp36m-manylinux1_x86_64.whl

Download URL ropy-0.3.7-cp36-cp36m-manylinux1_x86_64.whl
Size 15.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b79e93f2cfb7ab4a89003d87552a069487b047dfbc8c30f3e11ffc174453b2ea
BLAKE2b-256 checksum
How to use checksums
507381ae95fe095bb84c2aea014308e79e1ba7ae0f0b665b3210a2c0661d3403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp36-cp36m-macosx_10_14_x86_64.whl

Download URL ropy-0.3.7-cp36-cp36m-macosx_10_14_x86_64.whl
Size 15.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
6e517665ca98b621b6bcb26ed82ae5a12483a5cc569217b263c7b41498821b5e
BLAKE2b-256 checksum
How to use checksums
bfa6074105433bb1726f81a23d22069149974b7aedceba10bba5f7697d73d3d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

Release files / ropy-0.3.7-cp35-cp35m-win_amd64.whl

Download URL ropy-0.3.7-cp35-cp35m-win_amd64.whl
Size 15.8 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
7f036252fed6d442ae0e274a46bcfd37e1a0f6fffb6ef318a496069fae0154a4
BLAKE2b-256 checksum
How to use checksums
8b08ae8c1e3563dc0e5df47a8c3b9077055901a2bdc1351d52f7198a7c20e631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.4

Release files / ropy-0.3.7-cp35-cp35m-manylinux2010_x86_64.whl

Download URL ropy-0.3.7-cp35-cp35m-manylinux2010_x86_64.whl
Size 15.8 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c277e635916856e16aa917637d603736507ec5114bc2d1dc9919484b1b42cd34
BLAKE2b-256 checksum
How to use checksums
6d64a04584cf7122595f6320ab97096b0a0c0ad574b6f528b9d1c694b39631a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp35-cp35m-manylinux1_x86_64.whl

Download URL ropy-0.3.7-cp35-cp35m-manylinux1_x86_64.whl
Size 15.8 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
94d145eee67538c38081b1e2ea1667737e0d45604f0d78cb1715aeb13e157b17
BLAKE2b-256 checksum
How to use checksums
ff29b08b46447da0556a8bdadba8e5f02131dbb8550732624a858ff482d46a22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

Release files / ropy-0.3.7-cp35-cp35m-macosx_10_14_x86_64.whl

Download URL ropy-0.3.7-cp35-cp35m-macosx_10_14_x86_64.whl
Size 15.8 MB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
f189e9d8975f189b67136837e74f39d328ad03a01e70daedaa79943cdbcba73d
BLAKE2b-256 checksum
How to use checksums
01cdb55eaf12bf0a752f89172204d0e5f763a58870a89b39cf9daa27eb94a1fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.9

Security for ropy 0.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page