sensord: beautiful accel and gyro timestamps
- Dominant language
- Python
- Stars
- 63.7k
- Forks
- 11.4k
- Avg merge
- 17h 53m
- Merged PRs (30d)
- 171
Description
Good timestamps is important for these sensors. The best we can do for timestamps is configure the sensor to generate an interrupt once the measurement is done, and the kernel timestamps it as soon as it can.
Currently, the gyro and accelerometer share an interrupt since that's all we routed out on comma three, which means we don't know which measurement the timestamp belongs to. However, the comma 3X has a second interrupt line routed out such that we can split them.
TODOs for this project
* split out the interrupts
* needs to maintain the current comma three shared IRQ path
* log timestamp uncertainty? it'll be different on comma three vs 3X
* physically measure the timestamping lag. how's the system latency?
* write strict tests so this doesn't regress
* make sure this is fixed https://github.com/commaai/openpilot/issues/30070
For great camera timestamps, I had to use `isolcpus`, but hopefully that's not necessary here.
Contributor guide
Assessment
This issue has not been assessed yet.