lag while logging

Firmware/software/electronics/mechanics
Astrobiologist
Beginner
Posts: 25
Joined: Fri Jan 19, 2018 10:35 pm

Re: lag while logging

Post by Astrobiologist »

If by flow scripts, you mean the example script in the STEM bundle tutorial that demonstrates Motion Commander commands, the yes it works absolutely fine, with no lag.
There is never any lag in the uplink, it is only the downlink that has (massive) lag.

I can not have the client and the example script both running at the same time - is this intentional?

Also, the example script will only work with a 250K data link - is this hardcoded somewhere?
So, for instance, if I experiment with a faster link in the client, say 2M, the example script still attempts to connect at 250K and fails.

I will try to set up everything on my Mac at home later as per your suggestions, but really I need the flow deck libraries as well (are you saying that the equivalent installation commands will work with brew, for everything? Never used it before).

My Ubuntu VMs are set up in VMWare Fusion 10.
I am on my work iMac now. A screenshot of the "virtual" graphics card that my Ubuntu work VM has at its disposal is shown below.
Is this sufficient for instance?
My home Mac might be more of a tiddler though in terms of virtual graphics card! Will check later.
VMWare graphics settings.png
Astrobiologist
Beginner
Posts: 25
Joined: Fri Jan 19, 2018 10:35 pm

Re: lag while logging

Post by Astrobiologist »

I carried out further experiments last night with various Ubuntu 16 virtual machines running on VMWare Fusion 10 to see if I could improve the severe downlink lag I had been experiencing when using the client.

First test:
iMac with four I5 cores.
VM Set up with two of these cores and a 256Mb virtual graphics card. 3Gb of memory allocated to the VM.
Result: No lag at all

Second test:
Mac Book Pro with dual core I7
VM Set up with two of these cores and the same 256Mb virtual graphics card. 3Gb of memory allocated to the VM.
This is the same I7 Mac that had given me severe lag before when running the client in the VM. The difference now is that I changed the VM to having two cores instead of one. This only presumably works because the I7 supports hyperthreading (i.e the VM has two cores allocated but so has MacOS! Usually VMWare Fusion will not run reliably unless there are dedicated cores left over for MacOS itself).
Result: Only a little lag, maybe a couple of seconds at the end of the flight.

So, it appears that the Crazyflie client downlink runs much better on a VM with multiple cores.
Is this as expected?

(I didn't have time to try building the client natively on MacOS using Brew, a project for another day perhaps)


P.S I spotted the setting for the data link speed in the example mc.commander scripts - apologies for having missed this. I can now run scripts at any set data link speed by editing this appropriately.
Post Reply