DJI Mobile SDK Documentation

      class DJILidar

      @interface DJILidar : DJIBaseComponent
      Header:DJILidar.h
      Inherits From:DJIBaseComponent
      Description:

      This class represents the lidar of the aircraft which contanis the related functions of livox. Current only supported by Zenmuse L1. Note: Zenmuse L1 can only be set at Gimbal position 0 where it is at the left side of the aircraft.
      The Zenmuse L1 integrates a Livox Lidar module, a high-accuracy IMU, and a camera with a 1-inch CMOS on a 3-axis stabilized gimbal. When used with Matrice 300 RTK and DJI Terra, the L1 forms a complete solution that gives you real-time 3D data throughout the day, efficiently capturing the details of complex structures and delivering highly accurate reconstructed models.
      This object is available from the DJIAircraft or DJIHandheld object which is a subclass of DJIBaseProduct.

      Class Members:

      State Updates

      delegate
      protocol
      protocol DJILidarDelegate
      @protocol DJILidarDelegate <NSObject>
      Header:DJILidar.h
      Inherits From:NSObject
      Description:

      This protocol provides a delegate method to update the lidar state and receive the lidar data.

      Protocol Methods:

      Protocol Method

      method lidar:didUpdatePointCloudRecordStatus
      @optional
      - (void)lidar:(DJILidar *)lidar didUpdatePointCloudRecordStatus:(DJILidarPointCloudRecordStatus)status
      Header:DJILidar.h
      Description:

      When the point cloud record status is changed, the listener will receive this callback.

      Input Parameters:
      DJILidar * lidarInstance of the lidar for which status will be updated.
      DJILidarPointCloudRecordStatus statusPoint cloud record status
      method lidar:didUpdatePointCloudRecordingTime
      @optional
      - (void)lidar:(DJILidar *)lidar didUpdatePointCloudRecordingTime:(NSUInteger)time
      Header:DJILidar.h
      Description:

      When the point cloud recording time is updated, the listener will receive this callback.

      Input Parameters:
      DJILidar * lidarInstance of the lidar for which status will be updated.
      NSUInteger timePoint cloud recording time.
      Live View Data
      method
      method lidar:didReceiveLiveViewData
      @optional
      - (void)lidar:(DJILidar *)lidar didReceiveLiveViewData:(NSArray <DJILidarPointCloudLiveViewData *> *)pointCloudLiveViewData
      Header:DJILidar.h
      Description:

      Update point cloud live view data.

      Input Parameters:
      DJILidar * lidarInstance of the lidar for which live view data of point could will be updated.
      NSArray <DJILidarPointCloudLiveViewData *> * pointCloudLiveViewDataThe point could live view data
      method addPointCloudStatusListener:withQueue
      - (void)addPointCloudStatusListener:(id<DJILidarDelegate>)listener withQueue:(nullable dispatch_queue_t)queue
      Header:DJILidar.h
      Description:

      Adds the listener for the point cloud status change events.

      Input Parameters:
      id<DJILidarDelegate> listenerPoint cloud status change listener.
      method removePointCloudStatusListener
      - (void)removePointCloudStatusListener:(id<DJILidarDelegate>)listener
      Header:DJILidar.h
      Description:

      Remove the listener for the point cloud status change events.

      Input Parameters:
      id<DJILidarDelegate> listenerPoint cloud status change listener.
      method addPointCloudLiveViewDataListener:withQueue
      - (void)addPointCloudLiveViewDataListener:(id<DJILidarDelegate>_Nonnull)listener withQueue:(nullable dispatch_queue_t)queue
      Header:DJILidar.h
      Description:

      Adds the listener to receive point cloud data.

      Input Parameters:
      id<DJILidarDelegate>_Nonnull listenerPoint cloud data listener.
      method removePointCloudLiveViewDataListener
      - (void)removePointCloudLiveViewDataListener:(id<DJILidarDelegate>_Nonnull)listener
      Header:DJILidar.h
      Description:

      Remove the listener to receive point cloud data.

      Input Parameters:
      id<DJILidarDelegate>_Nonnull listenerPoint cloud data update listener.
      method removeAllPointCloudStatusListener
      - (void)removeAllPointCloudStatusListener
      Header:DJILidar.h
      Description:

      Remove all point cloud status listeners.


      Information

      const DJILidarDisplayNameZenmuseL1
      extern NSString *const DJILidarDisplayNameZenmuseL1
      Header:DJILidarDisplayName.h
      Description:

      The display name for Zenmuse L1.

      property
      property displayName
      @property (nonatomic, readonly) NSString *_Nonnull displayName
      Header:DJILidar.h
      Description:

      String that represents name of the Lidar.


      Point Cloud Operation

      Record Point Cloud
      method
      method pointCloudRecord:withCompletion
      - (void)pointCloudRecord:(DJILidarPointCloudRecord)cmd withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Point cloud record related operations.

      Input Parameters:
      DJILidarPointCloudRecord cmdAn enum value of the DJILidarPointCloudRecord
      DJICompletionBlock completionThe completion block that receives the execution result.
      method startReadPointCloudLiveViewDataWithCompletion
      - (void)startReadPointCloudLiveViewDataWithCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Start to receive the point cloud live view data. Using lidar:didReceiveLiveViewData to receive the data.

      Input Parameters:
      DJICompletionBlock completionThe completion block that receives the execution result.
      method stopReadPointCloudLiveViewDataWithCompletion
      - (void)stopReadPointCloudLiveViewDataWithCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Stop to receive the point cloud live view data.

      Input Parameters:
      DJICompletionBlock completionThe completion block that receives the execution result.


      Point Cloud Setting

      Point Cloud Scan Mode
      method
      method setPointCloudScanMode:withCompletion
      - (void)setPointCloudScanMode:(DJILidarPointCloudScanMode)mode withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Set point cloud scan mode.

      Input Parameters:
      DJILidarPointCloudScanMode modeAn enum value of the DJILidarPointCloudScanMode
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPointCloudScanModeWithCompletion
      - (void)getPointCloudScanModeWithCompletion:(void (^_Nonnull)(DJILidarPointCloudScanMode mode, NSError *_Nullable error))completion
      Header:DJILidar.h
      Description:

      Get point cloud scan mode.

      Input Parameters:
      void (^_Nonnull)(DJILidarPointCloudScanMode mode, NSError *_Nullable error) completionThe completion block that receives the execution result.
      Point Cloud Return Mode
      method
      method setPointCloudReturnMode:withCompletion
      - (void)setPointCloudReturnMode:(DJILidarPointCloudReturnMode)mode withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Set point cloud scan mode.

      Input Parameters:
      DJILidarPointCloudReturnMode modeAn enum value of the DJILidarPointCloudReturnMode
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPointCloudReturnModeWithCompletion
      - (void)getPointCloudReturnModeWithCompletion:(void (^_Nonnull)(DJILidarPointCloudReturnMode mode, NSError *_Nullable error))completion
      Header:DJILidar.h
      Description:

      Get point cloud scan mode.

      Input Parameters:
      void (^_Nonnull)(DJILidarPointCloudReturnMode mode, NSError *_Nullable error) completionThe completion block that receives the execution result.
      Point Cloud High Sensitivity Mode
      method
      method setPointCloudHighSensitivityModeEnabled:withCompletion
      - (void)setPointCloudHighSensitivityModeEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Enables/Disables high sensitivity mode. In severe weather conditions such as rain and fog, high sensitivity mode reduces the probability of false detection of atmospheric particles.

      Input Parameters:
      SOURCE_DIFFERENT modeAn enum value of the DJILidarPointCloudReturnMode
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPointCloudHighSensitivityModeEnabledWithCompletion
      - (void)getPointCloudHighSensitivityModeEnabledWithCompletion:(void (^_Nonnull)(BOOL enabled, NSError *_Nullable error))completion
      Header:DJILidar.h
      Description:

      YES if high sensitivity mode is enabled.

      Input Parameters:
      void (^_Nonnull)(BOOL enabled, NSError *_Nullable error) completionThe completion block that receives the execution result.
      Lidar Capabilities
      property
      property capabilities
      @property(nonatomic, readonly) DJILidarCapabilities *capabilities
      Header:DJILidar.h
      Description:

      Lidar capabilities. You can you this interface to get the sampling rate range.

      See Also:

      DJILidarCapabilities

      Point Cloud Sampling Rate
      method
      method setPointCloudSampleRate:withCompletion
      - (void)setPointCloudSampleRate:(DJILidarPointCloudSamplingRate)rate withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Set point cloud sampling rate. The sampling rate represents the number of effective acquisitions of the lidar per second, which can be intuitively understood as the number of point clouds generated in one second. The sampling rate range depend on the DJILidarPointCloudReturnMode. You can use lidarPointCloudSamplingRateRange to get the current support range when you change the point cloud return mode.

      Input Parameters:
      DJILidarPointCloudSamplingRate rateAn enum value of the DJILidarPointCloudSamplingRate
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPointCloudSampleRateWithCompletion
      - (void)getPointCloudSampleRateWithCompletion:(void (^_Nonnull)(DJILidarPointCloudSamplingRate rate, NSError *_Nullable error))completion
      Header:DJILidar.h
      Description:

      Get point cloud sampling rate.

      Input Parameters:
      void (^_Nonnull)(DJILidarPointCloudSamplingRate rate, NSError *_Nullable error) completionThe completion block that receives the execution result.
      Point Cloud Visible Light Pixel
      method
      method setPointCloudVisibleLightPixel:withCompletion
      - (void)setPointCloudVisibleLightPixel:(DJILidarPointCloudVisibleLightPixelMode)mode withCompletion:(DJICompletionBlock)completion
      Header:DJILidar.h
      Description:

      Set superimposed visible light pixels for coloring the model

      Input Parameters:
      DJILidarPointCloudVisibleLightPixelMode modeAn enum value of the DJILidar_PointCloudVisibleLightPixelMode`
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPointCloudVisibleLightPixelWithCompletion
      - (void)getPointCloudVisibleLightPixelWithCompletion:(void (^_Nonnull)(DJILidarPointCloudVisibleLightPixelMode mode, NSError *_Nullable error))completion
      Header:DJILidar.h
      Description:

      Get point cloud visible light pixel.

      Input Parameters:
      void (^_Nonnull)(DJILidarPointCloudVisibleLightPixelMode mode, NSError *_Nullable error) completionThe completion block that receives the execution result.


      enum DJILidarIMUPreheatStatus
      typedef NS_ENUM (NSUInteger, DJILidarIMUPreheatStatus)
      Header:DJILidarSettingDef.h
      Description:

      Point cloud IMU preheat status define for lidar. When the preheating is complete, the status will change to complete.

      Enum Members:
      DJILidarIMUPreheatStatusPreheatingIMU is Preheating.
      DJILidarIMUPreheatStatusPreheatCompletedIMU preheat is Complete.
      enum DJILidarPointCloudRecordStatus
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudRecordStatus)
      Header:DJILidarSettingDef.h
      Description:

      Point cloud record status define for point cloud.

      Enum Members:
      DJILidarPointCloudRecordStatusStartingPoint cloud record is starting.
      DJILidarPointCloudRecordStatusStartedPoint cloud is recording.
      DJILidarPointCloudRecordStatusPausePoint cloud record is paused.
      DJILidarPointCloudRecordStatusResumePoint cloud record is resumed.
      DJILidarPointCloudRecordStatusStoppingPoint cloud record is stoping.
      DJILidarPointCloudRecordStatusStoppedPoint cloud record is stoped.
      enum DJILidarPointCloudRecord
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudRecord)
      Header:DJILidarSettingDef.h
      Description:

      Point cloud record opration type define for point cloud. When you start point cloud recording on successfully, DJILidarPointCloudRecordStatus will change to DJILidarPointCloudRecordStatusStarted. You can use lidar:didReceiveLiveViewData to receive piont cloud live view data.

      Enum Members:
      DJILidarPointCloudRecordStartStart point cloud recording.
      DJILidarPointCloudRecordStopStop point cloud recording.
      DJILidarPointCloudRecordPausePause point cloud recording.
      DJILidarPointCloudRecordResumeResume point cloud recording.
      enum DJILidarPointCloudScanMode
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudScanMode)
      Header:DJILidarSettingDef.h
      Description:

      Enums represent the point cloud scan mode of lidar. Supports two scanning modes: traditional non-repetitive scan mode and repetitive line scan mode. Users can choose the appropriate scanning point cloud pattern according to their needs. The repetitive scan mode is a flat FOV(70.4 degree * 4.5 degree), and its scanning method is more similar to the traditional scanning lidar, which can obtain a more uniform and higher-precision scanning effect; The non-repetitive scan mode is a unique scanning method of livox, providing a complete near-circular FOV(70.4 degree *77.2 degree), which has better scanning static scanning effect and facade effect, and higher efficiency;

      Enum Members:
      DJILidarPointCloudScanModeNonRepeatRepetitive scan mode.
      DJILidarPointCloudScanModeRepeatNon-repetitive scan mode.
      enum DJILidarPointCloudReturnMode
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudReturnMode)
      Header:DJILidarSettingDef.h
      Description:

      Enums represent the point cloud return mode of lidar. We support 3 echoes, In single echo operation, the point cloud data rate is 24000 points/sec, In double-echo and triple-echo operations, the point cloud data rate is 480,000 points/sec.

      Enum Members:
      DJILidarPointCloudReturnModeSingleEchoFirstSingle return first (default).
      DJILidarPointCloudReturnModeSingleEchoStrongestSingle return strongest.
      DJILidarPointCloudReturnModeDoubleEchoDouble return.
      DJILidarPointCloudReturnModeTripleEchoTriple return.
      enum DJILidarPointCloudSamplingRate
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudSamplingRate)
      Header:DJILidarSettingDef.h
      Description:

      Enums represent the point cloud sampling rate of lidar.

      Enum Members:
      DJILidarPointCloudSamplingRate240KHZSampling rate: 240KHZ
      DJILidarPointCloudSamplingRate180KHZSampling rate: 180KHZ
      DJILidarPointCloudSamplingRate160KHZSampling rate: 160KHZ
      DJILidarPointCloudSamplingRate120KHZSampling rate: 120KHZ
      DJILidarPointCloudSamplingRate80KHZSampling rate: 80KHZ
      DJILidarPointCloudSamplingRate60KHZSampling rate: 60KHZ
      enum DJILidarPointCloudVisibleLightPixelMode
      typedef NS_ENUM (NSUInteger, DJILidarPointCloudVisibleLightPixelMode)
      Header:DJILidarSettingDef.h
      Description:

      Enums represent the point visible light pixel mode of lidar.

      Enum Members:
      DJILidarPointCloudVisibleLightPixelOffTurn off superimposed visible light pixels.
      DJILidarPointCloudVisibleLightPixelOnTimedShotOnTurn on superimposed visible light pixels. In this mode camera will take a photo every 3 seconds. It is recommended to use when flying aircraft manually.
      DJILidarPointCloudVisibleLightPixelOnTimedShotOffTurn on superimposed visible light pixels. In this mode camera will not take photo automatically. It is recommended to use in Waypoint Mission and set the photo interval to 3 seconds.