PX4-Autopilot: SF11/C Laser Altimeter Missing Documentation

Hello, I’m using SF11/C for distance sensor. I tried to connect SF11/C to Pixhawk 2.1 (Cube) by using https://docs.px4.io/en/sensor/sfxx_lidar.html documentation via serial connection. However, I got no data from SF11/C until change Firmware of SF11/C. Addition, there was a no data in QGroundControl Analyze tool. BEFORE CHANGE

SF11/C comes with 115200 baudrate.

DEFAULT SETTINGS

But, src/drivers/distance_sensor/sf0x/sf0x.cpp definition has 9600 baud rate. https://github.com/PX4/Firmware/blob/a08b1682e39c2a63c732f9edc10019d55b269498/src/drivers/distance_sensor/sf0x/sf0x.cpp#L593

I tried to change the line 9600 to 115200 and flashed. But, Pixhawk didn’t boot. So, from SF11/C user manual I connected SF11/C directly to PC via micro-USB cable. Default Menu comes with some default configuration like second image.

I changed baud rate of SF11/C from 115200 to 9600 and tried. But again, there was no data. After that step, I changed serial output mode from “On demand” to “Continuous”. And boom, the data came.

Can we add to https://docs.px4.io/en/sensor/sfxx_lidar.html documentation which may help users who struggling this issue.

Furthermore, I wanted to try with I2C connection. But, I didn’t see any option for I2C in SF11/C menu. I saw the Firmware upgrading from this site https://github.com/LightWare-Optoelectronics/pixhawk-guide.

After Firmware upgrade SF11/C presents I2C option for Pixhawk like below. AFTER UPDATE TERMINAL

I turned on “Pixhawk I2C compatability”. After this step, data came to the Pixhawk. Also, https://github.com/LightWare-Optoelectronics/pixhawk-guide should be add to “LightWare SF1X/SF02/LW20 Lidar” documentation. It may provide more understandable to how connect SF11/C to Pixhawk.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (21 by maintainers)

Most upvoted comments

or for now we could just add a check to change it for SF11/c since it’s the only one we are sure about

@bozkurthan the following branch should fix the startup ordering issue: https://github.com/PX4/Firmware/pull/11724

@bozkurthan It seems that the px4flow driver is started before the sf11 distance sensor. The px4flow is started in rc.sensors while the distance sensor is in rc.serial (which is later in the rcS). I will look at how we can solve this. Regarding the second issue would it be possible to capture the serial console output during bootup? I currently don’t have this sensor to try it.