Hi, I am trying to use 2 lidars with Mavlink protocol now. One is to be used as an anti-collision, the other in the front.
Two LW20 Lidars are installed in the serial port of my MCU,
MCU is connected with FC.
If only one Lidar is equipped, Lidar will come out normally. Rangefinder1 and Sonarrange also work normally in Mission Planner.
However, if you turn on RangeFinder2 after attaching two Lidars, the same value as RangeFinder1 continues to appear. These RangeFinder values come from Lidar1 and Lidar2 alternately.
I want to use RangeFiner1 as Lidar 1 and RangeFinder2 as Lidar2, but I don’t know which part is wrong.
Lidar1(20hz): id=1, type=0, time_boot_ms=0, min_distance=10cm, max_distance=10000, orientation=25, covariance=0
Lidar2(20hz): id=2, type=0, time_boot_ms=0, min_distance=10cm, max_distance=100cm, orientation=0, covariance=0.
Serial2_Protocol: 1 (mavlink1)
rngfnd1_type: 10 (mavlink)
rngfnd1_orient : 25 (Down)
rngfnd2_type: 10 (mavlink)
rngfnd2_orient: 0 (forward)