Skip to main content

Bullet-based simulation for SoftBank Robotics' robots

Project description

qiBullet ci codecov pypi python Downloads Github discussions docs

Bullet-based python simulation for SoftBank Robotics' robots.

Installation

The following modules are required:

  • numpy
  • pybullet

The qiBullet module can be installed via pip, for python 2.7 and python 3:

pip install --user qibullet

Additional resources (robot meshes and URDFs) are required in order to be able to spawn a Pepper, NAO or Romeo robot in the simulation. These extra resources will be installed in your home folder:

  • /home/username/.qibullet on Linux and macOS
  • C:\Users\username\.qibullet on Windows

The installation of the additional resources will automatically be triggered if you try to spawn a Pepper, NAO or Romeo for the first time. If qiBullet finds the additional resources in your local folder, the installation won't be triggered. The robot meshes are under a specific license, you will need to agree to that license in order to install them. More details on the installation process can be found on the wiki.

Usage

A robot can be spawned via the SimulationManager class:

import sys
from qibullet import SimulationManager

if __name__ == "__main__":
    simulation_manager = SimulationManager()

    # Launch a simulation instances, with using a graphical interface.
    # Please note that only one graphical interface can be launched at a time
    client_id = simulation_manager.launchSimulation(gui=True)

    # Selection of the robot type to spawn (True : Pepper, False : NAO)
    pepper_robot = True

    if pepper_robot:
      # Spawning a virtual Pepper robot, at the origin of the WORLD frame, and a
      # ground plane
      pepper = simulation_manager.spawnPepper(
          client_id,
          translation=[0, 0, 0],
          quaternion=[0, 0, 0, 1],
          spawn_ground_plane=True)
    else:
      # Or a NAO robot, at a default position
      nao = simulation_manager.spawnNao(
          client_id,
          spawn_ground_plane=True)

    # This snippet is a blocking call, just to keep the simulation opened
    if sys.version_info[0] >= 3:
      input("Press a key to end the simulation")
    else:
      raw_input("Press a key to end the simulation")
    
    # Stop the simulation
    simulation_manager.stopSimulation(client_id)
    

Or using loadRobot from the PepperVirtual class if you already have a simulated environment:

    pepper = PepperVirtual()

    pepper.loadRobot(
      translation=[0, 0, 0],
      quaternion=[0, 0, 0, 1],
      physicsClientId=client_id)

More snippets can be found in the examples folder, or on the wiki

:warning: The camera subscription system of qiBullet 1.4.0 (and lesser) is deprecated, use the new system

Documentation

The qiBullet API documentation can be found here. In order to build the documentation, the doxygen package has to be installed beforehand and the docs folder has to exist. The submodules should also be checked out:

git submodule init
git submodule update

The documentation can then be generated via the following command:

cd docs
doxygen Doxyfile

The repository also contains a wiki, providing some tutorials.

Citations

Please cite qiBullet if you use this repository in your publications:

@article{busy2019qibullet,
  title={qiBullet, a Bullet-based simulator for the Pepper and NAO robots},
  author={Busy, Maxime and Caniot, Maxime},
  journal={arXiv preprint arXiv:1909.00779},
  year={2019}
}

Troubleshooting

OpenGL driver

If you encounter the message:

Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu

Your computer is using the Intel OpenGL driver. Go to Software & Updates, Additional Drivers, and select a driver corresponding to your GPU.

License

Licensed under the Apache-2.0 License

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

qibullet-1.4.4a1.tar.gz (5.7 MB view details)

Uploaded Source

Built Distribution

qibullet-1.4.4a1-py3-none-any.whl (5.8 MB view details)

Uploaded Python 3

File details

Details for the file qibullet-1.4.4a1.tar.gz.

File metadata

  • Download URL: qibullet-1.4.4a1.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for qibullet-1.4.4a1.tar.gz
Algorithm Hash digest
SHA256 c51cdaca2dc017aa8c0f97bc52b383e63868b65a9e8ee8f0bda169db3455c7cd
MD5 93c5cbf3c7f096febe47229f1e1bc955
BLAKE2b-256 9a5fbdee4b784a563b03fd9f104ed6ed4c6aa4f54ccb7b2a5809d41f2858c2eb

See more details on using hashes here.

File details

Details for the file qibullet-1.4.4a1-py3-none-any.whl.

File metadata

  • Download URL: qibullet-1.4.4a1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for qibullet-1.4.4a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cabe825a9544e6c2fd599cd948befbf86d7d7806af5d6aacb4fa140ce1e5798
MD5 3f98e794d58860364fbdb072825666b8
BLAKE2b-256 58b4ba9fc82affe29a6585ff5cc496bc906e99f9d73250319975d3662ab8a07a

See more details on using hashes here.

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