PyBullet GUI problem on Ubuntu 18 with NVIDIA driver
See original GitHub issueDescribe the bug Same as #41. Installation steps are applied properly.
Trying to run fly.py.
stavrako@stavrako:~/gym-pybullet-drones/examples$ python3 fly.py pybullet build time: May 14 2021 14:07:06 [INFO] BaseAviary.init() loaded parameters from the droneβs .urdf: [INFO] m 0.027000, L 0.039700, [INFO] ixx 0.000014, iyy 0.000014, izz 0.000022, [INFO] kf 0.000000, km 0.000000, [INFO] t2w 2.250000, max_speed_kmh 30.000000, [INFO] gnd_eff_coeff 11.368590, prop_radius 0.023135, [INFO] drag_xy_coeff 0.000001, drag_z_coeff 0.000001, [INFO] dw_coeff_1 2267.180000, dw_coeff_2 0.160000, dw_coeff_3 -0.110000 startThreads creating 1 threads. starting thread 0 started thread 0 argc=2 argv[0] = --unused argv[1] = --start_demo_name=Physics Server ExampleBrowserThreadFunc started X11 functions dynamically loaded using dlopen/dlsym OK! X11 functions dynamically loaded using dlopen/dlsym OK! Creating context Created GL 3.3 context Direct GLX rendering context obtained Making context current GL_VENDOR=NVIDIA Corporation GL_RENDERER=GeForce MX110/PCIe/SSE2 GL_VERSION=3.3.0 NVIDIA 460.73.01 GL_SHADING_LANGUAGE_VERSION=3.30 NVIDIA via Cg compiler pthread_getconcurrency()=0 Version = 3.3.0 NVIDIA 460.73.01 Vendor = NVIDIA Corporation Renderer = GeForce MX110/PCIe/SSE2 b3Printf: Selected demo: Physics Server startThreads creating 1 threads. starting thread 0 started thread 0 MotionThreadFunc thread started viewMatrix (-0.8660253882408142, -0.2499999701976776, 0.4330126941204071, 0.0, 0.0, 0.8660253286361694, 0.4999999701976776, 0.0, -0.4999999701976776, 0.4330126643180847, -0.75, 0.0, -0.0, 5.960464477539063e-08, -2.999999761581421, 1.0) projectionMatrix (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0000200271606445, -1.0, 0.0, 0.0, -0.02000020071864128, 0.0) /home/stavrako/.local/lib/python3.6/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32 warnings.warn(colorize(β%s: %sβ%(βWARNβ, msg % args), βyellowβ)) ven = NVIDIA Corporation ven = NVIDIA Corporation
[INFO] BaseAviary.render() βββ it 0005 βββ wall-clock time 1.5s, simulation time 0.0s@240Hz (0.01x) [INFO] BaseAviary.render() βββ drone 0 βββ x +00.00, y +00.00, z +00.10 βββ velocity +00.00, +00.00, +00.00 βββ roll +00.00, pitch -00.00, yaw +00.00 βββ angular velocity +0.0000, +0.0000, +0.0000 βββ [INFO] BaseAviary.render() βββ drone 1 βββ x -00.26, y -00.15, z +00.15 βββ velocity +00.00, +00.00, +00.00 βββ roll -00.00, pitch -00.00, yaw +30.00 βββ angular velocity +0.0000, +0.0000, +0.0000 βββ [INFO] BaseAviary.render() βββ drone 2 βββ x -00.26, y -00.45, z +00.20 βββ velocity +00.00, +00.00, +00.00 βββ roll -00.00, pitch -00.00, yaw +60.00 βββ angular velocity +0.0000, +0.0000, +0.0000 βββ
β¦
numActiveThreads = 0 stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed finished numActiveThreads = 0 btShutDownExampleBrowser stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed
To Reproduce Steps to reproduce the behavior: Running fly.py
Expected behavior 1.
I run a minimal example that has been referred in #41
import pybullet as p
import pybullet_data
from time import sleep
def main():
PYB_CLIENT = p.connect(p.GUI)
p.setGravity(0, 0, -9.8, physicsClientId=PYB_CLIENT)
p.setRealTimeSimulation(0, physicsClientId=PYB_CLIENT)
p.setTimeStep(1/240, physicsClientId=PYB_CLIENT)
p.setAdditionalSearchPath(pybullet_data.getDataPath(), physicsClientId=PYB_CLIENT)
p.loadURDF("plane.urdf", physicsClientId=PYB_CLIENT)
p.loadURDF("duck_vhacd.urdf", [0, 0, 1], physicsClientId=PYB_CLIENT)
for _ in range(240*10):
p.stepSimulation(physicsClientId=PYB_CLIENT)
sleep(1/(240*10))
if __name__ == "__main__":
main()
- βreplace p.connect(p.GUI) with p.connect(p.GUI, options=ββopengl2")" didnβt work as well.
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Software Python 3.6
stavrako@stavrako:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.6.0 NVIDIA 460.73.01
stavrako@stavrako:~$ glxinfo | grep 'version'
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.6.0 NVIDIA 460.73.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 460.73.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 460.73.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
GL_EXT_shader_group_vote, GL_EXT_shader_implicit_conversions,
stavrako@stavrako:~$ nvidia-smi
Tue May 18 19:18:46 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01 Driver Version: 460.73.01 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce MX110 Off | 00000000:01:00.0 Off | N/A |
| N/A 49C P0 N/A / N/A | 136MiB / 2004MiB | 4% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 5480 G /usr/lib/xorg/Xorg 88MiB |
| 0 N/A N/A 5642 G /usr/bin/gnome-shell 44MiB |
+-----------------------------------------------------------------------------+
Additional context I have tried Windows and it works fine there.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
Thanks @stavrako,
Iβd suspect this to be an issue arising directly from PyBullet / OpenGL when using Ubuntu and NVIDIA GPUs. I normally work on macOS (and Iβm glad Windows works fine too) but I will look into this when I can.
Thanks for confirming that @lampidis. If you happen to find a way to replicate the problem in the minimal example, Iβd try to fix it (or at least understand the cause).