Page 1 of 2
Execute V-REP without GUI via ssh
Posted: 17 Feb 2014, 19:07
by sergi
Hi,
I want to run V-REP on a remote computer via ssh, but I get the following error when I run it there:
$ ./vrep.sh -h
QXcbConnection: Could not connect to display
Aborted (core dumped)
If I connect to the remote computer via ssh -X (X11 server activated) then the application runs, but if the connection with the remote computer dies then the application dies, even if I use "screen". Somehow it seems that even that no GUI is being activated V-REP is using the X11. This is the error that I get when I re-connect using "screen":
The X11 connection broke (error 1). Did the X11 server die?
Thanks in advance,
Sergi.
Re: Execute V-REP without GUI via ssh
Posted: 18 Feb 2014, 11:25
by coppelia
Hello Sergi,
the current headless mode has the exact same dependency libraries as the normal mode (i.e. openGl, Qt Gui, etc.). In future we will prepare a special version that doesn't realy at all on those.
Cheers
Re: Execute V-REP without GUI via ssh
Posted: 18 Feb 2014, 17:19
by sergi
Hi,
I understand. Thanks.
Sergi.
Re: Execute V-REP without GUI via ssh
Posted: 09 Oct 2014, 09:17
by rezama
This issue affects me as well. I work on optimization problems and I would like to run v-rep simulations on remote computers in a cluster.
Are there any plans to make this possible in the near future?
Thanks
Re: Execute V-REP without GUI via ssh
Posted: 17 Feb 2015, 12:56
by rezama
I was able to run v-rep on a remote computer using Xvfb and I thought I'd share the solution with other users who might visit this page.
If the remote server has the xvfb package installed, you can run v-rep over ssh using:
Code: Select all
xvfb-run --auto-servernum --server-num=1 ./vrep.sh -h -s -q myscene.ttt
Another problem I ran into was using vision sensors, which use GPU rendering and therefore need the GLX extension on the X server. Fortunately, if the remote server has the libgl1-mesa-dri package installed, there is a way to get around that as well:
Code: Select all
xvfb-run --auto-servernum --server-num=1 -s "-screen 0 640x480x24" ./vrep.sh -h -s -q myscene.ttt
It would be nice if future versions of v-rep offer better headless support out of the box (not needing an X server or a GPU to be present.)
Re: Execute V-REP without GUI via ssh
Posted: 17 Feb 2015, 18:17
by coppelia
Thanks for the info!
Cheers
Re: Execute V-REP without GUI via ssh
Posted: 25 Jul 2015, 20:25
by kleinash
rezama wrote:rezama
Upvote @rezama!!
Re: Execute V-REP without GUI via ssh
Posted: 13 Jul 2016, 22:18
by jessica
Hey rezama,
I'm trying to run my stuff on the cluster headless using your method, but I only get blank images from the vision sensor topic... Can you tell me how you are publishing the image topics?
This is the part in my childscript where I enable the publisher:
visHandle = simGetObjectHandle('visionSensor')
simExtROS_enablePublisher( 'get_vis_sens', 1, simros_strmcmd_get_vision_sensor_image, visHandle, -1, '')
Thanks in advance!
Re: Execute V-REP without GUI via ssh
Posted: 14 Jul 2016, 08:36
by rezama
I'm using:
Code: Select all
VISION_SENSOR = simGetObjectHandle("VisionSensor")
local image_buffer = simGetVisionSensorImage(VISION_SENSOR)
Re: Execute V-REP without GUI via ssh
Posted: 14 Jul 2016, 13:51
by jessica
Hey,
thank you so much for the reply!
But this is of your child script right? How are you transmitting this image data from Vrep to ROS?