sensor_msgs::LaserScan转换为sensor_msgs::PointCloud2主要用到了transformLaserScanToPointCloud()这个函数,订阅消息结构为sensor_msgs::LaserScan的话题scan,发布消息结构为sensor_msgs::PointCloud2的话题cloud2完整的功能包上传至https://download.csdn.net/download/zhaohaowu/21227408或者1、创建功能包catkin_create_pkgLaserScan2PointCloud2roscpprospytfsensor_msg
当我们想把RGBD相机的深度图转成单线激光雷达来使时,经常考虑到使用depthimage_to_laserscan的ros包。RGBD极坐标系下的极限角其中有关于通过深度图和相机内参转成基于极坐标系下的单线激光雷达最大和最小角度这两个参数,用到的代码如下:doubleDepthImageToLaserScan::magnitude_of_ray(constcv::Point3d&ray)const{returnsqrt(pow(ray.x,2.0)+pow(ray.y,2.0)+pow(ray.z,2.0));}doubleDepthImageToLaserScan::angle_betwee
当我们想把RGBD相机的深度图转成单线激光雷达来使时,经常考虑到使用depthimage_to_laserscan的ros包。RGBD极坐标系下的极限角其中有关于通过深度图和相机内参转成基于极坐标系下的单线激光雷达最大和最小角度这两个参数,用到的代码如下:doubleDepthImageToLaserScan::magnitude_of_ray(constcv::Point3d&ray)const{returnsqrt(pow(ray.x,2.0)+pow(ray.y,2.0)+pow(ray.z,2.0));}doubleDepthImageToLaserScan::angle_betwee