-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: High-rate IMU sampling #9963
Comments
➤ Daniel Agar commented: Awesome! I didn't know you wanted to push this through, but we might as well do it now. I was thinking of SPI DMA and doing the work in a high priority thread per bus. It also might make sense to split it up a bit. There's a larger driver architecture discussion we need to have, but let me see if I can make some progress on SPI DMA drivers this weekend. |
➤ Daniel Agar commented: Questions * is logging raw feasible under normal operation? Do we need queuing for that uorb message or an or use a single message with an array of values |
➤ Daniel Agar commented: Rebased on master and added a trivial formatting fix. |
➤ Daniel Agar commented: If we only run the attitude control portion with attitude updates (8ca0302), the mc_att_control cpu usage is 17% at 2kHz and |
➤ Andreas Daniel Antener commented: @dagar I see you already added the mc att control update too, cool :). Yeah the load must be somewhere else, I was pretty surprised when I saw 22% for not doing so much.. > is logging raw feasible under normal operation? Do we need queuing for that uorb message or an or use a single message with an array of values It would definitely need some more magic to do this. Currently, for logging 2 IMUs at 2kHz I needed the logger to run at 4kHz, and even with a larger buffer I see periodic drops at the write operation (I think). I'm using the fastest possible SD cards and only logging the IMU data. The logger uses ~20% CPU in that case. At least for VTOL I don't see this happening at the moment with a v2/v3. But as we see there is a lot of cpu power vanishing, so lets have a look how this develops. |
➤ Daniel Agar commented: Awesome! I didn't know you wanted to push this through, but we might as well do it now. I was thinking of SPI DMA and doing the work in a high priority thread per bus. It also might make sense to split it up a bit. There's a larger driver architecture discussion we need to have, but let me see if I can make some progress on SPI DMA drivers this weekend. |
➤ Daniel Agar commented: Rebased on master and added a trivial formatting fix. |
➤ Daniel Agar commented: Questions * is logging raw feasible under normal operation? Do we need queuing for that uorb message or an or use a single message with an array of values |
➤ Andreas Daniel Antener commented: @dagar I see you already added the mc att control update too, cool :). Yeah the load must be somewhere else, I was pretty surprised when I saw 22% for not doing so much.. > is logging raw feasible under normal operation? Do we need queuing for that uorb message or an or use a single message with an array of values It would definitely need some more magic to do this. Currently, for logging 2 IMUs at 2kHz I needed the logger to run at 4kHz, and even with a larger buffer I see periodic drops at the write operation (I think). I'm using the fastest possible SD cards and only logging the IMU data. The logger uses ~20% CPU in that case. At least for VTOL I don't see this happening at the moment with a v2/v3. But as we see there is a lot of cpu power vanishing, so lets have a look how this develops. |
➤ Daniel Agar commented: If we only run the attitude control portion with attitude updates (8ca0302), the mc_att_control cpu usage is 17% at 2kHz and |
Continuing #7446. @dagar @priseborough @jgoppert . I needed a better idea about vibration in a system and this is a good start. This is also one step towards #7446 (comment)
This still suffers from missing DMA/FIFO access. But I was able to log unfiltered data from 2 IMUs at 2kHz, which is already pretty nice. And you can publish gyro control messages at 2kHz as well, but in that case the MC attitude controller uses 22% CPU ;)
This is NOT test flown, I'm really just bench testing at the moment.
Tasks / open questions
Is that going into the right direction?
@dagar you mentioned you could help with DMA?
The text was updated successfully, but these errors were encountered: