-
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
Support LeddarOne lidar #8409
Support LeddarOne lidar #8409
Conversation
dd7bb45
to
d55f83b
Compare
@zehortigoza Can we add something for this in the docs? Specifically Rangefinders should have an entry explaining what the rangefinder offers and how to enable it. IF this won't be in any configurations and requires specific extra work to get going it might be worth creating a separate page below rangefinders as well (like this one for ulanding). That would cover where/how you add the driver, how you make sure it is started, any additional configuration. Thoughts? |
@hamishwillee Sure I will send a PR adding it to the documentation. I'm enabling it for AeroFC at least but I will also add instructions of how enable it for other boards. |
Thank you very much! |
@zehortigoza Are these default tuning gains? |
@LorenzMeier You mean the tuning parameter in LeddarOne? Yes, I'm using the stock parameters. |
Thanks for the docs @zehortigoza ! I have added a note up the top that this isn't in master yet: https://docs.px4.io/en/sensor/leddar_one.html |
MAIN leddar_one | ||
STACK_MAIN 1200 | ||
COMPILE_FLAGS | ||
-Os |
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.
Optimization level is already set for the build overall.
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.
Ok, I will remove it
The parameter usage is a bit unusual (board specific and placing it within the board support). We'd probably be better off shoving the baudrate setting into the new driver itself. Longer term I want to generalize the serial port setup. #8302 |
That would be nice but it is target for 1.8v right?! Not sure if the merge window for 1.7v is still open for this. |
What is the reason for the large, increasing timeslip in the logs? |
Huum not sure yet but a quick test showed that I have this timeslip with our without this patches. |
d55f83b
to
1cbf0ef
Compare
My only issue with this is putting params in the board support, but I don't have a better suggestion at the moment. |
Ok, how about this. All the other lidar units follow the same pattern of being enabled by a param and then started in rc.sensors. If you did this for the LeddarOne, then in the special aero mavlink handling you could either check the param, or even check if the LeddarOne is actually running. You could then also add the leddar_one module across the board (px4fmu-v3, v4, v4pro, v5, auav-x21, mindpx). |
I upvote #8409 (comment) From a user point of view it would be far more consistent to be able to say that all sensors are enabled by setting a parameter. From a "guidance to developers" point of view it would be great to have a single mandated way to make the integration work (provided that way doesn't badly limit what can be done)
|
@hamishwillee very good points, we can try to address some of them in #8302. For now I'm simply pushing for consistency. |
Jenkins test this please |
Sorry for the delay I was in vacation.
I agree with the idea to add a parameter to start leddar_one driver but the idea to check if a UART lidar parameter was set to not start MAVLink sounds like a bad hack that will break easily. Let me know what you guys think so I can change/fix and rebase this. |
@ChristophTobler Could you chime in here? @zehortigoza It's really hard for me to predict the tradeoffs without testing it - could you do your best guess and rebase the PR? |
printf("distance: %0.3fm\n", (double)report.current_distance); | ||
printf("time: %llu\n", report.timestamp); | ||
|
||
} else { |
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.
There is no way of stopping the driver
I would also push for consistency and add a parameter to enable it |
@zehortigoza Is the Aero in this video using the optical flow app that we did? It holds position nicely 👍! Did you do any other modifications except dampening? |
Okay I will fix and rebase it until monday.
Yes it the aero-optical-flow. |
@zehortigoza Ping - any plan to fix and rebase? |
1cbf0ef
to
41b42e3
Compare
Rebased and fixed following the same approach did to Benewake TFMini. |
41b42e3
to
a73f5ad
Compare
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.
@zehortigoza Thanks! Generally looks good to me. Could you check the comment and fix CI:
leddar_one/leddar_one.cpp:42:24: fatal error: nuttx/arch.h: No such file or directory
} | ||
|
||
void | ||
leddar_one::stop() |
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.
I don't think this is being executed, right?
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.
Fixed
3b84f15
to
0b30917
Compare
@ChristophTobler Fixed almost all CI errors, there is just one now caused by lack of flash memory in px4fmu-v2, should I remove the rangesensor's from px4fmu-v2? |
@zehortigoza Instead of removing all range finders we could add them individually. |
@zehortigoza I wouldn't remove all of them because this might brake some people's setup. Can you add them individually? |
66fd912
to
0f9b03e
Compare
We are running out of flash memory in px4fmu-v2 so removing all the distance sensors from binary and adding then individually. Right now only LeddarOne is not being buid.
0f9b03e
to
30ec4f5
Compare
@ChristophTobler Okay fixed and now all CI tests are passing. |
https://leddartech.com/modules/leddarone/
Here 2 videos showing the performance of this lidar in Aero:
Holding position: https://www.youtube.com/watch?v=p9aTtwIk2-U
Moving: https://www.youtube.com/watch?v=sMrkOJoF-jM
Flight log of the 2 videos: https://logs.px4.io/plot_app?log=78479503-532f-403a-b47b-c474054b746c