diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml new file mode 100644 index 0000000..4f89199 --- /dev/null +++ b/.github/workflows/unittests.yml @@ -0,0 +1,41 @@ +name: unit-tests + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-16.04 + + strategy: + max-parallel: 5 + matrix: + python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + + steps: + - name: Checkout qiBullet Github repository + uses: actions/checkout@v2 + with: + lfs: true + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x64' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install numpy --upgrade + pip install pybullet + pip install codecov + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install qiBullet + run: python setup.py develop --agree-license + - name: Tests + run: | + cd tests + coverage run test_launcher.py + - name: Coverage + run: | + cd tests + codecov \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b90d203..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -notifications: - email: - if: branch = master - -os : - - linux - -dist: - - xenial - -language: python - -python: - - "2.7" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - -install: - - "pip install pybullet" - - "pip install numpy --upgrade" - - "pip install codecov" - - "python setup.py develop --agree-license" - -script: - - cd tests - - coverage run test_launcher.py - -after_success: - - codecov \ No newline at end of file diff --git a/README.md b/README.md index a27ebd6..18ae49b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# qiBullet [![Build Status](https://api.travis-ci.org/softbankrobotics-research/qibullet.svg?branch=master)](https://travis-ci.org/softbankrobotics-research/qibullet) [![codecov](https://codecov.io/gh/softbankrobotics-research/qibullet/branch/master/graph/badge.svg)](https://codecov.io/gh/softbankrobotics-research/qibullet) [![pypi](https://img.shields.io/pypi/v/qibullet.svg)](https://pypi.org/project/qibullet/) [![Downloads](https://pepy.tech/badge/qibullet)](https://pepy.tech/project/qibullet) [![Gitter chat](https://badges.gitter.im/qibullet.png)](https://gitter.im/qibullet "Gitter chat") +# qiBullet [![unit-tests](https://github.com/softbankrobotics-research/qibullet/workflows/unit-tests/badge.svg?branch=master)](https://github.com/softbankrobotics-research/qibullet/actions?query=workflow%3Aunit-tests) [![codecov](https://codecov.io/gh/softbankrobotics-research/qibullet/branch/master/graph/badge.svg)](https://codecov.io/gh/softbankrobotics-research/qibullet) [![pypi](https://img.shields.io/pypi/v/qibullet.svg)](https://pypi.org/project/qibullet/) [![Downloads](https://pepy.tech/badge/qibullet)](https://pepy.tech/project/qibullet) [![Gitter chat](https://badges.gitter.im/qibullet.png)](https://gitter.im/qibullet "Gitter chat") __Bullet-based__ python simulation for __SoftBank Robotics'__ robots. diff --git a/docs/Doxyfile b/docs/Doxyfile index a03415a..953127e 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "qiBullet" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.4.2 +PROJECT_NUMBER = 1.4.3 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/docs/api/annotated.html b/docs/api/annotated.html index 8dc59fd..708f894 100644 --- a/docs/api/annotated.html +++ b/docs/api/annotated.html @@ -24,7 +24,7 @@
| Controller (qibullet.controller) | NaoRosWrapper (qibullet.ros_wrapper) | RobotPosture (qibullet.robot_posture) | SimulationManager (qibullet.simulation_manager) | ||
| NaoVirtual (qibullet.nao_virtual) | RobotVirtual (qibullet.robot_virtual) | ||||
BaseController (qibullet.base_controller) |
| RomeoPosture (qibullet.robot_posture) | FsrHandler (qibullet.fsr) | Link (qibullet.link) | PepperRosWrapper (qibullet.ros_wrapper) |
|
+
|
| PepperVirtual (qibullet.pepper_virtual) | ||||
BaseController (qibullet.base_controller) |
| Sensor (qibullet.sensor) | ||||
| Joint (qibullet.joint) | RomeoRosWrapper (qibullet.ros_wrapper) | ||||
| PepperBaseController (qibullet.base_controller) | RomeoVirtual (qibullet.romeo_virtual) | ||||
Camera (qibullet.camera) | PepperPosture (qibullet.robot_posture) | RosWrapper (qibullet.ros_wrapper) | ||||
CameraDepth (qibullet.camera) | Laser (qibullet.laser) | PepperRosWrapper (qibullet.ros_wrapper) |
| |||
CameraResolution (qibullet.camera) | Link (qibullet.link) | PepperVirtual (qibullet.pepper_virtual) | ||||
CameraRgb (qibullet.camera) |
|
| Sensor (qibullet.sensor) | GravityHelper (qibullet.helpers) | NaoFsr (qibullet.fsr) | SimulationManager (qibullet.simulation_manager) | +
| NaoPosture (qibullet.robot_posture) | RobotModule (qibullet.robot_module) | ||||
Camera (qibullet.camera) | NaoRosWrapper (qibullet.ros_wrapper) | RobotPosture (qibullet.robot_posture) | ||||
CameraDepth (qibullet.camera) | Imu (qibullet.imu) | NaoVirtual (qibullet.nao_virtual) | RobotVirtual (qibullet.robot_virtual) | |||
CameraResolution (qibullet.camera) |
|
| RomeoPosture (qibullet.robot_posture) | |||
CameraRgb (qibullet.camera) | RomeoRosWrapper (qibullet.ros_wrapper) | |||||
Controller (qibullet.controller) | Joint (qibullet.joint) | PepperBaseController (qibullet.base_controller) | RomeoVirtual (qibullet.romeo_virtual) | |||
|
| PepperPosture (qibullet.robot_posture) | RosWrapper (qibullet.ros_wrapper) | |||
NaoPosture (qibullet.robot_posture) | RobotModule (qibullet.robot_module) | |||||
Fsr (qibullet.fsr) | Laser (qibullet.laser) | |||||
Public Attributes | |||||
module_process | |||||
Public Attributes inherited from qibullet.sensor.Sensor | |||||
+ | frequency | ||||
Public Attributes inherited from qibullet.robot_module.RobotModule | |||||
robot_model |
def qibullet.camera.Camera.getFps | +( | ++ | self | ) | ++ |
Returns the framerate of the camera in number of frames per second. +This method simply wraps the @getFrequency method of Sensor, and will +return the frequency of the camera in Hz + +Returns: + fps - The number of frames per second for the camera (frequency of + the camera in Hz) ++
- | resolution | +resolution, | + +|
+ | + | + | fps = 30.0 |
@@ -440,10 +485,12 @@ | |||
qiBullet
- 1.4.2
+ 1.4.3
Bullet-based python simulation for SoftBank Robotics' robots.
|
@@ -102,16 +102,20 @@
|||
camera_link (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
far_plane (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
frame (defined in qibullet.camera.CameraDepth) | qibullet.camera.CameraDepth | ||
getCameraId(self) | qibullet.camera.Camera | ||
getCameraLink(self) | qibullet.camera.Camera | ||
frequency (defined in qibullet.sensor.Sensor) | qibullet.sensor.Sensor | ||
getCameraId(self) | qibullet.camera.Camera | ||
getCameraLink(self) | qibullet.camera.Camera | ||
getFps(self) | qibullet.camera.Camera | ||
getFrame(self) | qibullet.camera.Camera | ||
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | ||
getResolution(self) | qibullet.camera.Camera | ||
getRobotModel(self) | qibullet.robot_module.RobotModule | ||
HANDLES_LOCK (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static | |
hfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
intrinsic_matrix (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
isActive(self) | qibullet.camera.Camera | ||
getFrequency(self) | qibullet.sensor.Sensor | ||
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | ||
getResolution(self) | qibullet.camera.Camera | ||
getRobotModel(self) | qibullet.robot_module.RobotModule | ||
HANDLES_LOCK (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static | |
hfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
intrinsic_matrix (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
isActive(self) | qibullet.camera.Camera | ||
isAlive(self) | qibullet.robot_module.RobotModule | ||
K_720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static | |
K_Q720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static | |
K_QQ720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static | |
resolution (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
resolution_lock (defined in qibullet.camera.Camera) | qibullet.camera.Camera | ||
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | ||
subscribe(self, resolution) | qibullet.camera.Camera | ||
setFrequency(self, frequency) | qibullet.sensor.Sensor | ||
subscribe(self, resolution, fps=30.0) | qibullet.camera.Camera | ||
qibullet::sensor::Sensor.subscribe(self) | qibullet.sensor.Sensor | ||
unsubscribe(self) | qibullet.camera.Camera | ||
vfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera |
Public Attributes | ||
module_process | ||
Public Attributes inherited from qibullet.sensor.Sensor | ||
+ | frequency | |
Public Attributes inherited from qibullet.robot_module.RobotModule | ||
robot_model | ||
qiBullet
- 1.4.2
+ 1.4.3
Bullet-based python simulation for SoftBank Robotics' robots.
|
diff --git a/docs/api/classqibullet_1_1camera_1_1CameraResolution.html b/docs/api/classqibullet_1_1camera_1_1CameraResolution.html
index 4f0cd22..4514a0d 100644
--- a/docs/api/classqibullet_1_1camera_1_1CameraResolution.html
+++ b/docs/api/classqibullet_1_1camera_1_1CameraResolution.html
@@ -24,7 +24,7 @@
||
qiBullet
- 1.4.2
+ 1.4.3
Bullet-based python simulation for SoftBank Robotics' robots.
|
diff --git a/docs/api/classqibullet_1_1camera_1_1CameraRgb-members.html b/docs/api/classqibullet_1_1camera_1_1CameraRgb-members.html
index 4175a0c..f5d60dd 100644
--- a/docs/api/classqibullet_1_1camera_1_1CameraRgb-members.html
+++ b/docs/api/classqibullet_1_1camera_1_1CameraRgb-members.html
@@ -24,7 +24,7 @@
||
qiBullet
- 1.4.2
+ 1.4.3
Bullet-based python simulation for SoftBank Robotics' robots.
|
@@ -102,16 +102,20 @@
||
camera_link (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
far_plane (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
frame (defined in qibullet.camera.CameraRgb) | qibullet.camera.CameraRgb | |
getCameraId(self) | qibullet.camera.Camera | |
getCameraLink(self) | qibullet.camera.Camera | |
frequency (defined in qibullet.sensor.Sensor) | qibullet.sensor.Sensor | |
getCameraId(self) | qibullet.camera.Camera | |
getCameraLink(self) | qibullet.camera.Camera | |
getFps(self) | qibullet.camera.Camera | |
getFrame(self) | qibullet.camera.Camera | |
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | |
getResolution(self) | qibullet.camera.Camera | |
getRobotModel(self) | qibullet.robot_module.RobotModule | |
HANDLES_LOCK (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static |
hfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
intrinsic_matrix (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
isActive(self) | qibullet.camera.Camera | |
getFrequency(self) | qibullet.sensor.Sensor | |
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | |
getResolution(self) | qibullet.camera.Camera | |
getRobotModel(self) | qibullet.robot_module.RobotModule | |
HANDLES_LOCK (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static |
hfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
intrinsic_matrix (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
isActive(self) | qibullet.camera.Camera | |
isAlive(self) | qibullet.robot_module.RobotModule | |
K_720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static |
K_Q720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static |
K_QQ720p (defined in qibullet.camera.Camera) | qibullet.camera.Camera | static |
resolution (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
resolution_lock (defined in qibullet.camera.Camera) | qibullet.camera.Camera | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
subscribe(self, resolution) | qibullet.camera.Camera | |
setFrequency(self, frequency) | qibullet.sensor.Sensor | |
subscribe(self, resolution, fps=30.0) | qibullet.camera.Camera | |
qibullet::sensor::Sensor.subscribe(self) | qibullet.sensor.Sensor | |
unsubscribe(self) | qibullet.camera.Camera | |
vfov (defined in qibullet.camera.Camera) | qibullet.camera.Camera |
Public Attributes | ||
module_process | ||
Public Attributes inherited from qibullet.sensor.Sensor | ||
+ | frequency | |
Public Attributes inherited from qibullet.robot_module.RobotModule | ||
robot_model | ||
qiBullet
- 1.4.2
+ 1.4.3
Bullet-based python simulation for SoftBank Robotics' robots.
|
@@ -97,9 +97,10 @@
||
__init__(self, robot_model, physics_client) | qibullet.controller.Controller | |
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | |
getRobotModel(self) | qibullet.robot_module.RobotModule | |
module_process (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
physics_client (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
isAlive(self) | qibullet.robot_module.RobotModule | |
module_process (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
physics_client (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule |
Additional Inherited Members |
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
This is the complete list of members for qibullet.fsr.Fsr, including all inherited members.
+__init__(self, robot_model, fsr_link, physicsClientId=0) | qibullet.fsr.Fsr | |
qibullet::sensor::Sensor.__init__(self, robot_model, physics_client) | qibullet.sensor.Sensor | |
frequency (defined in qibullet.sensor.Sensor) | qibullet.sensor.Sensor | |
fsr_link (defined in qibullet.fsr.Fsr) | qibullet.fsr.Fsr | |
getFrequency(self) | qibullet.sensor.Sensor | |
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | |
getRobotModel(self) | qibullet.robot_module.RobotModule | |
getValue(self) | qibullet.fsr.Fsr | |
isAlive(self) | qibullet.robot_module.RobotModule | |
module_process (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
physics_client (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
setFrequency(self, frequency) | qibullet.sensor.Sensor | |
subscribe(self) | qibullet.sensor.Sensor | |
unsubscribe(self) | qibullet.sensor.Sensor |
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
+Public Member Functions | |
def | __init__ (self, robot_model, fsr_link, physicsClientId=0) |
def | getValue (self) |
Public Member Functions inherited from qibullet.sensor.Sensor | |
def | __init__ (self, robot_model, physics_client) |
def | subscribe (self) |
def | unsubscribe (self) |
def | getFrequency (self) |
def | setFrequency (self, frequency) |
Public Member Functions inherited from qibullet.robot_module.RobotModule | |
def | __init__ (self, robot_model, physics_client) |
def | getRobotModel (self) |
def | getPhysicsClientId (self) |
def | isAlive (self) |
+Public Attributes | |
+ | fsr_link |
Public Attributes inherited from qibullet.sensor.Sensor | |
+ | frequency |
Public Attributes inherited from qibullet.robot_module.RobotModule | |
+ | robot_model |
+ | physics_client |
+ | module_process |
Class representing a virtual Force Sensitive Resistor (FSR) +
def qibullet.fsr.Fsr.__init__ | +( | ++ | self, | +
+ | + | + | robot_model, | +
+ | + | + | fsr_link, | +
+ | + | + | physicsClientId = 0 |
+
+ | ) | ++ |
Constructor + +Parameters: + robot_model - The pybullet model of the robot + fsr_link - The Link object corresponding to the link the FSR is + attached to + physicsClientId - The id of the simulated instance in the + corresponding robot exists ++
def qibullet.fsr.Fsr.getValue | +( | ++ | self | ) | ++ |
Returns the weight detected on the Z axis of the sensor. The return +value is given in kg (computed from the measured force on the Z axis +and the gravity of the simulation) + +WARNING: The returned value is an approximation. Good practice: instead +of the value itself, take into account the variation of the value, in +order to detect any change at foot contact level. ++
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
This is the complete list of members for qibullet.fsr.FsrHandler, including all inherited members.
+__init__(self, fsr_dict) | qibullet.fsr.FsrHandler | |
fsr_dict (defined in qibullet.fsr.FsrHandler) | qibullet.fsr.FsrHandler | |
getTotalValue(self, fsr_names) | qibullet.fsr.FsrHandler | |
getValue(self, fsr_name) | qibullet.fsr.FsrHandler | |
getValues(self, fsr_names) | qibullet.fsr.FsrHandler |
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
+Public Member Functions | |
def | __init__ (self, fsr_dict) |
def | getValue (self, fsr_name) |
def | getValues (self, fsr_names) |
def | getTotalValue (self, fsr_names) |
+Public Attributes | |
+ | fsr_dict |
Class defining a tool to handle multiple FSRs on the feet of a bipedal +robot +
def qibullet.fsr.FsrHandler.__init__ | +( | ++ | self, | +
+ | + | + | fsr_dict | +
+ | ) | ++ |
Constructor. The fsr sensors are passed to the handler through the +fsr_dict , with the following structure: + +{'fsr_name': Fsr, ...} + +fsr_name being the name of the fsr (string, for instance +NaoFsr.LFOOT_FL or "LFsrFL_frame"), and Fsr being the associated object + +Parameters: + fsr_dict - Dict containing the FSRs of the robot ++
def qibullet.fsr.FsrHandler.getTotalValue | +( | ++ | self, | +
+ | + | + | fsr_names | +
+ | ) | ++ |
Returns the total weight value (the sum of all FSRs corresponding to +the names passed to the method). If no names are specified, the method +will return 0.0 + +Parameters: + fsr_names - List containing the FSR names (for instance + NaoFsr.LFOOT) + +Returns: + total_weight - The sum of all values for the corresponding FSRs ++
def qibullet.fsr.FsrHandler.getValue | +( | ++ | self, | +
+ | + | + | fsr_name | +
+ | ) | ++ |
Returns the weight detected on the Z axis of the specified FSR. The +return value is given in kg (computed from the measured force on the Z +axis and the gravity of the simulation). If the required fsr does not +exist, the method will raise a pybullet error + +WARNING: The returned value is an approximation. Good practice: instead +of the value itself, take into account the variation of the value, in +order to detect any change at foot contact level. + +Parameters: + fsr_name - The name of the FSR, as a string (for instance + NaoFsr.LFOOT_FL or "LFsrFL_frame") + +Returns: + fsr_value - The measured value ++
def qibullet.fsr.FsrHandler.getValues | +( | ++ | self, | +
+ | + | + | fsr_names | +
+ | ) | ++ |
Returns all of the FSR weight values for the FSRs corresponding to the +passed names. If the list of passed names is empty, the method will +return an empty list + +Parameters: + fsr_names - List containing the FSR names (for instance + NaoFsr.LFOOT) + +Returns: + fsr_values - The measured values for the corresponding FSRs, as a + List ++
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
This is the complete list of members for qibullet.fsr.NaoFsr, including all inherited members.
+LFOOT (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
LFOOT_FL (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
LFOOT_FR (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
LFOOT_RL (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
LFOOT_RR (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
RFOOT (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
RFOOT_FL (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
RFOOT_FR (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
RFOOT_RL (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
RFOOT_RR (defined in qibullet.fsr.NaoFsr) | qibullet.fsr.NaoFsr | static |
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
Enum for NAO fsrs +
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
This is the complete list of members for qibullet.helpers.GravityHelper, including all inherited members.
+getGravity(cls, physics_client) | qibullet.helpers.GravityHelper | |
GRAVITY_DICT (defined in qibullet.helpers.GravityHelper) | qibullet.helpers.GravityHelper | static |
removeGravity(cls, physics_client) | qibullet.helpers.GravityHelper | |
updateGravity(cls, physics_client, gravity) | qibullet.helpers.GravityHelper |
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
+Public Member Functions | |
def | getGravity (cls, physics_client) |
def | updateGravity (cls, physics_client, gravity) |
def | removeGravity (cls, physics_client) |
+Static Public Attributes | |
+ | GRAVITY_DICT = dict() |
INTERNAL CLASS, Only the qibullet API should use it. To update the gravity, +SimulationManager objects should be used +
def qibullet.helpers.GravityHelper.getGravity | +( | ++ | cls, | +
+ | + | + | physics_client | +
+ | ) | ++ |
INTERNAL METHOD, static getter for the gravity. This method should only +be used by other components of the qiBullet API (the sensors for +instance). If the required simulated instance doesn't exist, the method +will return None + +Parameters: + physics_client - The id of the desired simulated instance + +Returns: + gravity - The gravity vector as a List of 3 floats ++
def qibullet.helpers.GravityHelper.removeGravity | +( | ++ | cls, | +
+ | + | + | physics_client | +
+ | ) | ++ |
INTERNAL METHOD, Removes a gravity value from the gravity dict. To be +called when the simulated instance is killed. If the required simulated +instance does not exist, the method won't do anything + +Parameters: + physics_client - The id of the simulated instance being removed ++
def qibullet.helpers.GravityHelper.updateGravity | +( | ++ | cls, | +
+ | + | + | physics_client, | +
+ | + | + | gravity | +
+ | ) | ++ |
INTERNAL METHOD, Updates (or add) a gravity value in the gravity dict + +Parameters: + physics_client - The id of the simulated instance in which the + gravity is updated + gravity - The gravity vector update (List of 3 floats) ++
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
This is the complete list of members for qibullet.imu.Imu, including all inherited members.
+
+ qiBullet
+ 1.4.3
+
+ Bullet-based python simulation for SoftBank Robotics' robots.
+ |
+
+Public Member Functions | |
def | __init__ (self, robot_model, imu_link, frequency, physicsClientId=0) |
def | subscribe (self) |
def | unsubscribe (self) |
def | getGyroscopeValues (self) |
def | getAccelerometerValues (self) |
def | getValues (self) |
Public Member Functions inherited from qibullet.sensor.Sensor | |
def | __init__ (self, robot_model, physics_client) |
def | subscribe (self) |
def | unsubscribe (self) |
def | getFrequency (self) |
def | setFrequency (self, frequency) |
Public Member Functions inherited from qibullet.robot_module.RobotModule | |
def | __init__ (self, robot_model, physics_client) |
def | getRobotModel (self) |
def | getPhysicsClientId (self) |
def | isAlive (self) |
+Public Attributes | |
+ | imu_link |
+ | angular_velocity |
+ | linear_acceleration |
+ | values_lock |
+ | module_process |
Public Attributes inherited from qibullet.sensor.Sensor | |
+ | frequency |
Public Attributes inherited from qibullet.robot_module.RobotModule | |
+ | robot_model |
+ | physics_client |
+ | module_process |
Class representing a virtual inertial unit +
def qibullet.imu.Imu.__init__ | +( | ++ | self, | +
+ | + | + | robot_model, | +
+ | + | + | imu_link, | +
+ | + | + | frequency, | +
+ | + | + | physicsClientId = 0 |
+
+ | ) | ++ |
Constructor. If the specified frequency is not a strictly positive int +or float, the constructor will raise a pybullet error + +Parameters: + robot_model - The pybullet model of the robot + imu_link - The Link object corresponding to the link the IMU is + attached to + frequency - The frequency of the IMU, in Hz + physicsClientId - The id of the simulated instance in which the + IMU should be spawned ++
def qibullet.imu.Imu.getAccelerometerValues | +( | ++ | self | ) | ++ |
Returns the linear acceleration of the IMU in m/s^2 in the +world frame + +Returns: + linear_acceleration - The linear acceleration in m/s^2 ++
def qibullet.imu.Imu.getGyroscopeValues | +( | ++ | self | ) | ++ |
Returns the angular velocity of the IMU in rad/s in the +world frame + +Returns: + angular_velocity - The angular velocity in rad/s ++
def qibullet.imu.Imu.getValues | +( | ++ | self | ) | ++ |
Returns the values of the gyroscope and the accelerometer of the IMU +(angular_velocity, linear_acceleration) in the world frame + +Returns: + angular_velocity - The angular velocity values in rad/s + linear_acceleration - The linear acceleration values in m/s^2 ++
def qibullet.imu.Imu.subscribe | +( | ++ | self | ) | ++ |
Subscribe to the IMU, activating the IMU scan process ++
def qibullet.imu.Imu.unsubscribe | +( | ++ | self | ) | ++ |
Unsubscribe from the IMU, deactivating the IMU scan process ++
This is the complete list of members for qibullet.laser.Laser, including all inherited members.
Public Member Functions | |
def | __init__ (self, robot_model, laser_id, physicsClientId=0, display=False) |
def | isActive (self) |
def | __init__ (self, robot_model, laser_id, frequency=DEFAULT_FREQUENCY, display=False, physicsClientId=0) |
def | subscribe (self) |
def | unsubscribe (self) |
Public Member Functions inherited from qibullet.sensor.Sensor | |
def | __init__ (self, robot_model, physics_client) |
def | subscribe (self) |
def | unsubscribe (self) |
def | getFrequency (self) |
def | setFrequency (self, frequency) |
Public Member Functions inherited from qibullet.robot_module.RobotModule | |
def | __init__ (self, robot_model, physics_client) |
def | getPhysicsClientId (self) |
def | isAlive (self) |
Public Attributes |
def qibullet.robot_module.RobotModule.isAlive | +( | ++ | self | ) | ++ |
Check the activity status of the module_process thread + +Returns: + boolean - True if the process is still alive, false otherwise ++
def qibullet.robot_virtual.RobotVirtual.getCameraFps | +( | ++ | self, | +
+ | + | + | handle | +
+ | ) | ++ |
Returns the framerate of the camera associated to the specified handle. +Be advised that the subscribeCamera method needs to be called +beforehand, otherwise a pybullet error will be raised. + +Parameters: + handle - the handle retrieved when subscribing to the camera + +Returns: + fps - The framerate of the camera (frequency of the camera in Hz) ++
def qibullet.robot_virtual.RobotVirtual.getFsrHandler | +( | ++ | self | ) | ++ |
Returns the FSR handler of the robot, as a FsrHandler object. If the +robot doesn't have a FSR handler, the method will return None + +Returns: + fsr_handler - The FSR handler of the robot as a FsrHandler object, + None if the robot doesn't possess a FSR handler ++
def qibullet.robot_virtual.RobotVirtual.getFsrValue | +( | ++ | self, | +
+ | + | + | fsr_name | +
+ | ) | ++ |
Returns the weight detected on the Z axis of the specified FSR. The +return value is given in kg (computed from the measured force on the Z +axis and the gravity of the simulation). If the required fsr does not +exist, or if no FSR handler has been defined for the robot, the method +will raise a pybullet error + +WARNING: The returned value is an approximation. Good practice: instead +of the value itself, take into account the variation of the value, in +order to detect any change at foot contact level. + +Parameters: + fsr_name - The name of the FSR, as a string (for instance + NaoFsr.LFOOT_FL or "LFsrFL_frame") + +Returns: + fsr_value - The measured value ++
def qibullet.robot_virtual.RobotVirtual.getFsrValues | +( | ++ | self, | +
+ | + | + | fsr_names | +
+ | ) | ++ |
Returns all of the FSR weight values for the FSRs corresponding to the +passed names. If the list of passed names is empty, the method will +return an empty list. If one of the required FSR does not exist, or if +no FSR handler has been defined for the robot, the method will raise a +pybullet error + +Parameters: + fsr_names - List containing the FSR names (for instance + NaoFsr.LFOOT) + +Returns: + fsr_values - The measured values for the corresponding FSRs, as a + List ++
def qibullet.robot_virtual.RobotVirtual.getImu | +( | ++ | self | ) | ++ |
Returns the IMU of the robot, as an Imu object. If the robot doesn't +have an inertial unit, the method will return None + +Returns: + imu - The IMU of the robot as an Imu object, None if the robot + doesn't possess an IMU ++
def qibullet.robot_virtual.RobotVirtual.getImuAccelerometerValues | +( | ++ | self | ) | ++ |
Returns the linear acceleration of the IMU in m/s^2 in the world frame. +If the robot doesn't have an inertial unit, the method will raise a +pybullet error. + +One should subscribe to the IMU before calling this method (otherwise, +the acceleration will constantly be [0, 0, 0]) + +Returns: + linear_acceleration - The linear acceleration in m/s^2 ++
def qibullet.robot_virtual.RobotVirtual.getImuGyroscopeValues | +( | ++ | self | ) | ++ |
Returns the angular velocity of the IMU in rad/s in the world frame. If +the robot doesn't have an inertial unit, the method will raise a +pybullet error. + +One should subscribe to the IMU before calling this method (otherwise, +the speed will constantly be [0, 0, 0]) + +Returns: + angular_velocity - The angular velocity in rad/s ++
def qibullet.robot_virtual.RobotVirtual.getImuValues | +( | ++ | self | ) | ++ |
Returns the values of the gyroscope and the accelerometer of the IMU +(angular_velocity, linear_acceleration) in the world frame. If the +robot doesn't have an inertial unit, the method will raise a pybullet +error. + +One should subscribe to the IMU before calling this method (otherwise, +the acceleration and speed will constantly be [0, 0, 0], [0, 0, 0]) + +Returns: + angular_velocity - The angular velocity values in rad/s + linear_acceleration - The linear acceleration values in m/s^2 ++
def qibullet.robot_virtual.RobotVirtual.getTotalFsrValues | +( | ++ | self, | +
+ | + | + | fsr_names | +
+ | ) | ++ |
Returns the total weight value (the sum of all FSRs corresponding to +the names passed to the method). If no names are specified, the method +will return 0.0. If one of the required FSR does not exist, or if +no FSR handler has been defined for the robot, the method will raise a +pybullet error + +Parameters: + fsr_names - List containing the FSR names (for instance + NaoFsr.LFOOT) + +Returns: + total_weight - The sum of all values for the corresponding FSRs ++
- | resolution = Camera.K_QVGA |
+ resolution = Camera.K_QVGA , |
+
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ | + | + | fps = 30.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@@ -753,12 +1059,51 @@ |
def qibullet.robot_virtual.RobotVirtual.subscribeImu | +( | ++ | self, | +
+ | + | + | frequency = None |
+
+ | ) | ++ |
Subscribe to the Inertial Unit of the robot. If the robot doesn't have +an inertial unit, the method will raise a pybullet error. + +This method starts the background process collecting the Imu data, and +should be called before trying to access to the Imu data + +Parameters: + frequency - The desired frequency for the IMU, in Hz. If the + variable is not specified, the frequency value used when creating + the Imu object will be used. The value should be specified as an + int or a float ++
def qibullet.robot_virtual.RobotVirtual.unsubscribeImu | +( | ++ | self | ) | ++ |
Unsubscribe from the Inertial Unit of the robot. If the robot doesn't +have an inertial unit, the method will raise a pybullet error. + +This method stops the background process collecting the Imu data, and +should be called when the Imu data are not useful anymore ++
This is the complete list of members for qibullet.sensor.Sensor, including all inherited members.
__init__(self, robot_model, physics_client) | qibullet.sensor.Sensor | |
frequency (defined in qibullet.sensor.Sensor) | qibullet.sensor.Sensor | |
getFrequency(self) | qibullet.sensor.Sensor | |
getPhysicsClientId(self) | qibullet.robot_module.RobotModule | |
getRobotModel(self) | qibullet.robot_module.RobotModule | |
module_process (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
physics_client (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
isAlive(self) | qibullet.robot_module.RobotModule | |
module_process (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
physics_client (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
robot_model (defined in qibullet.robot_module.RobotModule) | qibullet.robot_module.RobotModule | |
setFrequency(self, frequency) | qibullet.sensor.Sensor | |
subscribe(self) | qibullet.sensor.Sensor | |
unsubscribe(self) | qibullet.sensor.Sensor |
-Additional Inherited Members | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+Public Attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ | frequency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Attributes inherited from qibullet.robot_module.RobotModule | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
robot_model |
def qibullet.sensor.Sensor.getFrequency | +( | ++ | self | ) | ++ |
Returns the frequency of the sensor + +Returns: + frequency - The frequency in Hz (or None if the frequency is not + defined) ++
def qibullet.sensor.Sensor.setFrequency | +( | ++ | self, | +
+ | + | + | frequency | +
+ | ) | ++ |
Sets the frequency of the sensor. The expected value should be strictly +positive int or float, otherwise the method will raise a pybullet error + +Parameters: + frequency - The frequency of the sensor in Hz ++
def qibullet.sensor.Sensor.subscribe | +( | ++ | self | ) | ++ |
ABSTRACT METHOD, Has to be redefined in the daughter classes if the +sensor uses a subscribing system ++
def qibullet.sensor.Sensor.unsubscribe | +( | ++ | self | ) | ++ |
ABSTRACT METHOD, Has to be redefined in the daughter classes if the +sensor uses a subscribing system
This is the complete list of members for qibullet.simulation_manager.SimulationManager, including all inherited members.
__init__(self) | qibullet.simulation_manager.SimulationManager | |
launchSimulation(self, gui=True, use_shared_memory=False) | qibullet.simulation_manager.SimulationManager | |
removeNao(self, nao_virtual) | qibullet.simulation_manager.SimulationManager | |
removePepper(self, pepper_virtual) | qibullet.simulation_manager.SimulationManager | |
removeRomeo(self, romeo_virtual) | qibullet.simulation_manager.SimulationManager | |
resetSimulation(self, physics_client) | qibullet.simulation_manager.SimulationManager | |
getGravity(self, physics_client) | qibullet.simulation_manager.SimulationManager | |
launchSimulation(self, gui=True, use_shared_memory=False, auto_step=True) | qibullet.simulation_manager.SimulationManager | |
removeNao(self, nao_virtual) | qibullet.simulation_manager.SimulationManager | |
removePepper(self, pepper_virtual) | qibullet.simulation_manager.SimulationManager | |
removeRomeo(self, romeo_virtual) | qibullet.simulation_manager.SimulationManager | |
resetSimulation(self, physics_client) | qibullet.simulation_manager.SimulationManager | |
setGravity(self, physics_client, gravity) | qibullet.simulation_manager.SimulationManager | |
setLightPosition(self, physics_client, light_position) | qibullet.simulation_manager.SimulationManager | |
spawnNao(self, physics_client, translation=[0, quaternion=[0, spawn_ground_plane=False) | qibullet.simulation_manager.SimulationManager | |
spawnPepper(self, physics_client, translation=[0, quaternion=[0, spawn_ground_plane=False) | qibullet.simulation_manager.SimulationManager | |
spawnRomeo(self, physics_client, translation=[0, quaternion=[0, spawn_ground_plane=False) | qibullet.simulation_manager.SimulationManager | |
stopSimulation(self, physics_client) | qibullet.simulation_manager.SimulationManager | |
stepSimulation(self, physics_client) | qibullet.simulation_manager.SimulationManager | |
stopSimulation(self, physics_client) | qibullet.simulation_manager.SimulationManager |
def qibullet.simulation_manager.SimulationManager.getGravity | +( | ++ | self, | +
+ | + | + | physics_client | +
+ | ) | ++ |
Gets the gravity of a simulated instance. If the specified simulated +instance doesn't exist, the method will return None + +Parameters: + physics_client - The id of the required simulated instance ++
- | use_shared_memory = False |
+ use_shared_memory = False , |
+
+ ||||||||||||||
+ | + | + | auto_step = True |
|||||||||||||
@@ -184,6 +227,10 @@ |
def qibullet.simulation_manager.SimulationManager.setGravity | +( | ++ | self, | +
+ | + | + | physics_client, | +
+ | + | + | gravity | +
+ | ) | ++ |
Sets the gravity for a simulated instance. By default (when spawning a +simulated instance) the gravity is set to [0.0, 0.0, -9.81] + +Parameters: + physics_client - The id of the simulated instance in which the + gravity is to be updated + gravity - The new gravity vector, as a List of 3 floats (in m/s^2) ++
Set the position of the GUI's light (does not work in DIRECT mode) +Sets the position of the GUI's light (does not work in DIRECT mode) Parameters: light_position - List containing the 3D positions [x, y, z] along @@ -521,6 +607,36 @@Member Function Documentation
def qibullet.simulation_manager.SimulationManager.stepSimulation | +( | ++ | self, | +
+ | + | + | physics_client | +
+ | ) | ++ |
Steps the simulated instance corresponding to the physics_client id + +Parameters: + physics_client - The id of the simulated instance to be stepped ++
Cqibullet.camera.CameraResolution | |
Cqibullet.joint.Joint | |
Cqibullet.link.Link | |
▼Cqibullet.robot_module.RobotModule | |
▼Cqibullet.controller.Controller | |
▼Cqibullet.base_controller.BaseController | |
Cqibullet.base_controller.PepperBaseController | |
▼Cqibullet.sensor.Sensor | |
▼Cqibullet.camera.Camera | |
Cqibullet.camera.CameraDepth | |
Cqibullet.camera.CameraRgb | |
Cqibullet.laser.Laser | |
▼Cqibullet.robot_posture.RobotPosture | |
Cqibullet.robot_posture.NaoPosture | |
Cqibullet.robot_posture.PepperPosture | |
Cqibullet.robot_posture.RomeoPosture | |
▼Cqibullet.robot_virtual.RobotVirtual | |
Cqibullet.nao_virtual.NaoVirtual | |
Cqibullet.pepper_virtual.PepperVirtual | |
Cqibullet.romeo_virtual.RomeoVirtual | |
▼Cqibullet.ros_wrapper.RosWrapper | |
Cqibullet.ros_wrapper.NaoRosWrapper | |
Cqibullet.ros_wrapper.PepperRosWrapper | |
Cqibullet.ros_wrapper.RomeoRosWrapper | |
Cqibullet.simulation_manager.SimulationManager | |
Cqibullet.fsr.FsrHandler | |
Cqibullet.helpers.GravityHelper | |
Cqibullet.joint.Joint | |
Cqibullet.link.Link | |
Cqibullet.fsr.NaoFsr | |
▼Cqibullet.robot_module.RobotModule | |
▼Cqibullet.controller.Controller | |
▼Cqibullet.base_controller.BaseController | |
Cqibullet.base_controller.PepperBaseController | |
▼Cqibullet.sensor.Sensor | |
▼Cqibullet.camera.Camera | |
Cqibullet.camera.CameraDepth | |
Cqibullet.camera.CameraRgb | |
Cqibullet.fsr.Fsr | |
Cqibullet.imu.Imu | |
Cqibullet.laser.Laser | |
▼Cqibullet.robot_posture.RobotPosture | |
Cqibullet.robot_posture.NaoPosture | |
Cqibullet.robot_posture.PepperPosture | |
Cqibullet.robot_posture.RomeoPosture | |
▼Cqibullet.robot_virtual.RobotVirtual | |
Cqibullet.nao_virtual.NaoVirtual | |
Cqibullet.pepper_virtual.PepperVirtual | |
Cqibullet.romeo_virtual.RomeoVirtual | |
▼Cqibullet.ros_wrapper.RosWrapper | |
Cqibullet.ros_wrapper.NaoRosWrapper | |
Cqibullet.ros_wrapper.PepperRosWrapper | |
Cqibullet.ros_wrapper.RomeoRosWrapper | |
Cqibullet.simulation_manager.SimulationManager |