Page 1 of 1

Headless mode on mac

Posted: 24 Nov 2014, 17:47
by Pierre
Hi everyone,

I'm currently trying to connect to v-rep in headless mode using the python remote API. It's working fine under my ubuntu laptop but it fails (most of the time...) under mac os.

What I'm trying to do basically looks like this:

Code: Select all

cid = vrep.simxStart('127.0.0.1', 19997, True, True, 5000, 5)

while True:
    err = vrep.simxLoadScene(cid, scene_path, True, vrep.simx_opmode_oneshot_wait)
    if err == 0:
        break
The loadscene call always returns 3 (meaning not value and/or timeout) even after a very long time.

Any hints?

Re: Headless mode on mac

Posted: 25 Nov 2014, 00:19
by coppelia
Edit: make sure to first read this topic about headless mode, this thread is old.

Hello Pierre,

could you try if the same code works when not in headless mode? What version of V-REP are you running?
Also, be aware that the path and file system is different on Mac: the V-REP application is located in a bundle (i.e. vrep.app) and you might have to specify the path out of the bundle (the executable that launches V-REP is located inside of the bundle at: vrep.app/Contents/MacOS/vrep. When you do not specify an absolute path to your file, it will search from within the bundle )

Cheers

Re: Headless mode on mac

Posted: 25 Nov 2014, 11:31
by Pierre
Yes, the exact same code is running without problem when not in headless mode.
I'm working with the version V3.1.3 rev. 2b.

Cheers

Re: Headless mode on mac

Posted: 25 Nov 2014, 20:34
by coppelia
I will try to send you an improved version for next week sometimes. Can you please send us a short email?

Thanks

Re: Headless mode on mac

Posted: 26 Nov 2014, 11:00
by Pierre
Done! Thanks in advance for your help.