Skip to main content

Jrl

Jrl ('Jeremy's robotics library') is a robotics library containing robot models for popular robots as well as efficient, pytorch based parallelized implementations of forward kinematics, inverse kinematics, and robot-robot + robot-environment collision checking. Robot models include (run with scripts/visualize_robot.py to view):

  1. Franka Panda
  2. Iiwa 7dof manipulator
  3. Fetch 8dof mobile manipulator

Available operations include (all part of the Robot class):

  1. forward_kinematics_batch(): batched forward kinematics
  2. jacobian_batch_pt(): batched manipulator jacobian calculation (change of the end effector's pose w.r.t. each joint angle)
  3. inverse_kinematics_single_step_levenburg_marquardt(): computes a single batched inverse kinematics step using Levenburg-Marquardt optimization
  4. inverse_kinematics_single_step_batch_pt(): computes a single batched inverse kinematics step using the traditional jacobian pseudo-inverse method
  5. self_collision_distances_batch(): batched self-collision distance calculation
  6. self_collision_distances_jacobian_batch(): batched calculation of the jacobian of the pair-wise self-collision distances w.r.t. joint angles
  7. env_collision_distances_batch(): batched self-environment distance calculation
  8. env_collision_distances_jacobian_batch(): batched calculation of the jacobian of the self-environment distances w.r.t. joint angles

Quickstart code. This script will load a Panda robot model and then run forward and inverse kinematics on randomly sampled configs. See demo.py for the complete script, which includes robot-robot and robot-environment collision checking.

from jrl.robots import Panda
from jrl.evaluation import pose_errors_cm_deg
import torch

def assert_poses_almost_equal(poses_1, poses_2):
    pos_errors_cm, rot_errors_deg = pose_errors_cm_deg(poses_1, poses_2)
    assert (pos_errors_cm.max().item() < 0.01) and (rot_errors_deg.max().item() < 0.1)

robot = Panda()
joint_angles, poses = robot.sample_joint_angles_and_poses(n=5, return_torch=True) # sample 5 random joint angles and matching poses

# Run forward-kinematics
poses_fk = robot.forward_kinematics_batch(joint_angles) 
assert_poses_almost_equal(poses, poses_fk)

# Run inverse-kinematics
ik_sols = joint_angles + 0.1 * torch.randn_like(joint_angles) 
for i in range(5):
    ik_sols = robot.inverse_kinematics_single_step_levenburg_marquardt(poses, ik_sols)
assert_poses_almost_equal(poses, robot.forward_kinematics_batch(ik_sols))

Note: This project uses the w,x,y,z format for quaternions.

Installation

Recommended: clone the repo and install with pip

git clone https://github.com/jstmn/jrl.git && cd jrl/
pip install -e .
# or:
pip install -e ".[dev]"

Second option: Install from pypi (not recomended - the pypi version will likely be out of date until this project hardens)

pip install jrl

Metadata

Release files for jrl 0.0.9

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

Source distribution (sdist)

Source distribution for jrl 0.0.9
File Size Uploaded Provenance Actions
jrl-0.0.9.tar.gz 29.2 MB Without provenance Details for jrl-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jrl 0.0.9
File Interpreter ABI Platform Actions
jrl-0.0.9-py3-none-any.whl Python 3 none any Details for jrl-0.0.9-py3-none-any.whl

Total release size: 58.4 MB

Release files / jrl-0.0.9.tar.gz

Download URL jrl-0.0.9.tar.gz
Size 29.2 MB
Tags Source
SHA-256 checksum
How to use checksums
af8fba9d72c7c967854e21292bafe2227fd1f1d869c52920409982a81030db00
BLAKE2b-256 checksum
How to use checksums
8007c200489bcb2c321ac7d210f5b85bd6b74ca388ff4fb3704b1115a53622a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / jrl-0.0.9-py3-none-any.whl

Download URL jrl-0.0.9-py3-none-any.whl
Size 29.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
dd697de6e80812dc802e02e54342ff21552a0915cccd993236806f4bd0d4f127
BLAKE2b-256 checksum
How to use checksums
05934a8a3b9c67eecac4fb9fd9cd6414a2bf3d93d0aae2888a1cad16b9692f75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Security for jrl 0.0.9

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files No provenance

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