27 #ifndef LIVOX_ROS_DRIVER_LDS_LIDAR_H_ 28 #define LIVOX_ROS_DRIVER_LDS_LIDAR_H_ 35 #include "livox_sdk.h" 47 static LdsLidar lds_lidar(interval_ms);
51 int InitLdsLidar(std::vector<std::string> &broadcast_code_strs,
52 const char *user_config_path);
63 uint32_t data_num,
void *client_data);
65 static void OnDeviceChange(
const DeviceInfo *info, DeviceEvent type);
67 uint8_t response,
void *clent_data);
69 uint8_t response,
void *clent_data);
71 DeviceInformationResponse *ack,
74 ErrorMessage *message);
76 uint8_t response,
void *clent_data);
78 uint8_t response,
void *clent_data);
80 uint8_t response,
void *clent_data);
82 uint8_t response,
void *clent_data);
84 uint8_t response,
void *client_data);
88 livox_status status,
uint8_t handle,
89 LidarGetExtrinsicParameterResponse *response,
void *clent_data);
91 DeviceParameterResponse *response,
static void SetImuRatePushFrequencyCb(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)
std::vector< UserRawConfig > raw_config_
int GetRawConfig(const char *broadcast_code, UserRawConfig &config)
LdsLidar & operator=(const LdsLidar &)=delete
static void SetCoordinateCb(livox_status status, uint8_t handle, uint8_t response, void *clent_data)
static void OnDeviceChange(const DeviceInfo *info, DeviceEvent type)
static void SetPointCloudReturnModeCb(livox_status status, uint8_t handle, uint8_t response, void *clent_data)
static void OnDeviceBroadcast(const BroadcastDeviceInfo *info)
void EnableAutoConnectMode(void)
static void ControlFanCb(livox_status status, uint8_t handle, uint8_t response, void *clent_data)
uint32_t whitelist_count_
int ParseConfigFile(const char *pathname)
char broadcast_code_whitelist_[kMaxLidarCount][kBroadcastCodeSize]
bool IsExistInRawConfig(const char *broadcast_code)
int AddBroadcastCodeToWhitelist(const char *broadcast_code)
TimeSyncConfig timesync_config_
virtual void PrepareExit(void)
int AddRawUserConfig(UserRawConfig &config)
static void StartSampleCb(livox_status status, uint8_t handle, uint8_t response, void *clent_data)
static void ReceiveSyncTimeCallback(const char *rmc, uint32_t rmc_length, void *client_data)
static LdsLidar * GetInstance(uint32_t interval_ms)
static void OnLidarDataCb(uint8_t handle, LivoxEthPacket *data, uint32_t data_num, void *client_data)
static void GetLidarExtrinsicParameterCb(livox_status status, uint8_t handle, LidarGetExtrinsicParameterResponse *response, void *clent_data)
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
int InitLdsLidar(std::vector< std::string > &broadcast_code_strs, const char *user_config_path)
bool IsBroadcastCodeExistInWhitelist(const char *broadcast_code)
LdsLidar(uint32_t interval_ms)
volatile bool is_initialized_
static void SetHighSensitivityCb(livox_status status, uint8_t handle, DeviceParameterResponse *response, void *clent_data)
static void DeviceInformationCb(livox_status status, uint8_t handle, DeviceInformationResponse *ack, void *clent_data)
void DisableAutoConnectMode(void)
bool IsAutoConnectMode(void)
int ParseTimesyncConfig(rapidjson::Document &doc)
static void StopSampleCb(livox_status status, uint8_t handle, uint8_t response, void *clent_data)
static void LidarErrorStatusCb(livox_status status, uint8_t handle, ErrorMessage *message)