Skip to main content

Robotics kinematic calculation toolkit

Project description

Build Status PyPI version MIT License Downloads

Simple kinematics body toolkit.

Core features

  • Pure python library.
  • Support URDF, SDF and MJCF file.
  • Calculate FK, IK and jacobian.

Installation

pip install kinpy

Getting started

Here is a program that reads urdf and generates a kinematic chain.

import kinpy as kp

chain = kp.build_chain_from_urdf(open("kuka_iiwa/model.urdf").read())
print(chain)
# lbr_iiwa_link_0_frame
#  	lbr_iiwa_link_1_frame
#  	 	lbr_iiwa_link_2_frame
#  	 	 	lbr_iiwa_link_3_frame
#  	 	 	 	lbr_iiwa_link_4_frame
#  	 	 	 	 	lbr_iiwa_link_5_frame
#  	 	 	 	 	 	lbr_iiwa_link_6_frame
#  	 	 	 	 	 	 	lbr_iiwa_link_7_frame

Displays the parameter names of joint angles included in the chain.

print(chain.get_joint_parameter_names())
# ['lbr_iiwa_joint_1', 'lbr_iiwa_joint_2', 'lbr_iiwa_joint_3', 'lbr_iiwa_joint_4', 'lbr_iiwa_joint_5', 'lbr_iiwa_joint_6', 'lbr_iiwa_joint_7']

Given joint angle values, calculate forward kinematics.

import math
th = {'lbr_iiwa_joint_2': math.pi / 4.0, 'lbr_iiwa_joint_4': math.pi / 2.0}
ret = chain.forward_kinematics(th)

You can get the position and orientation of each link.

Visualization

KUKA IIWA

kuka

Mujoco humanoid

humanoid

Mujoco ant

ant

Simple arm

simple_arm

Citing

@software{kinpy,
    author = {{Kenta-Tanaka et al.}},
    title = {kinpy},
    url = {https://github.com/neka-nat/kinpy},
    version = {0.0.3},
    date = {2019-10-11},
}

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

kinpy-0.0.6.tar.gz (55.1 kB view details)

Uploaded Source

File details

Details for the file kinpy-0.0.6.tar.gz.

File metadata

  • Download URL: kinpy-0.0.6.tar.gz
  • Upload date:
  • Size: 55.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for kinpy-0.0.6.tar.gz
Algorithm Hash digest
SHA256 863e6f11087fe39a8e6e9d295fcb74ba2771f9f9a0f80fa3a389e16de080d610
MD5 3260393cd4d2d7847c91caa9e10b56cb
BLAKE2b-256 87e960220526cced82df1769e37ccf2e13662c2eeed13a98d43de05b3deb95db

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