lego-loam使用镭神激光数据

硬件设备:镭神c16

1、include/utility.h修改如下

extern const string pointCloudTopic = "/lslidar_point_cloud";
extern const string imuTopic = "/imu/data";
extern const bool useCloudRing = false; // if true, ang_res_y and ang_bottom are not used
extern const int N_SCAN = 16;
extern const int Horizon_SCAN = 2000;
extern const float ang_res_x = 0.18;
extern const float ang_res_y = 2.0;
extern const float ang_bottom = 15.0+0.1;
extern const int groundScanInd = 7;

2、修改imageproject.cpp,把cloudHeader.stamp = ros::Time::now();的注释去掉。

    void copyPointCloud(const sensor_msgs::PointCloud2ConstPtr& laserCloudMsg){

        cloudHeader = laserCloudMsg->header;
        // cloudHeader.stamp = ros::Time::now(); // Ouster lidar users may need to uncomment this line
        pcl::fromROSMsg(*laserCloudMsg, *laserCloudIn);
        // Remove Nan points
        std::vector<int> indices;
        pcl::removeNaNFromPointCloud(*laserCloudIn, *laserCloudIn, indices);
        // have "ring" channel in the cloud
        if (useCloudRing == true){
            pcl::fromROSMsg(*laserCloudMsg, *laserCloudInRing);
            if (laserCloudInRing->is_dense == false) {
                ROS_ERROR("Point cloud is not in dense format, please remove NaN points first!");
                ros::shutdown();
            }  
        }
    }

 3、修改run.launch

    <param name="/use_sim_time" value="true" />

 4、重新编译,然后可用。

参考资料:

https://blog.csdn.net/qq_39607707/article/details/123487250

相关推荐

  1. lego-loam使用激光数据

    2024-04-13 00:58:04       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-13 00:58:04       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-13 00:58:04       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-13 00:58:04       87 阅读
  4. Python语言-面向对象

    2024-04-13 00:58:04       96 阅读

热门阅读

  1. 对SQL主键优化策略收录

    2024-04-13 00:58:04       40 阅读
  2. 蓝桥杯练习题 —— 高精度加法(python)

    2024-04-13 00:58:04       37 阅读
  3. Rust - 函数

    2024-04-13 00:58:04       44 阅读
  4. C++提升17:C++快速回顾

    2024-04-13 00:58:04       22 阅读
  5. 10种保护dns的方法

    2024-04-13 00:58:04       33 阅读
  6. vue3 vuex 4.x 持久化

    2024-04-13 00:58:04       32 阅读
  7. 富格林:注重虚假阻挠受骗亏损

    2024-04-13 00:58:04       36 阅读
  8. vue3组件TS类型声明实例代码

    2024-04-13 00:58:04       42 阅读