Skip to main content

A fast inverse kinematics (IK) solver for xArm7 with/without the linear rail

Project description

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 and rotation matrix representations
  • Easy integration with simulation environments (e.g., Mujoco)

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, RotationRepresentation
    
  2. Create an instance of the solver:

    • For a standard xArm7 (7-DOF):
      ik_solver = InverseKinematicsSolver(use_linear_motor=False, rotation_repr=RotationRepresentation.QUATERNION)
      
    • For xArm7 with linear rail (8-DOF):
      ik_solver = InverseKinematicsSolver(use_linear_motor=True, rotation_repr=RotationRepresentation.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
        rot_repr=RotationRepresentation.QUATERNION  # or .EULER, .AXIS_ANGLE
        # 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

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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xarm7_ik-0.1.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xarm7_ik-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file xarm7_ik-0.1.1.tar.gz.

File metadata

  • Download URL: xarm7_ik-0.1.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for xarm7_ik-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c9f1c76e98773e1a607c353581922be10e52f4340b8ec0fe68d29d940755976e
MD5 93502bc62e2efa7c9aef203e4dcf11da
BLAKE2b-256 2c213cc5b38f3deb52c45174c2956ef92e4432d04764f1f0a7a72d4c364e05b5

See more details on using hashes here.

File details

Details for the file xarm7_ik-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: xarm7_ik-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for xarm7_ik-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 acceac1af12622c37fbadf23bec40e2c3dcfa4a3606d7dcbb0e883a4e0357e33
MD5 16379a9890ed49c024bdfbf83afdc9ce
BLAKE2b-256 f34b9031e6ee99ac19d6577d8ab26c0b72a866845b8d50f11ed89d0e585ff70f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page