Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
livox_ros::Lddc Class Reference

#include <lddc.h>

Public Member Functions

void CreateBagFile (const std::string &file_name)
 
void DistributeLidarData (void)
 
uint8_t GetTransferFormat (void)
 
uint8_t IsMultiTopic (void)
 
 Lddc (int format, int multi_topic, int data_src, int output_type, double frq, std::string &frame_id, bool lidar_bag, bool imu_bag)
 
void PrepareExit (void)
 
int RegisterLds (Lds *lds)
 
void SetPublishFrq (uint32_t frq)
 
void SetRosNode (ros::NodeHandle *node)
 
void SetRosPub (ros::Publisher *pub)
 
 ~Lddc ()
 

Public Attributes

Ldslds_
 

Private Member Functions

void FillPointsToCustomMsg (livox_ros_driver::CustomMsg &livox_msg, LivoxPointXyzrtl *src_point, uint32_t num, uint32_t offset_time, uint32_t point_interval, uint32_t echo_num)
 
void FillPointsToPclMsg (PointCloud::Ptr &pcl_msg, LivoxPointXyzrtl *src_point, uint32_t num)
 
ros::PublisherGetCurrentImuPublisher (uint8_t handle)
 
ros::PublisherGetCurrentPublisher (uint8_t handle)
 
int32_t GetPublishStartTime (LidarDevice *lidar, LidarDataQueue *queue, uint64_t *start_time, StoragePacket *storage_packet)
 
void InitPointcloud2MsgHeader (sensor_msgs::PointCloud2 &cloud)
 
void PollingLidarImuData (uint8_t handle, LidarDevice *lidar)
 
void PollingLidarPointCloudData (uint8_t handle, LidarDevice *lidar)
 
uint32_t PublishCustomPointcloud (LidarDataQueue *queue, uint32_t packet_num, uint8_t handle)
 
uint32_t PublishImuData (LidarDataQueue *queue, uint32_t packet_num, uint8_t handle)
 
uint32_t PublishPointcloud2 (LidarDataQueue *queue, uint32_t packet_num, uint8_t handle)
 
uint32_t PublishPointcloudData (LidarDataQueue *queue, uint32_t packet_num, uint8_t handle)
 

Private Attributes

rosbag::Bagbag_
 
ros::NodeHandlecur_node_
 
uint8_t data_src_
 
bool enable_imu_bag_
 
bool enable_lidar_bag_
 
std::string frame_id_
 
ros::Publisherglobal_imu_pub_
 
ros::Publisherglobal_pub_
 
uint8_t output_type_
 
ros::Publisherprivate_imu_pub_ [kMaxSourceLidar]
 
ros::Publisherprivate_pub_ [kMaxSourceLidar]
 
double publish_frq_
 
uint32_t publish_period_ns_
 
uint8_t transfer_format_
 
uint8_t use_multi_topic_
 

Detailed Description

Definition at line 47 of file lddc.h.

Constructor & Destructor Documentation

livox_ros::Lddc::Lddc ( int  format,
int  multi_topic,
int  data_src,
int  output_type,
double  frq,
std::string &  frame_id,
bool  lidar_bag,
bool  imu_bag 
)

Lidar Data Distribute Control-----------------------------------------—

Definition at line 45 of file lddc.cpp.

livox_ros::Lddc::~Lddc ( )

Definition at line 65 of file lddc.cpp.

Member Function Documentation

void livox_ros::Lddc::CreateBagFile ( const std::string &  file_name)

Definition at line 673 of file lddc.cpp.

void livox_ros::Lddc::DistributeLidarData ( void  )

Definition at line 569 of file lddc.cpp.

void livox_ros::Lddc::FillPointsToCustomMsg ( livox_ros_driver::CustomMsg &  livox_msg,
LivoxPointXyzrtl src_point,
uint32_t  num,
uint32_t  offset_time,
uint32_t  point_interval,
uint32_t  echo_num 
)
private

dual return mode

Definition at line 356 of file lddc.cpp.

void livox_ros::Lddc::FillPointsToPclMsg ( PointCloud::Ptr &  pcl_msg,
LivoxPointXyzrtl src_point,
uint32_t  num 
)
private

Definition at line 255 of file lddc.cpp.

ros::Publisher * livox_ros::Lddc::GetCurrentImuPublisher ( uint8_t  handle)
private

Definition at line 640 of file lddc.cpp.

ros::Publisher * livox_ros::Lddc::GetCurrentPublisher ( uint8_t  handle)
private

Definition at line 591 of file lddc.cpp.

