Skip to content
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

Merged
merged 7 commits into from
Sep 6, 2019

Conversation

mcsauder
Copy link
Contributor

@mcsauder mcsauder commented Aug 30, 2019

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 than ScheduleDelayed 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:
image

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

@mcsauder
Copy link
Contributor Author

mcsauder commented Aug 31, 2019

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: image

@mcsauder
Copy link
Contributor Author

mcsauder commented Sep 2, 2019

I have added a commit to this PR that adds functionality to the PX4RangeFinder class and modifies the LeddarOne driver to inherit from it.

Functional bench tests behave as they should:
image

@mcsauder mcsauder changed the title Leddar one driver work to fix Issue #12508, simplify logic, and improve update rate Leddar one driver work to fix Issue #12508, simplify logic, improve update rate, and inherit from PX4RangeFinder Sep 2, 2019
@mcsauder mcsauder force-pushed the leddar_one branch 2 times, most recently from 0e7d1ba to a624608 Compare September 2, 2019 20:09
@mcsauder
Copy link
Contributor Author

mcsauder commented Sep 4, 2019

Rebased against current master.

@julianoes julianoes self-requested a review September 4, 2019 15:18
@julianoes julianoes requested a review from dagar September 4, 2019 15:45
Copy link
Contributor

@julianoes julianoes left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Flush the recieve buffer.
// Flush the receive buffer.

@julianoes
Copy link
Contributor

Thanks @mcsauder!

@julianoes julianoes merged commit e450948 into PX4:master Sep 6, 2019
@mcsauder
Copy link
Contributor Author

mcsauder commented Sep 6, 2019

Thanks for your review @julianoes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants