Skip to main content

Fast Inverse Kinematics Solver for xArm7

This package provides a fast inverse kinematics (IK) solver for the xArm7 robotic arm, capable of running at approximately 150 Hz on a laptop with an i7-11800H CPU. It supports both standard 7-DOF xArm7 and configurations with a linear rail (8-DOF).

Features

  • Fast inverse kinematics for xArm7 (7-DOF) and xArm7 with linear rail (8-DOF)
  • Supports quaternion, Euler angle, and axis-angle rotation representations
  • Lightweight and easy to integrate

Installation

Requirements:

Install via pip:

pip install xarm7-ik

Or clone this repo and:

pip install .
# or, for example dependencies (Mujoco):
pip install .[examples]

Usage

To use the IK solver in your own code:

  1. Import the solver and rotation representation:

    from xarm7_ik.solver import InverseKinematicsSolver
    
  2. Create an instance of the solver:

    • For a standard xArm7 (7-DOF):
      ik_solver = InverseKinematicsSolver(use_linear_motor=False, rotation_repr="quaternion")
      
    • For xArm7 with linear rail (8-DOF):
      ik_solver = InverseKinematicsSolver(use_linear_motor=True, rotation_repr="quaternion")
      
  3. Call the inverse kinematics method:

    result = ik_solver.inverse_kinematics(
        initial_configuration,         # np.ndarray of joint angles (7 or 8 elements)
        target_gripper_pos,            # np.ndarray, shape (3,)
        target_gripper_rot,            # np.ndarray, shape depends on the rotation representation
        
        # Quaternions are in the W-X-Y-Z order
        # Euler angles are X-Y-Z
        # Axis-angle representations are (axis, angle)
    )
    # result: np.ndarray of joint angles
    

For more complete usage and simulation integration, see the scripts in the examples/ folder. \

Citation

This project was originally developed for our paper that uses xArm7. If you find this project useful, please consider citing our paper:

@article{sun2025dynamic,
  title={Dynamic Rank Adjustment in Diffusion Policies for Efficient and Flexible Training},
  author={Sun, Xiatao and Yang, Shuo and Chen, Yinxing and Fan, Francis and Liang, Yiyan and Rakita, Daniel},
  journal={arXiv preprint arXiv:2502.03822},
  year={2025}
}

Metadata

Release files for xarm7-ik 0.3.2

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

Source distribution (sdist)

Source distribution for xarm7-ik 0.3.2
File Size Uploaded Provenance
xarm7_ik-0.3.2.tar.gz 8.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xarm7-ik 0.3.2
File Interpreter ABI Platform
xarm7_ik-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / xarm7_ik-0.3.2.tar.gz

Download URL xarm7_ik-0.3.2.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d0f2583695b8754d78f34cee3e6d2c411b647cf8d4e56ab490f17c6e4257e0d4
BLAKE2b-256 checksum
How to use checksums
3c85ae69eace573e302a1f275236537396148ffabbcad97b62585d9e08072e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / xarm7_ik-0.3.2-py3-none-any.whl

Download URL xarm7_ik-0.3.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41bf08052097f9af424a959ac88f8044fd232a67cd25531e9e7b8d91c9f5c65e
BLAKE2b-256 checksum
How to use checksums
ada2a7bb0eb3722bb279ff93d2f9b75be702963e8931451ee85f056b4e926e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Security for xarm7-ik 0.3.2

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.

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