Lidar Class Reference

Class for managing a LiDAR device. More...

Functions

def __cinit__ (self)
 Default constructor.
 
def __dealloc__ (self)
 Destructor.
 
ERROR_CODE open (self, InitLidarParameters, params)
 Opens the LiDAR.
 
bool is_opened (self)
 Checks if the LiDAR is opened.
 
InitLidarParameters get_init_parameters (self)
 Returns the initialization parameters used to open the LiDAR.
 
LidarInformation get_lidar_information (self)
 Returns information about the Lidar sensor.
 
ERROR_CODE read (self)
 Reads the latest data from the LiDAR sensor.
 
ERROR_CODE grab (self)
 Grabs and processes a new frame of data.
 
ERROR_CODE retrieve_measure (self, Mat, py_mat, measure=LIDAR_MEASURE.XYZ, resolution=None, mem_type=MEM.CPU, color_map=VIEW_COLOR_MAP.AUTO)
 Retrieves a measure from the LiDAR. More...
 
ERROR_CODE retrieve_view (self, Mat, py_mat, view=LIDAR_VIEW.DEPTH, resolution=None, color_map=VIEW_COLOR_MAP.AUTO)
 Retrieves a view image from the LiDAR. More...
 
Timestamp get_timestamp (self, reference_time=TIME_REFERENCE.IMAGE)
 Returns the current timestamp.
 
float get_current_fps (self)
 Returns the current framerate.
 
ERROR_CODE get_sensors_data (self, SensorsData, data, reference_time=TIME_REFERENCE.IMAGE)
 Returns the sensors data (IMU, etc.) from the LiDAR.
 
ERROR_CODE enable_positional_tracking (self, PositionalTrackingLidarParameters, params=None)
 Enables positional tracking for the LiDAR.
 
def disable_positional_tracking (self)
 Disables positional tracking.
 
POSITIONAL_TRACKING_STATE get_position (self, Pose, py_pose, reference_frame=REFERENCE_FRAME.WORLD)
 Returns the current position of the LiDAR.
 
ERROR_CODE enable_recording (self, RecordingLidarParameters, params)
 Enables recording of LiDAR data.
 
def disable_recording (self)
 Disables recording.
 
int get_svo_position (self)
 Returns the current SVO playback position.
 
ERROR_CODE set_svo_position (self, int position)
 Sets the SVO playback position.
 
int get_svo_number_of_frames (self)
 Returns the total number of frames in the SVO.
 
int get_svo_position_at_timestamp (self, Timestamp, timestamp)
 Returns the SVO position at a specific timestamp.
 
def set_timestamp_base_offset (self, int offset_ns)
 Sets the timestamp base offset.
 
int get_timestamp_base_offset (self)
 Returns the timestamp base offset.
 
def pause_svo_reading (self, bool pause)
 Pauses or resumes SVO reading.
 
def close (self)
 Closes the LiDAR and releases resources.
 

Static Functions

list[LidarDevicePropertiesget_device_list ()
 Returns a list of available LiDAR devices.
 
list[LidarDevicePropertiesget_streaming_device_list ()
 Returns a list of streaming LiDAR devices.
 

Detailed Description

Class for managing a LiDAR device.

Python class for managing a LiDAR device.

Functions

◆ retrieve_measure()

ERROR_CODE retrieve_measure (   self,
  Mat,
  py_mat,
  measure = LIDAR_MEASURE.XYZ,
  resolution = None,
  mem_type = MEM.CPU,
  color_map = VIEW_COLOR_MAP.AUTO 
)

Retrieves a measure from the LiDAR.

Parameters
py_matThe Mat to store the measure.
measureThe type of measure to retrieve.
resolutionThe desired resolution.
mem_typeThe memory type (CPU/GPU).
color_mapThe colormap for visualization.

◆ retrieve_view()

ERROR_CODE retrieve_view (   self,
  Mat,
  py_mat,
  view = LIDAR_VIEW.DEPTH,
  resolution = None,
  color_map = VIEW_COLOR_MAP.AUTO 
)

Retrieves a view image from the LiDAR.

Parameters
py_matThe Mat to store the view.
viewThe type of view to retrieve.
resolutionThe desired resolution.
color_mapThe colormap for visualization.