Using Ligar TF-mini S as sensor for indoor positioning on pixhawk with mission planner

Hi! Im trying to use TF-mini S as the main source of altitude data for pixhawk. The rangefinder (sonarrange) shows the values correctly, but altitude always shows unstable values in the range from -2 to 2 - and these values do not coincide at all with the lidar values. I perfomed all the actions from the topic - it didn’t work. Please tell me what can be done with this

Update to ArduCopter 4.3.2 and retest

Updated, rebooted, no result(

Have you followed all the instructions on: Benewake TFmini / TFmini Plus lidar — Copter documentation ?


Yes, according to the documentation, I was able to connect the lidar to SERIAL 4 and was able to get the data (sonarrange). I set the parameters as in the instructions, and after reading this site - http://en.benewake.com/support_article/detail/5e02de3e4d839408076b6232.html
I also set the values of the specified parameters so that the pilot controller understands that the lidar is directed downward and should be used to determine the altitude (instead of GPS and barometer)

however, the altitude values do not match the lidar values and it seems to me that the controller does not use lidar at all to determine the altitude

I tried to use i2c connection instead of SERIAL. through i2c I don’t even get the sonarrange value

In the documentation you posted, it requires loiter mode to work, so I guess with GPS fix not in indoor environment. Here you can see a working TF lidar but in loiter (with gps fix)

Thanks, but I need indoor alg (without GPS and baro). The optical flow sensor works for me according to the description, but I can’t figure out how to make the lidar work for measuring the height in the room, it seems that all the parameters are set, but there is no result. However, for obstacle detection (lidar in horizontal position), I was able to set

If your flight controller has 2MB of Flash memory (or custom FW) and sonar range updates correctly it should work. Indeed, as regards the gps fix, I confused with obstacle avoidance where the gps fix is needed. For the simple altimeter, the ALT HOLD mode is enough. Did you follow this part of the wiki?
I also used an auxiliary switch (RCx option 10)

https://ardupilot.org/copter/docs/terrain-following-manual-modes.html

Yes, I followed
I tried to launch, the drone just flew into the ceiling (when set alt hold mode)

Have you also checked the vibrations of the copter?

Please share parameters or logs(much preferred) for this flight

have you reached the solution as I have the same issue

  1. I am trying to use TFLidar with pixhawk fmu 5 to be as the source for altitude, I removed all usage of altitude from the gps and stopped the barometer. The quadcopter does not also stabilize for altitude and oscillates after a while. I do not see the were is the issue. I tested the distance sensor, position NED local and seems it is good but when flying it seems that something happen (seems still fuse someting, I suspect the GPS). The sensor reads the oscillation but why I do not know. Please help, this is the log https://review.px4.io/plot_app?log=a475911c-5d31-488c-aeba-ecdf4ff0bac6