Skip to main content

Basic utilities for PyBullet, including collision detection, ghost (i.e. visual-only) objects, and cameras.

Project description

pyb_utils: utilities for PyBullet

This is a collection of utilities I've found useful for working with PyBullet, including:

  • Collision detection: conveniently set up shortest distance computations and collision checking between arbitrary objects in arbitrary configurations with PyBullet. See the accompanying blog post.
  • Ghost objects: add purely visual objects to the simulation, optionally attached to another body.
  • Camera: virtual camera from which to get RGBA, depth, segmentation, and point cloud data. Also provides video recording using OpenCV.

Install and run

This package requires Python 3.7+. It has been tested on Ubuntu 16.04, 18.04, and 20.04.

From pip

pip install pyb_utils

From source

Clone the repo:

git clone https://github.com/adamheins/pyb_utils
cd pyb_utils

Install using poetry:

poetry install
poetry run python scripts/collision_detection_example.py  # for example

Or using pip:

python -m pip install .

Usage and examples

You can find example scripts demonstrating all of this package's utilities in the scripts/ directory:

Known issues

Feel free to open issues (or better yet, a pull request!) if you find a problem. Currently known issues:

  • Video recording does not output MP4 videos correctly. The AVI format works, however.
  • Ghost objects sometimes flicker (spooky, but undesirable).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyb_utils-0.2.3.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

pyb_utils-0.2.3-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page