Healthcare-Robotics / assistive-gym

Assistive Gym, a physics-based simulation framework for physical human-robot interaction and robotic assistance.
MIT License
306 stars 73 forks source link

Your PyBullet vs Official PyBullet Implementations? #11

Open DanielTakeshi opened 3 years ago

DanielTakeshi commented 3 years ago

Hi @Zackory this is great work!

I have been working closely with PyBullet over the last few months, and am using the official PyBullet code installed via pip install pybullet==3.0.4 where this version supports deformables. (It is in the official documentation now.) I see that your installation instructions https://github.com/Healthcare-Robotics/assistive-gym/wiki/1.-Install

specify your custom version of PyBullet. Your setup.py:

https://github.com/Zackory/bullet3/blob/master/setup.py

suggests you used PyBullet 2.4.8

  1. Is this correct, in that you forked off of code that was for the PyPI 2.4.8 version?

More broadly I seek to get a better understanding of the differences between the two implementations. So, I have two follow-up questions:

  1. Is the main difference between your code and PyBullet's is your way of handling gripping of deformables?
  2. Did you change any of the physics implementation for cloth simulation?
Zackory commented 3 years ago

Hi Daniel,

  1. Yes this is correct. We forked PyBullet at version 2.4.8 and made changes to support Assistive Gym. Most of these changes were with respect to loading and rendering cloth. Here is the custom PyBullet repo: https://github.com/Zackory/bullet3

  2. Gripping of soft bodies (via anchor points) was one aspect we implemented in PyBullet. Other changes included: wrapping some of the functionality for creating soft bodies with anchors, dynamically changing soft body parameters, receiving soft body collision information (including contact positions and forces), and changing how soft bodies are rendered (namely to improve cloth rendering, including changing colors, drawing edges, and translucency, since the default rendering exhibited tearing and flickering).

We have ported all of the changes we made to PyBullet over to a newer version 2.5.8 of PyBullet: https://github.com/Zackory/bullet3/tree/new_updated_pybullet There are only about 10 commits we made to this branch, so it shouldn't be too challenging to find all of the custom changes we made and port them over to a newer version of PyBullet as well.

  1. Luckily no, we did not need to change the physics engine for soft bodies. All of the changes were wrapping existing functionality for Python, and editing the rendering of cloth.