how to run coppeliaSim remotely, ssh or xvfb or others
Posted: 03 Feb 2020, 07:22
Hi coppella,
Now, I have a requirement to run the coppeliaSim software on the master computer via remote computer control. But CoppeliaSim headless mode cannot be used through SSH, which shows the following error:
Then I found the old solution viewtopic.php?t=1319 in the forum, so I installed the package XVFB and the libgl1-mesa-dri library, and finally I could open the CoppeliaSim headless mode, but when I published the startSimulation topic, the terminal reported the following error:
Why? Now is there any official way to solve this problem or open coppeliaSim software remotely? I have modified the usrset.txt according to what you said on this link viewtopic.php?f=5&t=1319&hilit=SSH&start=10, but it has no effect. And have you used coppeliaSim in Docker?
Any help would be appreciated! Thanks!
Now, I have a requirement to run the coppeliaSim software on the master computer via remote computer control. But CoppeliaSim headless mode cannot be used through SSH, which shows the following error:
Code: Select all
$ ./coppeliaSim.sh -h ~/CoppeliaSim/water/scenes/test.ttt
Loading the CoppeliaSim library...
Done!
Launching CoppeliaSim...
lib: 1
lic: 1
CoppeliaSim Edu V4.0.0. (rev. 4)
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
./coppeliaSim.sh: line 33: 28730 Aborted (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"
Code: Select all
$ xvfb-run --auto-servernum --server-num=1 -s "-screen 0 640x480x24" ./coppeliaSim.sh
Loading the CoppeliaSim library...
Done!
Launching CoppeliaSim...
lib: 1
lic: 1
CoppeliaSim Edu V4.0.0. (rev. 4)
Using the default Lua library.
Add-on script 'simAddOnScript-addOnScriptDemo.lua' was loaded.
Add-on script 'simAddOnScript-b0RemoteApiServer.lua' was loaded.
Add-on script 'simAddOnScript_PyRep.lua' was loaded.
Simulator launched.
Plugin 'Geometric': loading...
Plugin 'Geometric': load succeeded.
Plugin 'Assimp': loading...
Plugin 'Assimp': warning: replaced variable 'simAssimp'
Plugin 'Assimp': load succeeded.
Plugin 'BlueZero': loading...
Plugin 'BlueZero': warning: replaced variable 'simB0'
Plugin 'BlueZero': load succeeded.
Plugin 'BubbleRob': loading...
Plugin 'BubbleRob': load succeeded.
Plugin 'Bwf': loading...
Plugin 'Bwf': load succeeded.
Plugin 'CodeEditor': loading...
CodeEditor: cannot load in headless mode
Error with plugin 'CodeEditor': load failed (failed initialization).
Plugin 'Collada': loading...
CoppeliaSim runs in headless mode. Cannot start 'Collada' plugin.
Error with plugin 'Collada': load failed (failed initialization).
Plugin 'ConvexDecompose': loading...
Plugin 'ConvexDecompose': load succeeded.
Plugin 'CustomUI': loading...
CustomUI: doesn't work in headless mode
Error with plugin 'CustomUI': load failed (failed initialization).
Plugin 'DynamicsBullet-2-78': loading...
Plugin 'DynamicsBullet-2-78': load succeeded.
Plugin 'DynamicsBullet-2-83': loading...
Plugin 'DynamicsBullet-2-83': load succeeded.
Plugin 'DynamicsNewton': loading...
Plugin 'DynamicsNewton': load succeeded.
Plugin 'DynamicsOde': loading...
Plugin 'DynamicsOde': load succeeded.
Plugin 'DynamicsVortex': loading...
Plugin 'DynamicsVortex': load succeeded.
Plugin 'ExternalRenderer': loading...
Plugin 'ExternalRenderer': load succeeded.
Plugin 'ICP': loading...
Plugin 'ICP': warning: replaced variable 'simICP'
Plugin 'ICP': load succeeded.
Plugin 'Image': loading...
Plugin 'Image': warning: replaced variable 'simIM'
Plugin 'Image': load succeeded.
Plugin 'K3': loading...
Plugin 'K3': load succeeded.
Plugin 'Lic': loading...
Plugin 'Lic': load succeeded.
Plugin 'LuaCommander': loading...
LuaCommander: cannot find the statusbar widget
Error with plugin 'LuaCommander': load failed (failed initialization).
Plugin 'LuaRemoteApiClient': loading...
Plugin 'LuaRemoteApiClient': load succeeded.
Plugin 'Mtb': loading...
Plugin 'Mtb': load succeeded.
Plugin 'OMPL': loading...
Plugin 'OMPL': warning: replaced variable 'simOMPL'
Plugin 'OMPL': load succeeded.
Plugin 'OpenGL3Renderer': loading...
Plugin 'OpenGL3Renderer': load succeeded.
Plugin 'OpenMesh': loading...
Plugin 'OpenMesh': load succeeded.
Plugin 'Qhull': loading...
Plugin 'Qhull': load succeeded.
Plugin 'ROSInterface': loading...
Plugin 'RosInterface': warning: replaced variable 'simROS'
Plugin 'ROSInterface': load succeeded.
Plugin 'RRS1': loading...
Plugin 'RRS1': load succeeded.
Plugin 'ReflexxesTypeII': loading...
Plugin 'ReflexxesTypeII': load succeeded.
Plugin 'RemoteApi': loading...
Starting a remote API server on port 19997
Plugin 'RemoteApi': load succeeded.
Plugin 'SDF': loading...
SDF: doesn't work in headless mode
Error with plugin 'SDF': load failed (failed initialization).
Plugin 'SurfaceReconstruction': loading...
Plugin 'SurfaceReconstruction': warning: replaced variable 'simSurfRec'
Plugin 'SurfaceReconstruction': load succeeded.
Plugin 'Urdf': loading...
CoppeliaSim runs in headless mode. Cannot start 'Urdf' plugin.
Error with plugin 'Urdf': load failed (failed initialization).
Plugin 'Vision': loading...
Plugin 'Vision': load succeeded.
Using the 'Geometric' plugin.
SSL: OpenSSL 1.1.1b 26 Feb 2019
Initializing the Bullet physics engine in plugin 'DynamicsBullet_2_83'...
Engine version: 2.83.7
Plugin version: 11
Initialization successful.
ERROR: Failed creating an offscreen QOpenGLContext. Switching to a hidden QGLWidget.
Error: signal 11:
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_Z11_segHandleri+0x28)[0x7ff3751ea2f8]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7ff3790564b0]
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7ff3790ac746]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_Z15initGl_ifNeededv+0x110)[0x7ff37539e880]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN19COffscreenGlContextC1EiiiP9QGLWidgetii+0x92)[0x7ff3753e94a2]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN20CVisionSensorGlStuffC2EiiibP9QGLWidgetbbii+0x74)[0x7ff3753ea224]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN13CVisionSensor45createGlContextAndFboAndTextureObjectIfNeededEb+0x153)[0x7ff3750b2bc3]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN13CVisionSensor13detectEntity2Eibbbb+0x1c6)[0x7ff3750b2df6]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN13CVisionSensor44detectVisionSensorEntity_executedViaUiThreadEibbbb+0x75)[0x7ff3750b3005]
/home/lyz/CoppeliaSim/src/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/libcoppeliaSim.so(_ZN9CUiThread27__executeCommandViaUiThreadEP16SUIThreadCommandS1_+0x2434)[0x7ff375352924]
QMutex: destroying locked mutex
Any help would be appreciated! Thanks!