voxl2 rangefinder (lw20)
-
Hi,
I need to connect my rangefinder (LW20) to the VOXL2 board using connector J19 (by I2C) to the PX4 flight controller. What configurations should I make in QGroundControl to receive the "Distance Sensor" message in the Mavlink Analyze tab?
Thank you.
-
@relevinsky The driver for that is not currently built into the VOXL2 PX4 firmware. You would need to add that to your build.
-
@Eric-Katzfey
I am wondering if rangefinders can be used for VOXL2.
Specifically, I have LW20/C rangefinder and tried to setup on VOXL2 by referring to https://docs.modalai.com/voxl2-D0015/. But it is not working.One more thing is
voxl-configure-rangefinders
package.
https://gitlab.com/voxl-public/voxl-sdk/services/qrb5165-rangefinder-server
Can you explain what this one is for?
I tried to use it by runningvoxl-configure-rangefinders
, it is not working..
I hope you provide the instruction to install the rangefinder on the VOXL2.Thank you.
-
@voxltester In order to use the LW20 with i2c interface you would need to add that driver to your build (e.g. in
boards/modalai/voxl2-slpi/default.px4board
). And then you would need to start that driver in the startup script (e.g. inboards/modalai/voxl2/target/voxl-px4-start
). -
@voxltester The
voxl-configure-rangefinders
refers to range finders connected to the apps processor outside of px4. If you use that then thevoxl-rangefinder-server
will communicate to px4 with mavlink messages to indicate distance. -
@Eric-Katzfey
Thank you for your quick answer.
Eric, on my VOXL2 flight deck, I cannot findboard
folder...
Please refer to the version info of my VOXL2.voxl2:/$ voxl-version -------------------------------------------------------------------------------- system-image: 1.7.1-M0054-14.1a-perf-nightly-20231025 kernel: #1 SMP PREEMPT Thu Oct 26 03:25:38 UTC 2023 4.19.125 -------------------------------------------------------------------------------- hw platform: M0054 mach.var: 1.0 -------------------------------------------------------------------------------- voxl-suite: 1.1.3-1 -------------------------------------------------------------------------------- Packages: Repo: http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/ Last Updated: 2024-05-07 20:27:28
-
@Eric-Katzfey
One more question,
Is there any other way to use LW20 instead of i2c? -
@voxltester This is what he is referring to as the
boards
folder: https://github.com/modalai/px4-firmware/tree/b5c45bb232afc6a936b8349f4fa0be1efeb17707/boards -
@tom
THank you for the info.
I am using VOXL2 flight deck... I never touched the PX4....What I found just before is
/etc/modalai/voxl-px4.conf
I editedDISTANCE_SENSOR=LIGHTWARE_SF000
, then I was able to see PX4 parameterSENS_EN_SF0X
in QGC. I set it asLW20/c
..But I cannot see the rangefinder data in QGC
MAVLink Inspector
... -
@voxltester Again, LW20 is not in the px4 build. Until you rebuild px4 with that driver you cannot use it within px4. So, you have 2 choices. Rebuild PX4 and try to get LW20 working within PX4 or take a look at the source code for voxl-rangefinder-server and see if you can add support for LW20 into that. It currently supports the vl53l1x rangefinder. Perhaps you can just switch to that rangefinder model? Otherwise the source code it here: https://gitlab.com/voxl-public/voxl-sdk/services/qrb5165-rangefinder-server