Hello!
How can I go about increasing the remote logging frequency (currently limited to 100Hz) ?
I want to gather accelerometer data from the Crazyflie 1.0 at a rate of about 250Hz to 300Hz. No data is going to be sent to the flie during this period, so I think bandwidth should not be an issue.
I had a cursory look at log.c, but didn't find any explicit declaration of the 100Hz limit.
Thanks!
Increasing the logging rate
-
- Beginner
- Posts: 16
- Joined: Sun May 19, 2013 1:51 pm
- Location: Pune, India
Re: Increasing the logging rate
Hi,
The limit is a bit hiden in the protocol: the delay between log values is set in step of 10ms. One quick hack that we already experimented once is to set it to step of 1ms. This can be done by removing the *10 in this line: https://github.com/bitcraze/crazyflie-f ... log.c#L283
Doing that will use a lot of bandwidth if you connect to the normal client but then if you ask for data at 100Hz you will actually get them at 1000Hz (and if you ask for 25Hz you will get 250Hz). If you want to use the client, use the "Log Blocks" tab to stop all log blocks but the one you want to see.
The limit is a bit hiden in the protocol: the delay between log values is set in step of 10ms. One quick hack that we already experimented once is to set it to step of 1ms. This can be done by removing the *10 in this line: https://github.com/bitcraze/crazyflie-f ... log.c#L283
Doing that will use a lot of bandwidth if you connect to the normal client but then if you ask for data at 100Hz you will actually get them at 1000Hz (and if you ask for 25Hz you will get 250Hz). If you want to use the client, use the "Log Blocks" tab to stop all log blocks but the one you want to see.
-
- Beginner
- Posts: 16
- Joined: Sun May 19, 2013 1:51 pm
- Location: Pune, India
Re: Increasing the logging rate
Thanks a lot Arnaud, that worked.
I am using basiclog.py from the examples folder. So, just setting the period_in_ms here https://github.com/bitcraze/crazyflie-c ... log.py#L80 to 20 ms gives me 500Hz.
I am using basiclog.py from the examples folder. So, just setting the period_in_ms here https://github.com/bitcraze/crazyflie-c ... log.py#L80 to 20 ms gives me 500Hz.