{"id":18375057,"url":"https://github.com/cyberbotics/pyikfast","last_synced_at":"2025-04-06T20:30:52.147Z","repository":{"id":55899526,"uuid":"313993697","full_name":"cyberbotics/pyikfast","owner":"cyberbotics","description":"Python bindings for the `ikfast` library and utilities to generate the analytical inverse kinematics solution","archived":false,"fork":false,"pushed_at":"2021-02-27T14:34:29.000Z","size":141,"stargazers_count":45,"open_issues_count":3,"forks_count":5,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-03-22T06:25:36.140Z","etag":null,"topics":["forward-kinematics","ikfast","inverse-kinematics","robotic-arm","robotics"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyberbotics.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}},"created_at":"2020-11-18T16:32:46.000Z","updated_at":"2025-03-11T19:57:07.000Z","dependencies_parsed_at":"2022-08-15T09:00:39.381Z","dependency_job_id":null,"html_url":"https://github.com/cyberbotics/pyikfast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberbotics%2Fpyikfast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberbotics%2Fpyikfast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberbotics%2Fpyikfast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberbotics%2Fpyikfast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyberbotics","download_url":"https://codeload.github.com/cyberbotics/pyikfast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247547131,"owners_count":20956499,"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","ikfast","inverse-kinematics","robotic-arm","robotics"],"created_at":"2024-11-06T00:17:20.926Z","updated_at":"2025-04-06T20:30:51.832Z","avatar_url":"https://github.com/cyberbotics.png","language":"C++","readme":"# Python Bindings for `ikfast`\n\nGenerate a Python `ikfast` library from the given URDF file.\nThis project provides all necessary utilities to generate `ikpy` C++ files and Python bindings for it.\n\n## Getting Started\n\nExport URDF from Webots:  \n![Export URDF menu](./assets/menu.png)\n```\n(right click on the robot in scene tree) \u003e Export \u003e (name it `robot.urdf`) \u003e Save\n```\n\nMove to the directory with `robot.urdf` and execute:\n```bash\ndocker run -v ${PWD}:/output cyberbotics/pyikfast [base_link] [effector] [module_extension]\n```\nReplace `[base_link]` and `[effector]` with the link-names from the `robot.urdf`.\nThe `[module_extension]` will append to the generated Python module name.\nThe module name will be `pyikfast` + `[module_extension]`.\nFor example, `_irb4600` will generate the Python module named `pyikfast_irb4600`.\n\n\nAfter a few minutes your Python library should be ready ready!\nInstall it as:\n```bash\npip3 install .\n```\n\nUse the library:\n```python\nimport pyikfast\n\n\ntarget_translation = [0.5, 0.5, 0.5]\ntarget_rotation = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n\n# Calculate inverse kinematics\npositions = pyikfast.inverse(target_translation, target_rotation)\nprint(positions)\n\n# Calculate forward kinematics (we use the third IK solution)\ntranslation, rotation = pyikfast.forward(positions[2])\nprint(translation, rotation)\n```\n\n## Distribution\nTo distribute the generated Python library you can make [a Python `*.whl` file](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives):\n```bash\npip3 install setuptools wheel\npython3 setup.py bdist_wheel\n```\nand your `*.whl` will be located in `./dist/pyikfast-*.whl`, so a user can install it as:\n```bash\npip3 install pyikfast-*.whl\n```\n\n## Development\nIf you are interested into the library development here are a few notes:\n\n```bash\n# Building using Docker\ndocker build . --tag pyikfast\ndocker run -it -v ${PWD}/output:/output --entrypoint bash pyikfast\n/entrypoint.bash base_link solid_12208 _ext\n\n# Compile standalone\ng++ $(find -name '*.cpp') -o ikfast\n./ikfast 1 0 0 0.5 0 1 0 0.5 0 0 1 0.5\n\n# Python\npython3 -c \"import pyikfast; print(pyikfast.inverse([0.5, 0.5, 0.5], [1, 0, 0, 0, 1, 0, 0, 0, 1]))\"\npython3 -c \"import pyikfast; print(pyikfast.forward([0.927295218001612, -2.899331265288886, 2.048719302774242, -1.057447868999410, 1.163951188044116, 0.612010251709654]))\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberbotics%2Fpyikfast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberbotics%2Fpyikfast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberbotics%2Fpyikfast/lists"}