Execute V-REP without GUI via ssh

Report crashes, strange behaviour, or apparent bugs
sergi
Posts: 4
Joined: 10 Jan 2014, 17:46

Execute V-REP without GUI via ssh

Postby sergi » 17 Feb 2014, 19:07

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.

coppelia
Site Admin
Posts: 5815
Joined: 14 Dec 2012, 00:25

Re: Execute V-REP without GUI via ssh

Postby coppelia » 18 Feb 2014, 11:25

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

sergi
Posts: 4
Joined: 10 Jan 2014, 17:46

Re: Execute V-REP without GUI via ssh

Postby sergi » 18 Feb 2014, 17:19

Hi,

I understand. Thanks.

Sergi.

rezama
Posts: 14
Joined: 29 Sep 2014, 20:49

Re: Execute V-REP without GUI via ssh

Postby rezama » 09 Oct 2014, 09:17

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

rezama
Posts: 14
Joined: 29 Sep 2014, 20:49

Re: Execute V-REP without GUI via ssh

Postby rezama » 17 Feb 2015, 12:56

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.)

coppelia
Site Admin
Posts: 5815
Joined: 14 Dec 2012, 00:25

Re: Execute V-REP without GUI via ssh

Postby coppelia » 17 Feb 2015, 18:17

Thanks for the info!

Cheers

kleinash
Posts: 111
Joined: 28 Sep 2014, 09:58

Re: Execute V-REP without GUI via ssh

Postby kleinash » 25 Jul 2015, 20:25

rezama wrote:rezama


Upvote @rezama!!

jessica
Posts: 10
Joined: 06 Oct 2015, 16:03

Re: Execute V-REP without GUI via ssh

Postby jessica » 13 Jul 2016, 22:18

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!

rezama
Posts: 14
Joined: 29 Sep 2014, 20:49

Re: Execute V-REP without GUI via ssh

Postby rezama » 14 Jul 2016, 08:36

I'm using:

Code: Select all

VISION_SENSOR = simGetObjectHandle("VisionSensor")
local image_buffer = simGetVisionSensorImage(VISION_SENSOR)

jessica
Posts: 10
Joined: 06 Oct 2015, 16:03

Re: Execute V-REP without GUI via ssh

Postby jessica » 14 Jul 2016, 13:51

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?


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest