TFmini Lidar from Beneware with Pixhawk Firmware

Hi all,

I found the TF Mini Lidar from Beneware is very useful for my drone,
and I can see that AutoPilot Firmware somehow supports it:

However, I want to stick with the Pixhawk firmware since the module LPE is more convenient for us. Can you give me some instruction to modify the Firmware to use this Lidar.
Thank you.

Adding support is easy. We’re just ordering a few to try them. Thanks!

1 Like

Since the TF mini Lidar has a baud rate at 115200, can it be plugged to the Serial 4 (Frysky port) on PixRacer?
For a quick testing, I modified the code of SF0x_parser.cpp and .h in the driver folder, and change the sf0x.cpp file. In sf0x.cpp, I changed these parameters from:

case 1: /* SF02 (40m, 12 Hz)*/
	_min_distance = 0.3f;
	_max_distance = 40.0f;
	_conversion_interval =	83334;

unsigned speed = B9600;


case 1: /* TFMini (12m, 100 Hz)*/
	_min_distance = 0.3f;
	_max_distance = 12.0f;
	_conversion_interval =	10000;

unsigned speed = B115200;

I got it parser correctly by running the file SF0XTest.cpp. , but when using
sf0x test
from the Mavlink console, I got error in here:

/* do a simple demand read */
sz = read(fd, &report, sizeof(report));

if (sz != sizeof(report)) {
	err(1, "immediate read failed");

My modified code can be found in here. Thank you.

@LorenzMeier so, i see the tfmini now is supported in the master firmware. Thanks for the hard work. But how do i connect it to the Pixracer? If i am not wrong, ttyS6 is the FrSky serial port, which is already used. Thanks.

Very helpful post ! I’ve also seen TFmini works on Ardupilot, Teensy 3.5, pls check below link, hope it’s helpful too.

Manufacturer Benewake has TFmini live video to check the LiDAR performance.