-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
sensord: improve sensor frequency stability and timestamp accuracy #33257
sensord: improve sensor frequency stability and timestamp accuracy #33257
Conversation
* Update main_es.ts * Update main_es.ts * Update Spanish Translation [(commaai#32995)](commaai#32995)
…tructor (commaai#33034) * Add CameraConfig struct for initializing CameraState in constructor * Update system/camerad/cameras/camera_qcom2.h --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
… in constructor (commaai#33034)" This reverts commit dc886e1.
Update Python packages and pre-commit hooks Co-authored-by: Vehicle Researcher <user@comma.ai>
* casadi wheel * ci * test 312 * test with new aarch64 build * use release wheels * assert * bool * try this * maybe * work * use final wheel
bump submodules Co-authored-by: Vehicle Researcher <user@comma.ai>
* working * multiprocessing * fix that * print services * all services + fix * less verbose * start readme * segment range * cleanup * update readme + fix bug in 'all' * cleanup + update readme * update readme * cleanup * cleanup * rm frame_iter * cleanup * staticmethod * proc kill * split files * fix range with hevc vids * update reamde + add prompt * readme * readme * readme
…3038) Export fingerprints
* espActive: `IMMEDIATE_DISABLE` -> `SOFT_DISABLE` * only stock long * just soft disable for now --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
…3039) Export fingerprints
275+ cars
…ngs (commaai#33047) fix incompatible lib warning
test stay stopped
* op * change this * juggler * options * fix * submodules * typo * venv * clean + install
fix wayland requestActivate warning in fullscreen mode
* use pull_request_target * env for name
* support rlog.zst * TODO
Reran on the testing closet looking at The service timings for accelerometer and gyroscope are calculated by taking the diff of the Logs are already sorted by |
* rm import linter, we're done! * revert * uv lock * Revert "uv lock" This reverts commit 5e46f48.
* move most of /car * move some car tests move some car tests * fix selfdrive/car/tests * fix selfdrive/controls tests * fix the rest of the selfdrive tests * bump opendbc * fix all tests * few more non-test references * remove opcar and move docs to car fix these debugging scripts fix docs * bump opendbc and panda forgot panda
cleaning up readme Co-authored-by: Sameh <Sameh Mohamed>
* agnos: decompress max_length * flash last chunk after eof * don't decompress more than length * cleanup --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* stash * no other leaks! pm.send grows memory usage by ~20mb but that's it * undo * clean up
* can? * car still makes sense * bump * opendbc * ? * bump * revert
* Update Python packages * fix opendbc --------- Co-authored-by: Vehicle Researcher <user@comma.ai> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
commaai#33252) * encapsulate frequency management * apply reviews * early return, avoiding unnecessary calculations * simplify avg freq calc
…ent (commaai#33268) simplify service handing
@deanlee the timings are the same. Any other reason to merge this? |
Although the test results show no difference, this is still a more robust way to read events. |
c195cc3
to
7ad90f3
Compare
Since I don't have the device with me right now, I need to clarify something: Is the ts in gpioevent_data measured in nanoseconds since boot or nanoseconds since the epoch? We are currently treating it as nanoseconds since the epoch, but it seems that most GPIO returns use nanoseconds since boot. Furthermore, instead of using poll, we might be able to use RateKeep to periodically read eventdata, clear the queue, and then send the sensor data. If this approach works, it could help stabilize the frequency. |
29af572
to
0058ea5
Compare
This PR was closed because of a git history rewrite. |
This PR addresses sensor frequency instability and improves timestamp accuracy by introducing the
get_latest_event_time
function.Key Changes:
get_latest_event_time
continuously reads from the GPIO file descriptor until all available events are retrieved. By clearing the event queue, it prevents poll() from returning immediately in the next loop, avoiding duplicate sensor data reads and ensuring a stable message frequency.read
operations to ensure robustness and stability, preventing interruptions from disrupting the event reading process.