#include <lds_lidar.h>
Public Member Functions | |
int | DeInitLdsLidar (void) |
int | InitLdsLidar (std::vector< std::string > &broadcast_code_strs, const char *user_config_path) |
Public Member Functions inherited from livox_ros::Lds | |
void | CleanRequestExit () |
uint8_t | GetDeviceType (uint8_t handle) |
bool | IsAllQueueEmpty () |
bool | IsAllQueueReadStop () |
bool | IsRequestExit () |
Lds (uint32_t buffer_time_ms, uint8_t data_src) | |
void | RequestExit () |
void | ResetLds (uint8_t data_src) |
void | StorageRawPacket (uint8_t handle, LivoxEthPacket *eth_packet) |
void | UpdateLidarInfoByEthPacket (LidarDevice *p_lidar, LivoxEthPacket *eth_packet) |
virtual | ~Lds () |
Static Public Member Functions | |
static LdsLidar * | GetInstance (uint32_t interval_ms) |
Static Public Member Functions inherited from livox_ros::Lds | |
static void | ResetLidar (LidarDevice *lidar, uint8_t data_src) |
static void | SetLidarDataSrc (LidarDevice *lidar, uint8_t data_src) |
Private Member Functions | |
int | AddBroadcastCodeToWhitelist (const char *broadcast_code) |
int | AddRawUserConfig (UserRawConfig &config) |
void | DisableAutoConnectMode (void) |
void | EnableAutoConnectMode (void) |
int | GetRawConfig (const char *broadcast_code, UserRawConfig &config) |
bool | IsAutoConnectMode (void) |
bool | IsBroadcastCodeExistInWhitelist (const char *broadcast_code) |
bool | IsExistInRawConfig (const char *broadcast_code) |
LdsLidar (uint32_t interval_ms) | |
LdsLidar (const LdsLidar &)=delete | |
LdsLidar & | operator= (const LdsLidar &)=delete |
int | ParseConfigFile (const char *pathname) |
int | ParseTimesyncConfig (rapidjson::Document &doc) |
virtual void | PrepareExit (void) |
void | ResetLdsLidar (void) |
~LdsLidar () | |
Static Private Member Functions | |
static void | ControlFanCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
static void | DeviceInformationCb (livox_status status, uint8_t handle, DeviceInformationResponse *ack, void *clent_data) |
static void | GetLidarExtrinsicParameterCb (livox_status status, uint8_t handle, LidarGetExtrinsicParameterResponse *response, void *clent_data) |
static void | LidarErrorStatusCb (livox_status status, uint8_t handle, ErrorMessage *message) |
static void | OnDeviceBroadcast (const BroadcastDeviceInfo *info) |
static void | OnDeviceChange (const DeviceInfo *info, DeviceEvent type) |
static void | OnLidarDataCb (uint8_t handle, LivoxEthPacket *data, uint32_t data_num, void *client_data) |
static void | ReceiveSyncTimeCallback (const char *rmc, uint32_t rmc_length, void *client_data) |
static void | SetCoordinateCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
static void | SetHighSensitivityCb (livox_status status, uint8_t handle, DeviceParameterResponse *response, void *clent_data) |
static void | SetImuRatePushFrequencyCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
static void | SetPointCloudReturnModeCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
static void | SetRmcSyncTimeCb (livox_status status, uint8_t handle, uint8_t response, void *client_data) |
static void | StartSampleCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
static void | StopSampleCb (livox_status status, uint8_t handle, uint8_t response, void *clent_data) |
Private Attributes | |
bool | auto_connect_mode_ |
char | broadcast_code_whitelist_ [kMaxLidarCount][kBroadcastCodeSize] |
std::mutex | config_mutex_ |
bool | enable_timesync_ |
volatile bool | is_initialized_ |
std::vector< UserRawConfig > | raw_config_ |
TimeSync * | timesync_ |
TimeSyncConfig | timesync_config_ |
uint32_t | whitelist_count_ |
Additional Inherited Members | |
Public Attributes inherited from livox_ros::Lds | |
uint8_t | lidar_count_ |
LidarDevice | lidars_ [kMaxSourceLidar] |
Semaphore | semaphore_ |
Protected Attributes inherited from livox_ros::Lds | |
uint32_t | buffer_time_ms_ |
uint8_t | data_src_ |
LiDAR data source, data from dependent lidar.
Definition at line 44 of file lds_lidar.h.
|
private |
Global function for common use -------------------------------------—— Lds lidar function ----------------------------------------------------—
Definition at line 48 of file lds_lidar.cpp.
|
privatedelete |
|
private |
Definition at line 58 of file lds_lidar.cpp.
|
private |
Add broadcast code to whitelist
Definition at line 557 of file lds_lidar.cpp.
|
private |
Definition at line 733 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 347 of file lds_lidar.cpp.
int livox_ros::LdsLidar::DeInitLdsLidar | ( | void | ) |
Definition at line 137 of file lds_lidar.cpp.
|
staticprivate |
Query the firmware version of Livox LiDAR.
Definition at line 310 of file lds_lidar.cpp.
|
inlineprivate |
Definition at line 99 of file lds_lidar.h.
|
inlineprivate |
Definition at line 98 of file lds_lidar.h.
Definition at line 46 of file lds_lidar.h.
|
staticprivate |
Callback function of get LiDARs' extrinsic parameter.
Definition at line 431 of file lds_lidar.cpp.
|
private |
Definition at line 759 of file lds_lidar.cpp.
int livox_ros::LdsLidar::InitLdsLidar | ( | std::vector< std::string > & | broadcast_code_strs, |
const char * | user_config_path | ||
) |
Add commandline input broadcast code
Start livox sdk to receive lidar data
Add here, only for callback use
Definition at line 62 of file lds_lidar.cpp.
|
inlineprivate |
Definition at line 100 of file lds_lidar.h.
|
private |
Definition at line 574 of file lds_lidar.cpp.
|
private |
Definition at line 744 of file lds_lidar.cpp.
|
staticprivate |
Callback function of Lidar error message.
Definition at line 324 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 172 of file lds_lidar.cpp.
|
staticprivate |
Callback function of changing of device state.
Config lidar parameter
Ensure the thread safety for set_bits and connect_state
Definition at line 228 of file lds_lidar.cpp.
|
staticprivate |
Static function in LdsLidar for callback or event process ----------—— Receiving point cloud data from Livox LiDAR.
Definition at line 158 of file lds_lidar.cpp.
|
private |
Config file process
Definition at line 644 of file lds_lidar.cpp.
|
private |
Definition at line 589 of file lds_lidar.cpp.
|
privatevirtual |
Reimplemented from livox_ros::Lds.
Definition at line 153 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 538 of file lds_lidar.cpp.
|
private |
Definition at line 60 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 376 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 471 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 405 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 350 of file lds_lidar.cpp.
|
staticprivate |
Definition at line 529 of file lds_lidar.cpp.
|
staticprivate |
Callback function of starting sampling.
Definition at line 501 of file lds_lidar.cpp.
|
staticprivate |
Callback function of stopping sampling.
Definition at line 526 of file lds_lidar.cpp.
|
private |
Definition at line 107 of file lds_lidar.h.
|
private |
Definition at line 110 of file lds_lidar.h.
|
private |
Definition at line 116 of file lds_lidar.h.
|
private |
Definition at line 113 of file lds_lidar.h.
|
private |
Definition at line 109 of file lds_lidar.h.
|
private |
Definition at line 111 of file lds_lidar.h.
|
private |
Definition at line 114 of file lds_lidar.h.
|
private |
Definition at line 115 of file lds_lidar.h.
|
private |
Definition at line 108 of file lds_lidar.h.