Using simxCallScriptFunction in headless mode

Typically: "How do I... ", "How can I... " questions
Post Reply
3mayuge3
Posts: 5
Joined: 22 Oct 2018, 08:12

Using simxCallScriptFunction in headless mode

Post by 3mayuge3 » 24 Jan 2019, 04:34

Hello,

I have one question about headless mode. I would like to call my function written in child script when the simulation is headless mode. I using python code (remote API), so it's better to use simxCallScriptFunction. I tried that, but it didn't work well (get return code 8).
In the first place, is it possible to call functions via remote API in headless mode?

Thank you.

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

Re: Using simxCallScriptFunction in headless mode

Post by coppelia » 25 Jan 2019, 11:23

Hello,

that should normally work. Return value 8 means simx_return_remote_error_flag, i.e. an error occured on the server side. Are you sure your scene is correctly loaded? Are you sure your simulation is running (you can't call a child script function if simulation is not running).

Cheers

3mayuge3
Posts: 5
Joined: 22 Oct 2018, 08:12

Re: Using simxCallScriptFunction in headless mode

Post by 3mayuge3 » 27 Jan 2019, 06:05

Thank you for your reply.

Ok, I' ll check simulation and scene again. Thank you for your advice.

Post Reply