1. Introduction to PyBullet
PyBullet is developed based on the well-known open source physics engine bullet and packaged as a module of Python for robot simulation and learning. PyBullet supports loading URDF, SDF, MJCF and other robot description files, and provides functions such as forward/inverse kinematics, forward/inverse dynamics, collision detection, and ray intersection query. In addition, it also provides a lot of robot routines and practical debugging tools (sliders, buttons, text)
2. PyBullet learning materials
3. PyBullet installation
To install PyBullet, you only need to enter in the terminal
pip install pybullet
The following yellow prompt part may appear, indicating that the pip version is low, and we will report an error by entering "pip install --upgrade pip" according to the prompt, so you can refer to upgrade pip
Run the Franka Emika Panda routine:
python -m pybullet_robots.panda.loadpanda
If an error occurs ImportError: numpy.core.multiarray failed to import
The reason is that the numpy version is too low, enter the following command in the terminal to upgrade numpy
pip install -U numpy
The routine runs successfully as follows:
4. Getting Started with PyBullet
The Panda robot model is in /home/.local/lib/python2.7/site-packages/pybullet_data/franka_panda.
In the path /home/.local/lib/python2.7/site-packages/pybullet_robots/panda, there are simulation routines for the panda robotic arm.
Type in terminal
python loadpanda.py
You can run the routine. There are two routines, laikago and xarm, in the pybullet_robots folder, both of which can be run. The results are as follows:
5. Run the PyBullet reinforcement learning routine
Install tensorflow and gym in the terminal
pip3 install tensorflow-hub -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install gym -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Start the routine in the terminal:
python -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
Reference article link:
PyBullet Notes (4) Robot Control, Camera Tracking and State Recording - Programmer Sought
Getting Started with pybullet Section 1
Introduction to PyBullet and Introduction to Robot Simulation - Programmer Sought
Pybullet Getting Started Tutorial
Read the Docs From obsession to entry - Akimi East's Blog - CSDN Blog