pyBullet vs Gazebo

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
logic-man
Posts: 2
Joined: Tue Apr 10, 2018 7:28 pm

pyBullet vs Gazebo

Post 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.
adamweshall
Posts: 3
Joined: Mon Apr 09, 2018 5:15 pm

Re: pyBullet vs Gazebo

Post 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.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: pyBullet vs Gazebo

Post 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.
logic-man
Posts: 2
Joined: Tue Apr 10, 2018 7:28 pm

Re: pyBullet vs Gazebo

Post by logic-man »

Thanks so much! This is very helpful. I am assuming that pyBullet plays well with ROS too.
Post Reply