A repository of PyBullet utility functions for robotic motion planning, manipulation planning, and task and motion planning

Overview

pybullet-planning (previously ss-pybullet)

A repository of PyBullet utility functions for robotic motion planning, manipulation planning, and task and motion planning (TAMP). This repository was originally developed for the PDDLStream (previously named STRIPStream) approach to TAMP.

With the help of Yijiang Huang, a stable and documented fork of pybullet-planning named pybullet_planning is available through PyPI. However, new features will continue to be introduced first through pybullet-planning.

Citation

Caelan Reed Garrett. PyBullet Planning. https://pypi.org/project/pybullet-planning/. 2018.

Installation

Install for macOS or Linux using:

$ git clone --recurse-submodules https://github.com/caelan/pybullet-planning.git
$ cd pybullet-planning
pybullet-planning$ pip install -r requirements.txt

pybullet-planning is intended to have ongoing support for both python2.7 and python3.*

Make sure to recursively update pybullet-planning's submodules when pulling new commits.

pybullet-planning$ git pull --recurse-submodules

IKFast Compilation

We recommend using IKFast, an analytical inverse kinematics solver, instead of PyBullet's damped least squares solver. IKFast bindings are included for the following robots:

  • Franka Panda - pybullet-planning$ (cd pybullet_tools/ikfast/franka_panda; python setup.py)
  • MOVO - pybullet-planning$ (cd pybullet_tools/ikfast/movo; python setup.py)
  • PR2 - pybullet-planning$ (cd pybullet_tools/ikfast/pr2; python setup.py)

To create IKFast bindings for a new robot, following the instructions in ikfast_pybind.

Tests

  1. Test PyBullet - pybullet-planning$ python -c 'import pybullet'

Tutorial

test_turtlebot - $ python -m examples.test_turtlebot

Heavily annotated simple example that demonstrates:

  • Creating a PyBullet simulation
  • Waiting for user input (useful on macOS)
  • Programmatically creating objects
  • Getting/setting object base poses
  • Loading a robot URDF
  • Getting/setting robot joint positions
  • Looking up named robot links and joints
  • Computing an object's current Axis-Aligned Bounding Box (AABB)
  • Drawing coordinate frames and bounding boxes
  • Checking collisions between two objects
  • Temporarily disabling rendering for efficiency purposes

Planning Examples

Debug Examples

PDDLStream Examples

See the following examples: https://github.com/caelan/pddlstream/tree/master/examples/pybullet

Forks

Gallery

PyBullet Resources

Bullet Resources

