Quadcopter following the path

Typically: "How do I... ", "How can I... " questions
coppelia
Site Admin
Posts: 10361
Joined: 14 Dec 2012, 00:25

Re: Quadcopter following the path

Post by coppelia »

you need to localize the bottleneck: what takes most time to execute? Is it the rendering, is it a script, or a specific functionality?
You can use sim.getSystemTimeInMs to check for timings between various parts, e.g.:

Code: Select all

local startTime=sim.getSystemTimeInMs(-1)
...
print(string.format("Took %i[ms] to location A",sim.getSystemTimeInMs(startTime)))
...
print(string.format("Took %i[ms] to location B",sim.getSystemTimeInMs(startTime)))
...
etc.
Cheers

ArthurS
Posts: 28
Joined: 25 Jul 2021, 20:00

Re: Quadcopter following the path

Post by ArthurS »

in principle, when I add 5 drones, fps becomes lower than 10 and slows down everything. Apparently drone scripts are superimposed (they are multithreaded) There are no more computational processes on the stage

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

Re: Quadcopter following the path

Post by coppelia »

Yes, but what exactly is taking computation time? The drone itself can probably be simplified to the bare minimum (i.e. no simulation of wind particles, etc.). For that we need to know where the bottleneck is, and what "slow" means for you. How many frames in a second?

Cheers

ArthurS
Posts: 28
Joined: 25 Jul 2021, 20:00

Re: Quadcopter following the path

Post by ArthurS »

I forgot about this nasty shadow and wind simulation)). Removed this and everything works smoothly and clearly d 22-23 fps. Cool!!!
How can you raise fps to 60 for clear video recording?
I have a pretty big project. it will be published in a scientific journal. Now I am suffering with such petty difficulties.

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

Re: Quadcopter following the path

Post by coppelia »

You usually do not need a higher Fps in order to record a smooth video, with correct time. Simply use the video recorder that comes with CoppeliaSim (in the left toolbar). The recorder will (by default) record one frame per simulation step. Those settings can of course be changed.

Cheers

Post Reply