headless mode

Typically: "How do I... ", "How can I... " questions
Post Reply
lyz
Posts: 57
Joined: 07 Mar 2019, 07:34

headless mode

Post by lyz »

Hi everyone,
I need to use vrep headless mode, but the publish frequency of laser in headless mode is only 10Hz, while the same scene can reach 16Hz in GUI mode. Why? Is there any way to increase the frequency?

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

Re: headless mode

Post by coppelia »

Edit: make sure to first read this topic about headless mode, this thread is old.

Hello,

are you publishing the data via ROS? Can you confirm that CoppeliaSim is not running slower in headless mode?

Cheers

lyz
Posts: 57
Joined: 07 Mar 2019, 07:34

Re: headless mode

Post by lyz »

Hi,
Yes, I am publishing sensor data via vrep_ros_interface package. I don't know if it's running slower in headless mode. Is there any way to tell me if it's slowing down in headless mode? I am listening the laser topic in ROS.

Previously, I found that multiple sensors were used in the built scene, and the frequency of ROS messages was obviously insufficient. All the methods you replied to me before were used, but the problem still could not be solved. Now the frequency problem has become a bottleneck for me to use vrep.
Please think again and offer a good solution. Thank you a lot!

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

Re: headless mode

Post by coppelia »

We haven't developed the vrep_ros_interface package, so we can't tell what is going on in there.
Have maybe also a look at the official ROS and ROS2 interfaces.

To check whether things are slower in headless mode, you could print the system time each time you publish some sensor data. Normally CoppeliaSim should publish sensor data at a similar rate.

Then, in order to speed up things with a scene with many sensors, your best option is to explicitely handle your sensors, at a slower rate, and also publish their data at a slower rate. E.g. for a proximity sensor, flag it as explicit handling and call sim.handleProximitySensor upon it, e.g. every other simulation step, instead of every simulation step.

Cheers

Post Reply