|
我在使用livox_ros_driver工程时,希望只获取imu数据,但是官方代码是将点云与imu数据同时发布的,我希望屏蔽所有点云数据,只发布imu数据,请问该怎么做?
我尝试如下方法,但是imu没有数据发布出来:
- void Lddc::DistributeLidarData(void) {
- if (lds_ == nullptr) {
- return;
- }
- lds_->semaphore_.Wait();
- for (uint32_t i = 0; i < lds_->lidar_count_; i++) {
- uint32_t lidar_id = i;
- LidarDevice *lidar = &lds_->lidars_[lidar_id];
- LidarDataQueue *p_queue = &lidar->imu_data;
- if ((kConnectStateSampling != lidar->connect_state) ||
- (p_queue == nullptr)) {
- continue;
- }
- // PollingLidarPointCloudData(lidar_id, lidar);
- PollingLidarImuData(lidar_id, lidar);
- }
- if (lds_->IsRequestExit()) {
- PrepareExit();
- }
- }
Copy the code 请问该如何修改官方代码?
|
|