-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Leddar one driver work to fix Issue #12508, simplify logic, improve update rate, and inherit from PX4RangeFinder #12847
Conversation
This PR was flight tested on a 250 quadrotor with pixhawk 4 mini fmu-v5. The system performs as it should. Flight log from the last commit: https://review.px4.io/plot_app?log=65d6eb7e-e676-49cd-8105-c23862aa2fc3 FlightPlot data of the distance sensor measured values during the flight: |
0e7d1ba
to
a624608
Compare
…r distance sensor driver classes and fix perf counter errata.
…espace and console output. Reduce measure/collect timing logic complexity to use ScheduleOnInterval() rather than SchuleDelayed().
…_topic after migrating to PX4RangeFinder.
Rebased against current master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made small comments, looks good overall.
int | ||
LeddarOne::measure() | ||
{ | ||
// Flush the recieve buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Flush the recieve buffer. | |
// Flush the receive buffer. |
Thanks @mcsauder! |
Thanks for your review @julianoes ! |
Describe problem solved by the proposed pull request
This PR fixes issue #12508. This PR also improves the update rate of the sensor from ~8.6Hz to ~9.1Hz and simplifies the timing logic to use
ScheduleOnInterval()
rather thanScheduleDelayed
and timeout logic that exists in v1.19.2 and previous. Lastly, this PR fixes the broken test() method for the driver.Test data / coverage
My recent PR #11858 on the LeddarOne driver broke automatic starting of the driver, (I apologize for causing that breakage and not catching it in bench testing.) I have tested driver start on boot with telem 1,2, and 4 in this PR. The driver functions as expected and as it does in v1.9.2:
Describe possible alternatives
One alternative to this PR would be to revert the driver to its' state in v1.9.2. I am in favor of this PR because it simplifies the driver quite a bit while getting better update rates over v1.9.2.
Additional context
See also #12508. This work also benefits #11977 and migrates the Terraranger driver closer to common base class method structure and functionality.
It is probably best to incorporate these changes or revert the driver to v1.9.2 code prior to v1.10.
@tomcattigerkkk, if you get a chance, could you test this PR? Thank you!
Please let me know if you have any questions or feedback on this PR. Thanks!
-Mark