int32_t livox_ros::Lddc::GetPublishStartTime ( LidarDevice lidar,
LidarDataQueue queue,
uint64_t start_time,
StoragePacket storage_packet 
)
private

Get start time, down to the period boundary

Skip some packets up to the period boundary

Flip to another period

Definition at line 91 of file lddc.cpp.

uint8_t livox_ros::Lddc::GetTransferFormat ( void  )
inline

Definition at line 58 of file lddc.h.

void livox_ros::Lddc::InitPointcloud2MsgHeader ( sensor_msgs::PointCloud2 &  cloud)
private

Definition at line 132 of file lddc.cpp.

uint8_t livox_ros::Lddc::IsMultiTopic ( void  )
inline

Definition at line 59 of file lddc.h.

void livox_ros::Lddc::PollingLidarImuData ( uint8_t  handle,
LidarDevice lidar 
)
private

Definition at line 558 of file lddc.cpp.

void livox_ros::Lddc::PollingLidarPointCloudData ( uint8_t  handle,
LidarDevice lidar 
)
private

Definition at line 535 of file lddc.cpp.

void livox_ros::Lddc::PrepareExit ( void  )

Definition at line 681 of file lddc.cpp.

uint32_t livox_ros::Lddc::PublishCustomPointcloud ( LidarDataQueue queue,
uint32_t  packet_num,
uint8_t  handle 
)
private

uint:ns

first packet

convert to ros time stamp

Definition at line 378 of file lddc.cpp.

uint32_t livox_ros::Lddc::PublishImuData ( LidarDataQueue queue,
uint32_t  packet_num,
uint8_t  handle 
)
private

Definition at line 481 of file lddc.cpp.

uint32_t livox_ros::Lddc::PublishPointcloud2 ( LidarDataQueue queue,
uint32_t  packet_num,
uint8_t  handle 
)
private

Use the first packet timestamp as pointcloud2 msg timestamp

Skip the packet

Adjust to the real size

Definition at line 164 of file lddc.cpp.

uint32_t livox_ros::Lddc::PublishPointcloudData ( LidarDataQueue queue,
uint32_t  packet_num,
uint8_t  handle 
)
private

Definition at line 270 of file lddc.cpp.

int livox_ros::Lddc::RegisterLds ( Lds lds)

Definition at line 526 of file lddc.cpp.

void livox_ros::Lddc::SetPublishFrq ( uint32_t  frq)
inline

Definition at line 63 of file lddc.h.

void livox_ros::Lddc::SetRosNode ( ros::NodeHandle node)
inline

Definition at line 60 of file lddc.h.

void livox_ros::Lddc::SetRosPub ( ros::Publisher pub)
inline

Definition at line 62 of file lddc.h.

Member Data Documentation

rosbag::Bag* livox_ros::Lddc::bag_
private

Definition at line 105 of file lddc.h.

ros::NodeHandle* livox_ros::Lddc::cur_node_
private

Definition at line 104 of file lddc.h.

uint8_t livox_ros::Lddc::data_src_
private

Definition at line 92 of file lddc.h.

bool livox_ros::Lddc::enable_imu_bag_
private

Definition at line 98 of file lddc.h.

bool livox_ros::Lddc::enable_lidar_bag_
private

Definition at line 97 of file lddc.h.

std::string livox_ros::Lddc::frame_id_
private

Definition at line 96 of file lddc.h.

ros::Publisher* livox_ros::Lddc::global_imu_pub_
private

Definition at line 102 of file lddc.h.

ros::Publisher* livox_ros::Lddc::global_pub_
private

Definition at line 100 of file lddc.h.

Lds* livox_ros::Lddc::lds_

Definition at line 65 of file lddc.h.

uint8_t livox_ros::Lddc::output_type_
private

Definition at line 93 of file lddc.h.

ros::Publisher* livox_ros::Lddc::private_imu_pub_[kMaxSourceLidar]
private

Definition at line 101 of file lddc.h.

ros::Publisher* livox_ros::Lddc::private_pub_[kMaxSourceLidar]
private

Definition at line 99 of file lddc.h.

double livox_ros::Lddc::publish_frq_
private

Definition at line 94 of file lddc.h.

uint32_t livox_ros::Lddc::publish_period_ns_
private

Definition at line 95 of file lddc.h.

uint8_t livox_ros::Lddc::transfer_format_
private

Definition at line 90 of file lddc.h.

uint8_t livox_ros::Lddc::use_multi_topic_
private

Definition at line 91 of file lddc.h.


The documentation for this class was generated from the following files:


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46