lego loam 跑镭神32线激光雷达

本文介绍了如何让lego loam处理镭神32线激光雷达(32C)的数据包。由于lego loam默认接受的topic和frame_id与镭神雷达不匹配,需要通过编写转换程序并修改lego loam的launch文件和utility.h配置。同时,需要解除imageProjection.cpp中的特定注释,并确保使用--clock参数运行bag文件。
摘要由CSDN通过智能技术生成

师弟反应镭神32线激光雷达(32C)录制的数据包不能跑lego loam,这里就总结一下。

首先lego loam默认的接受的topic name是velodyne_points,点云的frame_id是velodyne,镭神驱动发布的topic name为point_raw,frame_id为world这里需要写一个程序转一下:

#include "ros/ros.h"
#include "std_msgs/String.h"
#include "sensor_msgs/PointCloud2.h"
#include <string>

#include <sstream>

/**
 * This tutorial demonstrates simple sending of messages over the ROS system.
 */

static ros::Publisher g_scan_pub;

static void main_topic_callback(const sensor_msgs::PointCloud2::ConstPtr& input)
{
    sensor_msgs::PointCloud2 msg = *input;
    msg.header.frame_id = "velodyne";
    g_scan_pub.publish(msg);
}


int main(int argc, char *argv[])
{
    /**
     * The ros::init() function needs to see argc and argv so that it can perform
     * any ROS arguments and name remapping that were provided at the command line.
     * For programmatic remappings you can use a different version of init() which takes
     * remappings directly, but for most command-line programs, passing ar
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值