Open wsolichin-sees opened 2 years ago
I have got the exact same issue in my CubePilot Orange, have you had any luck ?
Update with the I2C sensor startup issue. For the distance sensors, I have added a _retries = 1;
in line 126 of the ll40ls.cpp
file here: https://github.com/PX4/PX4-Autopilot/blob/release/1.13/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp#L126, and that seems to fix it.
For the IR-Lock, I noticed that providing external power to the IR-Lock, rather than using the Pixhawk flight controller as a power source seems to fix it. I'm guessing the boot sequence has changed between v1.12.1 and v1.13.1. Suspect that in v1.13.1 I2C communications begin prior to power been actually supplied to the sensor. Here is the screenshot of the IR-Lock and LL40LS sensors starting on boot.
Update with the I2C sensor startup issue. For the distance sensors, I have added a
_retries = 1;
in line 126 of thell40ls.cpp
file here: https://github.com/PX4/PX4-Autopilot/blob/release/1.13/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp#L126, and that seems to fix it.For the IR-Lock, I noticed that providing external power to the IR-Lock, rather than using the Pixhawk flight controller as a power source seems to fix it. I'm guessing the boot sequence has changed between v1.12.1 and v1.13.1. Suspect that in v1.13.1 I2C communications begin prior to power been actually supplied to the sensor. Here is the screenshot of the IR-Lock and LL40LS sensors starting on boot.
I faced the same issue and your solution help me a lot. Thank you so mcuh !
Would be awesome if someone took a look at this, quite an annoying bug at the moment for us too!
Describe the bug
I'm currently using PX4 Firmware v1.13.1, tested with different flight controllers (CubePilot CubeOrange and Pixhawk 4). I have set the SENS_EN_LL40LS to I2C and SENS_EN_IRLOCK to Enabled. Both are connected to an I2C splitter to the I2C pin out on CubePilot CubeOrange. However, I cannot see any MAVLink message of DISTANCE_SENSOR or uORB message irlock_report. Further debugging, both the drivers
ll40ls
andirlock
did not start. On PX4 v1.12.1 Firmware, both drivers worked perfectly. I tried to startll40ls
(Distance sensors driver) first, followed byirlock
(IR-Lock drivers), but thell40ls
drivers did not load. To load thell40ls
, I have to startirlock
drivers, followed byll40ls
.To Reproduce
or
ll40ls start -X
will returnno instance started
.Expected behavior
When setting SENS_EN_LL40LS to I2C and SENS_EN_IRLOCK to Enabled, I will be able to see both messages by default, and the drivers start on boot. For reference, PX4 firmware v1.12.1 loads both drivers without issue (Following the old instructions of starting the
irlock
andlanding_target_estimator
module via SD Card: https://docs.px4.io/v1.12/en/advanced_features/precland.html#firmware-configuration, and setting SENS_EN_LL40LS to I2C).Log Files and Screenshots
No flight log is needed to troubleshoot the following setup, here is a screenshot of the modules debugging via MAVLink Console:
Running
dmesg
shows the IR-Lock and Distance sensors did not start as shown.Running
i2cdetect
detects 2 I2C addresses (Distance sensors, with address 0x62 on the second bus, and IST8310 with address 0x0E on the primary bus. This shows the IR-Lock I2C address is not being detected, but somehow we can start the driver.Drone (please complete the following information):
Additional context
Additional tests with connecting only the distance sensors to the Pixhawk 4 flight controller shows there is no
ll40ls
driver, and I can't start the distance sensor.