Page 1 of 1

pyBullet vs Gazebo

Posted: Tue Apr 10, 2018 7:33 pm
by logic-man
I'm new to pyBullet and I am wondering if anyone can give me a general sense of the differences between pyBullet and Gazebo for robotic simulation. It seems that Gazebo uses Bullet, amongst others, as a base physics engine. But, I am wondering if anyone had a sense for why people would choose one over the other. Is one faster? easier to work with? etc.

Re: pyBullet vs Gazebo

Posted: Tue Apr 10, 2018 9:01 pm
by adamweshall
A couple reasons I went with pybullet over Gazebo:

-Pybullet has easier set-up in my opinion. In my experience using gazebo you are forced to use their directory structures etc. I found pybullet a bit more flexible.
-Pybullet use python and Gazebo does not. Gazebo is mostly c++. I find it more difficult to quickly prototype ideas and test new libraries in c++ than in python so I went with pybullet.

A couple plus sides of Gazebo:
-If you want to use ROS, Gazebo interfaces nicely with ROS
-If you prefer c++ development environment
-Probably other things as I'm not that experienced with Gazebo.

I'm still pretty new to pybullet. I have found some limitations of the pybullet bindings but most things I want to do I have found a way to do them.

Re: pyBullet vs Gazebo

Posted: Wed Apr 11, 2018 7:14 am
by Erwin Coumans
Ultimately you can try out both and decide for yourself.
It seems that Gazebo uses Bullet
Gazebo uses btRigidBody from Bullet (maximal coordinate rigid bodies) which is not necessary the best way for robotics, it allows for joint gap.

PyBullet uses Featherstone articulated rigid bodies (btMultiBody) by default, which is more suitable for robotics related task.
In addition, PyBullet has inverse dynamics, inverse kinematics, rendering, VR, and has default examples for Reinforcement Learning, using OpenAI.

Both Gazebo and PyBullet use URDF and SDF files as input. PyBullet allows to import MuJoCo files as well.
Both have a C plugin mechanism.

Aside from this, PyBullet can be installed with 1 line:
pip install pybullet
Note that you can also use PyBullet framework from C and C++, in that case you use the Bullet-C-API or Robotics C++ API.

Re: pyBullet vs Gazebo

Posted: Wed Apr 11, 2018 4:39 pm
by logic-man
Thanks so much! This is very helpful. I am assuming that pyBullet plays well with ROS too.