{"id":26520807,"url":"https://github.com/hiroishida/plainmp","last_synced_at":"2025-03-21T12:29:28.194Z","repository":{"id":251553231,"uuid":"834891237","full_name":"HiroIshida/plainmp","owner":"HiroIshida","description":"Very fast motion planning for articulated robot, through a bit of premature-optimization (C++ core with Python bindings) *less than 1ms for moderate problems","archived":false,"fork":false,"pushed_at":"2025-03-13T12:47:59.000Z","size":661,"stargazers_count":54,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T13:40:06.735Z","etag":null,"topics":["collision-detection","inverse-kinematics","motion-planning","ompl","robotics-kinematics","signed-distance-field","trajectory-optimization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HiroIshida.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-BSD3","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":"2024-07-28T17:10:36.000Z","updated_at":"2025-03-05T03:35:52.000Z","dependencies_parsed_at":"2024-12-22T22:19:30.497Z","dependency_job_id":"a8fd0f25-d456-43f8-b15f-05c0aaf06ee9","html_url":"https://github.com/HiroIshida/plainmp","commit_stats":null,"previous_names":["hiroishida/plainmp"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Fplainmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Fplainmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Fplainmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Fplainmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiroIshida","download_url":"https://codeload.github.com/HiroIshida/plainmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244798713,"owners_count":20512102,"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":["collision-detection","inverse-kinematics","motion-planning","ompl","robotics-kinematics","signed-distance-field","trajectory-optimization"],"created_at":"2025-03-21T12:29:27.569Z","updated_at":"2025-03-21T12:29:28.185Z","avatar_url":"https://github.com/HiroIshida.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plainmp  [![build \u0026 test](https://github.com/HiroIshida/plainmp/actions/workflows/build_and_test.yaml/badge.svg)](https://github.com/HiroIshida/plainmp/actions/workflows/build_and_test.yaml) [![format](https://github.com/HiroIshida/plainmp/actions/workflows/check_format.yaml/badge.svg)](https://github.com/HiroIshida/plainmp/actions/workflows/check_format.yaml) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14271046.svg)](https://doi.org/10.5281/zenodo.14271046)\n\n![result](https://github.com/user-attachments/assets/fde49de1-f583-4f1d-933b-5853cea6bccc)\n\nThe project is licensed under the BSD 3 License (see [LICENSE](./LICENSE-BSD3)), except for the code in `cpp` directory which is licensed under the MPL2.0 (see [cpp/LICENSE-MPL2](cpp/LICENSE-MPL2)).\n\nplainmp provides:\n- Fast sampling-based motion planning (e.g., **less than 1ms** for moderate problems using RRTConnect)\n- Collision-aware inverse kinematics (IK) solver\n- Motion planning/IK for various models (e.g. movable base, dual-arm, object attachment)\n- Flexible framework for defining various robot model and motion planning problems\n- Collision checking for primitives (sphere/box/cylinder...) and/or point cloud vs. robot\n- (Beta) Sampling-based constrained motion planning solver (e.g., whole-body humanoid)\n- (Beta) SQP-based constrained motion planning (will be used as smoother for sampling-based planner)\n\nNote that plainmp currently heavily relies on approximations of robot body by spheres.\n\nThe TODO list is\n- Speed up IK by reimplementing current Python/C++ mix into pure C++\n- Auto-generate collision spheres from URDF instead of manual sphere definitions\n\nRelated/depeding projects:\n- plainmp is a rewrite of my previous projects [scikit-motionplan](https://github.com/HiroIshida/scikit-motionplan) and [tinyfk](https://github.com/HiroIshida/tinyfk) to achieve 100x speedup\n- plainmp depends on [OMPL](https://github.com/ompl/ompl) (with unmerged PR of [ERTConnect](https://github.com/ompl/ompl/pull/783)) for SBMP algorithms\n- plainmp deponds on [scikit-robt](https://github.com/iory/scikit-robot) framework for visualization and planning problem specifications\n- [benchmark](https://github.com/HiroIshida/bench_plainmp_and_vamp) with [VAMP](https://github.com/KavrakiLab/vamp) (the world fastest motion planner as of 2024 to my knowledge) shows that\n    - AMD Ryzen 7 7840HS (256-bit AVX) VAMP is faster (1.3x, 1.1x, 4.8x, 12.5x)\n    - ARM Neoverse-N1 (128-bit NEON) both seems to be comparable (0.53x, 0.41x, 2.2x, 4.8x)\n    - x-s are time ratio plainmp/VAMP for 4 different settings with resolution of 1/32\n\n## Performance example\npanda dual bars: median 0.17 ms | panda ceiled dual bars: median 0.65 ms | fetch table: median 0.62 ms\n\n\n\u003cimg src=\"https://github.com/user-attachments/assets/9bcb776c-3e60-4715-9371-e54403b06abe\" width=\"260\" /\u003e \u003cimg src=\"https://github.com/user-attachments/assets/b9ef3966-f638-46d6-8355-b1b40f536310\" width=\"260\" /\u003e \u003cimg src=\"https://github.com/user-attachments/assets/d6bd4e28-70a8-45d3-8a75-f704b3734a36\" width=\"260\" /\u003e\n\n\u003cimg src=\"https://github.com/user-attachments/assets/a9a0e2b0-85d6-4178-9fbf-0a57a16ebeae\" width=\"260\" /\u003e \u003cimg src=\"https://github.com/user-attachments/assets/f8b61603-84bd-4e72-a348-1ab93ecb3b65\" width=\"260\" /\u003e \u003cimg src=\"https://github.com/user-attachments/assets/bf529b32-74fa-4819-92d6-33d187f38870\" width=\"260\" /\u003e\n\n\\* resolution is isotropically set to 0.05 rad or 0.05 m with [box motion validator](./cpp/ompl/motion_validator.hpp)\n\n\\* On my laptop (AMD Ryzen 7 7840HS)\n\nThe plots are generated by the following commands:\n```bash\npython3 example/bench/panda_plan.py  # panda dual bars\npython3 example/bench/panda_plan.py --difficult  # panda ceiled dual bars\npython3 example/bench/fetch_plan.py  # fetch table\n```\n\n## installation and usage\n```bash\nsudo apt-get install libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev  # for scikit-robot\nsudo apt install libeigen3-dev libboost-all-dev libompl-dev # plainmp dependencies\npip install scikit-build\ngit submodule update --init\npip install -e . -v\n```\nThen try examples in [example directory](./example) with `--visualize` option. Note that you may need to install the following for visualization:\n```bash\npip uninstall -y pyrender \u0026\u0026 pip install git+https://github.com/mmatl/pyrender.git --no-cache-dir\n```\n\n## Troubleshooting\n- Segmentation faults and other C++ runtime errors may occur when multiple OMPL versions are present - typically when installed via both from Ubuntu and ROS. To temporarily resolve this, disable ROS workspace sourcing in your shell or remove either OMPL installation.\n\n## How to add a new robot model\n- (step 1) Prepare a URDF file. Note that [robot_description](https://github.com/robot-descriptions/robot_descriptions.py) package might be useful.\n- (step 2) Implement a new class inheriting `RobotSpec` class in [python/plainmp/robot_spec.py](./python/plainmp/robot_spec.py).\n- (step 3) Write yaml file defining urdf location/collision information/control joints/end effector in (see [example yaml files](./python/plainmp/conf/)).\n- NOTE: In step 3, you need to manually define the collision spheres for the robot (This is actually tedious and takes an hour or so). For this purpose, a visualizer script like [this](./example/misc/panda_visualize_coll_spheres.py) might be helpful to check the collision spheres defined in the yaml file. The output of the this visualizer looks like figure below.\n\u003cimg src=\"https://github.com/user-attachments/assets/e7f36c3a-5fc8-45ee-8583-f1c5f38bf561\" width=\"400\" /\u003e\n\n## Note on motion validator of motion planning\nWe provides two types of motion validator type `box` and `euclidean`.\n- The `box` type split the motion segment into waypoints by clipping the segment with the collision box. You need to specify box widths for each joint.\n    - e.g. `bow_width = np.ones(7) / 20` for panda robot\n- The `euclidean` type is instead split the segment by euclidean distance of `resolution` parameter.\n    - e.g. `resolution = 1/20` for panda robot\n- see [problem.py](./python/plainmp/problem.py) for how to specify the motion validator.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroishida%2Fplainmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiroishida%2Fplainmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroishida%2Fplainmp/lists"}