{ "info": { "author": "Jeroen De Maeyer", "author_email": "jeroen.demaeyer@kuleuven.be", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "[![Build Status](https://travis-ci.org/JeroenDM/acrobotics.svg?branch=master)](https://travis-ci.org/JeroenDM/acrobotics) [![codecov](https://codecov.io/gh/JeroenDM/acrobotics/branch/master/graph/badge.svg)](https://codecov.io/gh/JeroenDM/acrobotics)\n\n# Acrobotics\n\nQuickly test motion planning ideas is the goal, and Python seems like a great language for rapid prototyping. There are great libraries for robot simulation and related task, but installing them is can be a hassle and very dependent on operating system and python version.\nThe drawback is that I have to write a lot of stuff myself. I'm not sure if it is useful to do this. But it will be fun and I will learn a bunch.\n\nThis library provides robot kinematics and collision checking for serial kinematic chains. The idea is that this library can be easily swapped by another one providing the same functionality.\n\nThe acro part comes from [ACRO](https://iiw.kuleuven.be/onderzoek/acro) a robotics research group at KU Leuven in Belgium.\n\n## Installation\n\n```bash\npip install acrobotics\n```\n\nOr for development\n\n```bash\ngit clone https://github.com/JeroenDM/acrobotics.git\ncd acrobotics\npython setup.py develop\n```\n\nNo Windows support for the moment because [python-fcl](https://pypi.org/project/python-fcl/) is not supported. :(\nIn the future I will possibly switch to [pybullet](https://pypi.org/project/pybullet/). In the meantime, use [windows subsystem for linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10). MacOS is not tested yet.\n\n## Gettings started\n\n(Code for example below: [examples/getting_started.py](examples/getting_started.py))\n\nThis library has three main tricks.\n\n### Robot kinematics\n`T = robot.fk(joint_values)`\n`IKSolution = robot.ik(T)`\n\nForward kinematics are implemented in a generic `RobotKinematics` class.\n```python\nfrom acrobotics.robot_examples import Kuka\n\nrobot = Kuka()\n\njoint_values = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]\nT_fk = robot.fk(joint_values)\n```\n\nAnalytical inverse kinematics only for specific robots:\n```python\nik_solution = robot.ik(T_fk) # T_fk is a numpy 4x4 array\n\nprint(f\"Inverse kinematics successful? {ik_solution.success}\")\nfor q in ik_solution.solutions:\n print(q)\n```\n```bash\nInverse kinematics successful? True\n[ 0.1 -1.0949727 2.84159265 2.87778828 0.79803563 -1.99992985]\n[ 0.1 -1.0949727 2.84159265 -0.26380438 -0.79803563 1.1416628 ]\n[0.1 0.2 0.3 0.4 0.5 0.6]\n[ 0.1 0.2 0.3 -2.74159265 -0.5 -2.54159265]\n```\n\n### Collision checking\n`bool = robot.is_in_collision(joint_values, planning_scene)`\n\nFirst create a planning scene with obstacles the robot can collide with.\n```python\nfrom acrobotics.geometry import Scene\nfrom acrobotics.shapes import Box\n\ntable = Box(2, 2, 0.1)\nT_table = translation(0, 0, -0.2)\n\nobstacle = Box(0.2, 0.2, 1.5)\nT_obs = translation(0, 0.5, 0.55)\n\nscene = Scene([table, obstacle], [T_table, T_obs])\n```\n\nThen create a list of robot configurations for wich you want to check collision with the planning scene.\n```python\nimport numpy as np\n\nq_start = np.array([0.5, 1.5, -0.3, 0, 0, 0])\nq_goal = np.array([2.5, 1.5, 0.3, 0, 0, 0])\nq_path = np.linspace(q_start, q_goal, 10)\n```\n\nAnd then you could do:\n```python\nprint([robot.is_in_collision(q, scene) for q in q_path])\n```\n```bash\n[False, False, False, False, True, True, True, True, False, False]\n```\n\n### Visualization\n`robot.plot(axes_handle, joint_values)`\n`robot.animate_path(figure_handle, axes_handle, joint_path)`\n\n```python\nfrom acrobotics.util import get_default_axes3d\n\nfig, ax = get_default_axes3d()\n\nscene.plot(ax, c=\"green\")\nrobot.animate_path(fig, ax, q_path)\n```\n\n![animation](examples/robot_animation.gif)\n\n## More details\n\nThere's a more in depth explanation in the jupyter-notebooks in the examples folder.\n\n## And motion planning?\n\nComming soon.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JeroenDM/acrobotics", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "acrobotics", "package_url": "https://pypi.org/project/acrobotics/", "platform": "", "project_url": "https://pypi.org/project/acrobotics/", "project_urls": { "Homepage": "https://github.com/JeroenDM/acrobotics" }, "release_url": "https://pypi.org/project/acrobotics/0.0.3/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Primitive robot kinematics and collision checking.", "version": "0.0.3" }, "last_serial": 5841453, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "3298037b019ca53213434d4a2fbb2707", "sha256": "ed09b24f0cdd83f440eb76e0ca4ff2037c323c53362ab963c5b81efe6435f99e" }, "downloads": -1, "filename": "acrobotics-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3298037b019ca53213434d4a2fbb2707", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12467, "upload_time": "2019-09-06T09:08:12", "url": "https://files.pythonhosted.org/packages/31/87/a09c22c52a3e92449add372ea7c7e1c1028da9d32372793144a66d7938b9/acrobotics-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2e75010867002b4e7272c5120a1bfcc8", "sha256": "dea21cb34d861d3af87995656debc69efb1746534f9bb25ca9a08d2a3f037f75" }, "downloads": -1, "filename": "acrobotics-0.0.3.tar.gz", "has_sig": false, "md5_digest": "2e75010867002b4e7272c5120a1bfcc8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25531, "upload_time": "2019-09-17T12:16:28", "url": "https://files.pythonhosted.org/packages/92/39/abe34c507a9083421ca124446634f4fd286bd7a5f1921a7baa262658e37f/acrobotics-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e75010867002b4e7272c5120a1bfcc8", "sha256": "dea21cb34d861d3af87995656debc69efb1746534f9bb25ca9a08d2a3f037f75" }, "downloads": -1, "filename": "acrobotics-0.0.3.tar.gz", "has_sig": false, "md5_digest": "2e75010867002b4e7272c5120a1bfcc8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25531, "upload_time": "2019-09-17T12:16:28", "url": "https://files.pythonhosted.org/packages/92/39/abe34c507a9083421ca124446634f4fd286bd7a5f1921a7baa262658e37f/acrobotics-0.0.3.tar.gz" } ] }