{"id":17133597,"url":"https://github.com/neka-nat/kinpy","last_synced_at":"2025-04-05T23:10:57.291Z","repository":{"id":35147316,"uuid":"206802340","full_name":"neka-nat/kinpy","owner":"neka-nat","description":"Simple kinematics calculation toolkit for robotics","archived":false,"fork":false,"pushed_at":"2024-06-03T06:21:14.000Z","size":4826,"stargazers_count":151,"open_issues_count":5,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T22:08:20.109Z","etag":null,"topics":["forward-kinematics","inverse-kinematics","kinematics","manipulator","mujoco","python","robot","robotics","sdf","urdf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neka-nat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-06T13:42:08.000Z","updated_at":"2025-03-27T11:39:39.000Z","dependencies_parsed_at":"2024-06-19T02:54:08.909Z","dependency_job_id":"f1a64571-2f69-4921-94ad-d7f510d14c28","html_url":"https://github.com/neka-nat/kinpy","commit_stats":{"total_commits":78,"total_committers":4,"mean_commits":19.5,"dds":0.07692307692307687,"last_synced_commit":"6c36909c6bd3b094cc86f05e1e09d935e50ae1eb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fkinpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fkinpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fkinpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fkinpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neka-nat","download_url":"https://codeload.github.com/neka-nat/kinpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forward-kinematics","inverse-kinematics","kinematics","manipulator","mujoco","python","robot","robotics","sdf","urdf"],"created_at":"2024-10-14T19:42:33.961Z","updated_at":"2025-04-05T23:10:57.257Z","avatar_url":"https://github.com/neka-nat.png","language":"Python","funding_links":[],"categories":["[Libraries](#awesome-robotics-libraries)"],"sub_categories":["[Inverse Kinematics](#awesome-robotics-libraries)"],"readme":"# \u003cimg src=\"https://raw.githubusercontent.com/neka-nat/kinpy/master/assets/logo.png\" width=\"400\" /\u003e\n\n[![Build status](https://github.com/neka-nat/kinpy/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/neka-nat/kinpy/actions/workflows/ubuntu.yml/badge.svg)\n[![PyPI version](https://badge.fury.io/py/kinpy.svg)](https://badge.fury.io/py/kinpy)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n[![Downloads](https://pepy.tech/badge/kinpy)](https://pepy.tech/project/kinpy)\n\nSimple kinematics body toolkit.\n\n## Core features\n\n* Pure python library.\n* Support URDF, SDF and MJCF file.\n* Calculate FK, IK and jacobian.\n\n![joint_angle_editor](assets/joint_angle_editor.gif)\n\n## Installation\n\n```\npip install kinpy\n```\n\n## Getting started\nHere is a program that reads urdf and generates a kinematic chain.\n\n```py\nimport kinpy as kp\n\nchain = kp.build_chain_from_urdf(open(\"kuka_iiwa/model.urdf\").read())\nprint(chain)\n# lbr_iiwa_link_0_frame\n# └──── lbr_iiwa_link_1_frame\n#       └──── lbr_iiwa_link_2_frame\n#             └──── lbr_iiwa_link_3_frame\n#                   └──── lbr_iiwa_link_4_frame\n#                         └──── lbr_iiwa_link_5_frame\n#                               └──── lbr_iiwa_link_6_frame\n#                                     └──── lbr_iiwa_link_7_frame\n```\n\nDisplays the parameter names of joint angles included in the chain.\n\n```py\nprint(chain.get_joint_parameter_names())\n# ['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']\n```\n\nGiven joint angle values, calculate forward kinematics.\n\n```py\nimport math\nth = {'lbr_iiwa_joint_2': math.pi / 4.0, 'lbr_iiwa_joint_4': math.pi / 2.0}\nret = chain.forward_kinematics(th)\n# {'lbr_iiwa_link_0': Transform(rot=[1. 0. 0. 0.], pos=[0. 0. 0.]), 'lbr_iiwa_link_1': Transform(rot=[1. 0. 0. 0.], pos=[0.     0.     0.1575]), 'lbr_iiwa_link_2': Transform(rot=[-0.27059805  0.27059805  0.65328148  0.65328148], pos=[0.   0.   0.36]), 'lbr_iiwa_link_3': Transform(rot=[-9.23879533e-01  3.96044251e-14 -3.82683432e-01 -1.96942462e-12], pos=[ 1.44603337e-01 -6.78179735e-13  5.04603337e-01]), 'lbr_iiwa_link_4': Transform(rot=[-0.65328148 -0.65328148  0.27059805 -0.27059805], pos=[ 2.96984848e-01 -3.37579445e-13  6.56984848e-01]), 'lbr_iiwa_link_5': Transform(rot=[ 2.84114655e-12  3.82683432e-01 -1.87377891e-12 -9.23879533e-01], pos=[ 1.66523647e-01 -1.00338887e-12  7.87446049e-01]), 'lbr_iiwa_link_6': Transform(rot=[-0.27059805  0.27059805 -0.65328148 -0.65328148], pos=[ 1.41421356e-02 -7.25873884e-13  9.39827561e-01]), 'lbr_iiwa_link_7': Transform(rot=[ 9.23879533e-01  2.61060896e-12 -3.82683432e-01  4.81056861e-12], pos=[-4.31335137e-02 -1.01819561e-12  9.97103210e-01])}\n```\n\nYou can get the position and orientation of each link.\n\nIf you want to use IK or Jacobian, you need to create a `SerialChain`.\nWhen creating a `SerialChain`, an end effector must be specified.\n\n```py\nchain = kp.build_serial_chain_from_urdf(open(\"kuka_iiwa/model.urdf\"), \"lbr_iiwa_link_7\")\nth = [0.0, -math.pi / 4.0, 0.0, math.pi / 2.0, 0.0, math.pi / 4.0, 0.0]\nret = chain.forward_kinematics(th, end_only=True)\n# chain.inverse_kinematics(ret)\n# chain.jacobian(th)\n```\n\n## Visualization\n\n### KUKA IIWA\n![kuka](https://raw.githubusercontent.com/neka-nat/kinpy/master/assets/kuka.png)\n\n### Mujoco humanoid\n![humanoid](https://raw.githubusercontent.com/neka-nat/kinpy/master/assets/humanoid.png)\n\n### Mujoco ant\n![ant](https://raw.githubusercontent.com/neka-nat/kinpy/master/assets/ant.png)\n\n### Simple arm\n![simple_arm](https://raw.githubusercontent.com/neka-nat/kinpy/master/assets/simple_arm.png)\n\n## Citing\n\n```\n@software{kinpy,\n    author = {{Kenta-Tanaka et al.}},\n    title = {kinpy},\n    url = {https://github.com/neka-nat/kinpy},\n    version = {0.0.3},\n    date = {2019-10-11},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneka-nat%2Fkinpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneka-nat%2Fkinpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneka-nat%2Fkinpy/lists"}