Headless mode on mac

Report crashes, strange behaviour, or apparent bugs
Post Reply
Pierre
Posts: 10
Joined: 24 Nov 2014, 16:46

Headless mode on mac

Post 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?

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

Re: Headless mode on mac

Post 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

Pierre
Posts: 10
Joined: 24 Nov 2014, 16:46

Re: Headless mode on mac

Post 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

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

Re: Headless mode on mac

Post by coppelia »

I will try to send you an improved version for next week sometimes. Can you please send us a short email?

Thanks

Pierre
Posts: 10
Joined: 24 Nov 2014, 16:46

Re: Headless mode on mac

Post by Pierre »

Done! Thanks in advance for your help.

Post Reply