Closed hisham246 closed 3 years ago
Hi, you need a blocking call at the end of your script. With your current script, you launch the simulation, spawn a robot, and reach the end of your script (kill the simulation). You could for instance add
# Python 3
input("Press enter to stop the simulation")
# Python2
raw_input("Press enter to stop the simulation")
# Always good practice to clean up before killing the simulation
simulation_manager.stopSimulation(client_id)
I ran the following code to spawn Pepper simulation:
`from qibullet import SimulationManager
if name == "main": simulation_manager = SimulationManager()
but it starts only for a moment then shuts down very fast, and I receive the following in the terminal:
pybullet build time: Dec 23 2020 01:46:51 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 MX150/PCIe/SSE2 GL_VERSION=3.3.0 NVIDIA 455.38 GL_SHADING_LANGUAGE_VERSION=3.30 NVIDIA via Cg compiler pthread_getconcurrency()=0 Version = 3.3.0 NVIDIA 455.38 Vendor = NVIDIA Corporation Renderer = GeForce MX150/PCIe/SSE2 b3Printf: Selected demo: Physics Server startThreads creating 1 threads. starting thread 0 started thread 0 MotionThreadFunc thread started ven = NVIDIA Corporation ven = NVIDIA Corporation 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
How can I fix this?
Operating System: Ubuntu 18.04 GPU: NVIDIA Geforce MX150 (4 GB)