How to integrate Lidar?

Post Reply
Posts: 4
Joined: Mon Nov 28, 2016 3:09 pm

How to integrate Lidar?

Post by ocugod09 »


I bought a Garmin Lidar lite v3 but am struggling to integrate it into my MultiWii flight controller (Flip MCW Flight Controller 1.5).
Does anybody have some experience with this and can help me?

Thanks very much in advance!!

Posts: 451
Joined: Mon Aug 17, 2015 5:56 pm

Re: How to integrate Lidar?

Post by Kbev5709 »

You will most likely need to develop your own arduino code to integrate into the MW firmware. As far as I know, no one is doing any development on that particular type of sensor. If you can write functional code and put the pieces together I'm sure others would be glad you did it. I hope you didn't totally waste $149.00 on that unit. Perhaps someone has worked with that here in the forum. Do a search. I'm sorry. I personally suck at writing code. But I do know that if a device is not found somewhere in the firmware (already put there by the developers) then you will have to write some for that device and put it in. Following is the section of code dealing with what sensors are actually supported by MW.

Code: Select all

 /***************************    independent sensors    ********************************/
      /* leave it commented if you already checked a specific board above */
      /* I2C gyroscope */
      //#define WMP
      //#define ITG3050
      //#define ITG3200
      //#define MPU3050
      //#define L3G4200D
      #define MPU6050       //combo + ACC
      //#define LSM330        //combo + ACC
      /* I2C accelerometer */
      //#define MMA7455
      //#define ADXL345
      //#define BMA020
      //#define BMA180
      //#define BMA280
      //#define LIS3LV02
      //#define LSM303DLx_ACC
      //#define MMA8451Q

      /* I2C barometer */
      //#define BMP085
      //#define MS561101BA

      /* I2C magnetometer */
      //#define HMC5843
      #define HMC5883
      //#define AK8975
      //#define MAG3110

      /* Sonar */ // for visualization purpose currently - no control code behind
      //#define SRF02 // use the Devantech SRF i2c sensors
      //#define SRF08
      //#define SRF10
      //#define SRF23

      /* ADC accelerometer */ // for 5DOF from sparkfun, uses analog PIN A1/A2/A3
      //#define ADCACC

      /* enforce your individual sensor orientation - even overrides board specific defaults */
      #define FORCE_ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  = Z;}
      #define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] =-Z;}
      #define FORCE_MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  =-Z;}

      /* Board orientation shift */
      /* If you have frame designed only for + mode and you cannot rotate FC phisycally for flying in X mode (or vice versa)
       * you can use one of of this options for virtual sensors rotation by 45 deegres, then set type of multicopter according to flight mode.
       * Check motors order and directions of motors rotation for matching with new front point!  Uncomment only one option! */
      //#define SENSORS_TILT_45DEG_RIGHT        // rotate the FRONT 45 degres clockwise
      //#define SENSORS_TILT_45DEG_LEFT         // rotate the FRONT 45 degres counterclockwise

As you can most likely see, the only sensors other than your standard ACC, gyro, baro and compass consist of the Devantech SRF i2c sonar sensors and even they are not fully supported. There is nothing in there relating to any kind of Lidar.

/* Sonar */ // for visualization purpose currently - no control code behind
//#define SRF02 // use the Devantech SRF i2c sensors
//#define SRF08
//#define SRF10
//#define SRF23
I know that a lot of independent development has been done on cheaper generic sonar units but I'm not sure how successful they have actually been in merging the sensor with the baro for seamless altitude control.
As far as your lidar sensor goes, right now it is an expensive trinket until you sell it or get some code working to make it function. With your processor in your FC being a 328P I'm not sure it can even be done.

Post Reply