Page 1 of 1

headless bug ?

Posted: 28 Jun 2020, 08:50
by lyz
Hi coppelia,
Recently, I am using the Headless Mode to load my scene, and I noticed that `sysCall_actuation` functions don't run all the time. Is that the theory? GUI mode is always running.

Re: headless bug ?

Posted: 30 Jun 2020, 13:48
by coppelia
Edit: make sure to first read this topic about headless mode.

Hello Lyz,

no, that is not normal. Can you describe in which situation exactly? Or do you have a minimalistic scene that illustrates this?

Cheers

Re: headless bug ?

Posted: 01 Jul 2020, 09:23
by lyz
Hi coppelia,
This is my test scene. Normally, when I publish the door_switch True topic, the door opens, and then coppeliaSim publish the door_status is true. This is right in the GUI mode, but in Headless mode it doesn't publish the door status. why?

Code: Select all

rostopic pub /door_switch std_msgs/Bool "data: true"

rostopic echo /door_status
test.ttt: https://1drv.ms/u/s!AtF26DukM1J6hAw6r1w ... E?e=kuLAtJ

Re: headless bug ?

Posted: 02 Jul 2020, 14:17
by coppelia
This is because following is causing an error in headless mode:

Code: Select all

        flyModeCameraHandle=sim.getInt32Parameter(sim.intparam_flymode_camera_handle)
i.e. because flymode doesn't make sense in headless mode. Remove that and a few of the lines below, and it should work fine. You can test if in headless mode with:

Code: Select all

sim.getBoolParameter(sim.boolparam_headless)
In Next release (beta is already available here) you can start CoppeliaSim with -vverbosity argument, and with -vscripterrors it will also print script errors to the console, that will be easier to debug. (currently, you can use variable redirectStatusbarMsgToConsoleInHeadlessMode in file system/usrset.txt for that purpose, but better use the new method with the -v option).

oh.. and your main script looks very strange. It still uses the old way of calling sections. Try to stick to the default main script, or at least use the sysCall_init, etc. -type of functions ;)

Cheers

Re: headless bug ?

Posted: 04 Jul 2020, 09:36
by lyz
Hello coppelia,
Many thanks. I comment these statements, then it works. And you've done me a big favor. I've been trying to figure out how to redirect the status log from the GUI to the headless mode terminal to debug programs, but the software has already implemented it.Thank you so much!