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 not functional with Github source code #12508

Open
tomcattiger1230 opened this issue Jul 18, 2019 · 9 comments
Open

LEDDAR_ONE not functional with Github source code #12508

tomcattiger1230 opened this issue Jul 18, 2019 · 9 comments
Assignees
Labels
bug Drivers 🔧 Sensors, Actuators, etc stale

Comments

@tomcattiger1230
Copy link

tomcattiger1230 commented Jul 18, 2019

Describe the bug
With the official firmware, one can correctly operate the Leddar one distance sensor with the right setting of the parameter SENS_LEDDAR1_CFG.

But if I build the firmware with the Github resource and burn the firmware to the same device, there is no distance result with the same setting. In NSH I can see the leddar_one function is started, but there is no reading.

Could anyone provide some suggestion? Thanks

I've checked the function in LeddarOne::collect(), the feedback from reading data from serial port bytes_read is less than 1. At the same time, _file_descriptor is larger than 0.

@julianoes
Copy link
Contributor

@tomcattigerkkk please provide more info about which version you flash and which version you compile yourself and also the command you use to compile the firmware.

@mcsauder
Copy link
Contributor

@tomcattigerkkk and @julianoes , this issue appears after my recent refactor of this driver. When connected to ttyS1 or ttyS2, (telem 1 or telem 2), the driver shows read errors and collect() timeouts. Everything is fine on the default port, ttyS3. I'll work on understanding the breakage and fix it as quickly as I can.

My apologies for the inconvenience. Thank you for reporting the bug @tomcattigerkkk .

Starting LeddarOne Rangefinder on /dev/ttyS1
INFO  [leddar_one] LeddarOne initialized
INFO  [leddar_one] driver started
Starting Main GPS on /dev/ttyS0
Conflicting config for /dev/ttyS1

@tomcattiger1230
Copy link
Author

@tomcattigerkkk please provide more info about which version you flash and which version you compile yourself and also the command you use to compile the firmware.

Thank you for your suggestion.
I use the Pixhawk 2 Cube with the master branch. I've tried v1.9.0 and 1.9.2, both do not work.
I use make px4_fmu-v3_default (upload) to compile and upload the firmware. I've also tried to use QGC to update the compiled firmware. Nothing changes.

@mcsauder
Copy link
Contributor

Hi @tomcattigerkkk , v1.9.0 and v1.9.2 do not contain my recent refactor of the driver, so perhaps I am not encountering your issue exactly. I do not have an fmu-v3 to test with, but I'll continue working with the driver to see what I can learn.

@tomcattiger1230
Copy link
Author

@mcsauder Thanks for your replay.
I have checked with the official firmware (px4 v1.9.2) downloaded automatically from QGC. Compared with the opened code from Github, leddar_one has no function status() in the official firmware. In NSH, I can stop the leddar_one and restart it with leddar_one start /dev/ttyS6, which is the TEL4 of the Pixhawk 2.

@tomcattiger1230
Copy link
Author

@mcsauder
I have just tested with the old version of leddar_one.cpp. It works. So, it is because of the new version of the leddar_one code.

@mcsauder
Copy link
Contributor

Thanks for your update @tomcattigerkkk , I'm working on getting it fixed. I'll update you as I make progress.

@mcsauder
Copy link
Contributor

@tomcattigerkkk , let me know if you can test PR #12508 and if it fixes this issue. Everything is working as it should for me with that PR. I hope it works for you as well and this fixes the breakage I created. My apologies for the delay.

@stale
Copy link

stale bot commented Nov 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Drivers 🔧 Sensors, Actuators, etc stale
Projects
None yet
Development

No branches or pull requests

3 participants