Comments
  • Help to build the examples

    Help to build the examples

    Hello,

    I'm trying to run these examples on my ubuntu 18.x VM. I managed to install pybullet and numpy.But when i run the test, i get this

    Traceback (most recent call last): File "", line 1, in ImportError: No module named ss

    Thanks for your help. When i try to run to run the kuka test, i also get some errors

    pybullet build time: Mar 5 2019 09:25:16 Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 5, in from pybullet_tools.kuka_primitives import BodyPose, BodyConf, Command, get_grasp_gen,
    File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/kuka_primitives.py", line 4, in from .pr2_utils import get_top_grasps File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/pr2_utils.py", line 11, in from .utils import multiply, get_link_pose, joint_from_name, set_joint_position, joints_from_names,
    File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/utils.py", line 20, in from motion_planners.rrt_connect import birrt, direct_path ModuleNotFoundError: No module named 'motion_planners'

    Thanks for your help, Michael

    opened by michaelchi08 5
  • Grasping Issue

    Grasping Issue

    Hi,

    I am trying to grasp small blocks in pybullet using the PR2 gripper. However, I notice that there are some artifacts that I encounter while actually grasping the objects. This leads to significant inconsistencies. I have attached a gif of one such artifact. Can someone confirm the source of this issue and possible solutions?

    In the example below, the gripper is closed by position controlling to a pre-determined value. There are also cases, where the gripper does not properly grasp the object causing it to fall.

    The PR2 model was taken from this repository.

    ezgif com-gif-maker

    opened by Muhammad441 3
  • question about test_kuka_pick.py

    question about test_kuka_pick.py

    I build pybullet and pybullet_plan on my Windows system. but when I run the 'test_kuka_pick.py' ,I got an error in 'utils.py' ,'No module named 'motion_planners'. I want to know how to deal with this error.

    opened by jlbhb 2
  • question about IKFast inverse kinematics arguments

    question about IKFast inverse kinematics arguments

    Hi Caelan :) I hope you're well!

    I have a question about the arguments to IKFast inverse kinematics. I'm looking here:

    https://github.com/caelan/pybullet-planning/blob/8953d2dbfd789d5681053eb4993b5ddc0d910a6b/pybullet_tools/ikfast/ikfast.py#L163

    The argument that I don't understand is free_positions. I'm guessing that this has something to do with wanting multiple possible solutions from the solver. But what does the IKFast solver expect for that argument? Sorry that I can't find documentation on the IKFast side for this.

    Thanks for your help!

    opened by tomsilver 1
  • Multiple IK solutions

    Multiple IK solutions

    Hello, Thanks for such a great library. I have a problem where I do not know the current joint config and I am required to get multiple Ik solutions of Franka panda given the current end-effector position and orientation. I looked up the ikfast.py file and there I found pybullet_inverse_Kinematics function . if I set max-attempts arg greater than 1 would I will be able to get multiple Ik solutions? If not can you help how can I get multiple Ik solutions then for such a problem? Thanks

    opened by prajwalresearch 1
  • What should I set the

    What should I set the "free_joints" in IKFastInfo for my Fetch robot?

    Hi,

    I'd like to build an ikFast module for a Fetch robot and use it in pybullet env.

    Based on what you have for the franka_panda robot:

    1. I created the ikfast solver for my fetch's arm via "ikmodel.autogenerate()" and get the files "ikfast.h, ikfast_fetch_arm.cpp, ikfast_fetch_arm.so";
    2. I copied the python bindings stuff (line 12835 - 12995) in "ikfast_panda_arm.cpp" into my "ikfast_fetch_arm.cpp";
    3. I also copied all relevant files into my workspace;
    4. After running "compile_ikfast", it shows "ikfast module ikfast_fetch_arm imported successful"

    I noticed you set a free_joint for panda in ik.py, I was wondering what this free_joint means?

    If I leave it as an empty list, I got an error saying "get_ik function takes exactly 3 arguments (2 given)" for line 26 shown below:

    Screenshot from 2020-10-13 16-59-12

    If I set the free_joint as "wrist_roll_joint", I always get none solution. Is this because I didn't set correct free_joints? if so do you have any idea what the correct joint to be set? Thank you very much!

    I also attached the output of dump_body(robot) below:

    Screenshot from 2020-10-13 17-01-54

    opened by yuchen-x 1
  • Fix decompose paths bug

    Fix decompose paths bug

    If a trajectory with 2 consecutive duplicate states exists, then the current implementation of decompose_into_paths will consider this a new joint_group with 0 joints since none of the joints is manipulated. The proposed fix simply removes the duplicate consecutive state.

    opened by ChamzasKonstantinos 0
  • construction-utils clean!

    construction-utils clean!

    This PR contains the following modifications:

    1. I get everything that is related to construction problem instances out of this repo.
    2. I add the variable joints=conf2.joints in some planning fns (get_free_motion_gen, get_holding_motion_gen) in kuka_primitive. They assume all the movable joints by default, which is not the case for eth_rfl dual arms robot.

    So after you merge them (by git or by hand), I shouldn't need to modify this submodule anymore.

    opened by yijiangh 0
  • python 3.10 compatible MutableSet

    python 3.10 compatible MutableSet

    Making PR2 TAMP example work in python 3.10 as mentioned in https://github.com/caelan/pddlstream/pull/35#issuecomment-1154658107 Require commit f067901bfabd3cd1a21ae42ef2088733eb1da476 in PR https://github.com/caelan/pddlstream/pull/35 to work

    opened by AzureViolin 0
Owner
Caelan Garrett
PhD Student at MIT's @Learning-and-Intelligent-Systems group.
Caelan Garrett
A python library for easy manipulation and forecasting of time series.

