What slows V-REP most?

Typically: "How do I... ", "How can I... " questions
Post Reply
RobAtLab
Posts: 92
Joined: 10 Jan 2018, 17:49

What slows V-REP most?

Post by RobAtLab »

I've been trying to work out which features in a scene slow V-REP the most. I wondered if I could have some clarification on which of these things I've noticed typically have the greatest slowing effect when large numbers of robots are operating together in a scene, my study focuses on modular and swarm systems and being able to run simulations quickly to calculate statistics from is going to be important to me later in my course. I'd also hope at some point to make videos from V-REP simulations with the video being made at the real speed the sim would happen at in the real world rather than the speed at which the sim is refreshing on my computer.

1.Random meshes slow things a lot, even when they are not actually bumping into and interacting with anything? They slow things more even than convex hulls of vastly greater polygon counts?
2.Proximity sensors are slow, even using the options to make them faster and less accurate with that tickbox and regardless of whether they are infrared or laser?
3.Vision sensors will always be slow because they require V-REP to render a scene from the vision sensor's view as well as the main camera's?
4.The size and complexity of code in a robot's lua controlelr has little effect on the speed of the sim? Running this is generally a pretty trivial computation compared to doing all the dynamics, collisions, renders, measuremnts and detections in the physical space of the sim?


If you can clarify which of those observations are correct it would help, also knowing work arounds and ways to make super crude equivalents for these things which would still be suitable for fast sims even if they slightly decreased realism would be great. Thanks.

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

Re: What slows V-REP most?

Post by coppelia »

Hello,

1. Make sure to import only small meshes. Otherwise you will slow V-REP down in various ways (rendering, calculation , etc.). A typical robot model should not contain more than a total of 10'000 triangles, otherwise you have done something wrong. You can of course have your robot with 300'000-500'000 triangles, but then you won't be able to efficiently simulate more than one robot. Have a look at the various robot models and how they perform.
2. Proximity sensor are slow only if measuring large meshes. Same goes for minimum distance calculation or collision detection between complex and larges meshes
3. Same here again. Another reason: a vision sensor will render the image and retrieve the RGB data from the GPU to the CPU, in order for further processing and availability. This also represents a bottleneck. Try using vision sensors with a resolution not too high.
4. This depends. But usually the bottlenecks that one can observe are lying in the rendering, calculations, and physics engine.

And you mention an important point: super realism at all cost is not necessarily the best. You can often find faster and more flexible work-arounds, depending on the application.

Cheers

RobAtLab
Posts: 92
Joined: 10 Jan 2018, 17:49

Re: What slows V-REP most?

Post by RobAtLab »

Thanks for those tips,
P.S. any idea about the video rendering thing I mentioned in my post at the start of this topic, is there a way to get videos to be made (however long the making actually takes as depending on the processing power of one's PC) so they play at what would be the real speed?

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

Re: What slows V-REP most?

Post by coppelia »

Yes, you can use the embedded video recorder for this. You will however have to compute yourself the video recorder settings in order to obtain a real-time video.

Cheers

Post Reply