Time Series Made Easy in Python darts is a python library for easy manipulation and forecasting of time series. It contains a variety of models, from

Unit8 5.2k Jan 4, 2023
Data science, Data manipulation and Machine learning package.

duality Data science, Data manipulation and Machine learning package. Use permitted according to the terms of use and conditions set by the attached l

David Kundih 3 Oct 19, 2022
OptaPy is an AI constraint solver for Python to optimize planning and scheduling problems.

OptaPy is an AI constraint solver for Python to optimize the Vehicle Routing Problem, Employee Rostering, Maintenance Scheduling, Task Assignment, School Timetabling, Cloud Optimization, Conference Scheduling, Job Shop Scheduling, Bin Packing and many more planning problems.

OptaPy 208 Dec 27, 2022
Implementations of Machine Learning models, Regularizers, Optimizers and different Cost functions.

Linear Models Implementations of LinearRegression, LassoRegression and RidgeRegression with appropriate Regularizers and Optimizers. Linear Regression

Keivan Ipchi Hagh 1 Nov 22, 2021
A basic Ray Tracer that exploits numpy arrays and functions to work fast.

Python-Fast-Raytracer A basic Ray Tracer that exploits numpy arrays and functions to work fast. The code is written keeping as much readability as pos

Rafael de la Fuente 393 Dec 27, 2022
Cohort Intelligence used to solve various mathematical functions

Cohort-Intelligence-for-Mathematical-Functions About Cohort Intelligence : Cohort Intelligence ( CI ) is an optimization technique. It attempts to mod

Aayush Khandekar 2 Oct 25, 2021
Simplify stop motion animation with machine learning.

Simplify stop motion animation with machine learning.

Nick Bild 25 Sep 15, 2022
This repository has datasets containing information of Uber pickups in NYC from April 2014 to September 2014 and January to June 2015. data Analysis , virtualization and some insights are gathered here

uber-pickups-analysis Data Source: https://www.kaggle.com/fivethirtyeight/uber-pickups-in-new-york-city Information about data set The dataset contain

B DEVA DEEKSHITH 1 Nov 3, 2021
Home repository for the Regularized Greedy Forest (RGF) library. It includes original implementation from the paper and multithreaded one written in C++, along with various language-specific wrappers.

Regularized Greedy Forest Regularized Greedy Forest (RGF) is a tree ensemble machine learning method described in this paper. RGF can deliver better r

RGF-team 363 Dec 14, 2022
This is the code repository for Interpretable Machine Learning with Python, published by Packt.

Interpretable Machine Learning with Python, published by Packt

Packt 299 Jan 2, 2023
A comprehensive repository containing 30+ notebooks on learning machine learning!

A comprehensive repository containing 30+ notebooks on learning machine learning!

Jean de Dieu Nyandwi 3.8k Jan 9, 2023
This repository contains the code to predict house price using Linear Regression Method

House-Price-Prediction-Using-Linear-Regression The dataset I used for this personal project is from Kaggle uploaded by aariyan panchal. Link of Datase

null 0 Jan 28, 2022
This repository contains full machine learning pipeline of the Zillow Houses competition on Kaggle platform.

Zillow-Houses This repository contains full machine learning pipeline of the Zillow Houses competition on Kaggle platform. Pipeline is consists of 10

null 2 Jan 9, 2022
This is the code repository for LRM Stochastic watershed model.

LRM-Squannacook Input data for generating stochastic streamflows are observed and simulated timeseries of streamflow. their format needs to be CSV wit

null 1 Feb 14, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Jan 8, 2023
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23.6k Jan 3, 2023
Uber Open Source 1.6k Dec 31, 2022
A library of extension and helper modules for Python's data analysis and machine learning libraries.

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. Sebastian Raschka 2014-2021 Links Doc

Sebastian Raschka 4.2k Dec 29, 2022
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.

Website | Documentation | Tutorials | Installation | Release Notes CatBoost is a machine learning method based on gradient boosting over decision tree

CatBoost 6.9k Jan 5, 2023