背景
2013年智在飞翔比赛:
RoboMaster | 无人飞行器智能感知技术竞赛https://www.robomaster.com/zh-CN/robo/drone?djifrom=nav_drone
用vins-fusion来定位,他自己会生成点云数据。
进一步用ego-planner来路径规划和避障,需要用到vins-fusion的点云。
问题
如下图所示,ego-planner中示例代码的点云数据结构为:sensor_msgs/PointCloud2
但是,vins-fusion的点云数据格式为:
解决方案
需要将 sensor_msgs/PointCloud转换成sensor_msgs/PointCloud2。
有现成的库函数,可以参考以下博客:
ROS点云消息的解析和点云类型的转换 | 沉默杀手 (charon-cheung.github.io)https://charon-cheung.github.io/2020/12/09/PCL%E7%82%B9%E4%BA%91/ROS%E7%82%B9%E4%BA%91%E6%B6%88%E6%81%AF%E7%9A%84%E8%A7%A3%E6%9E%90%E5%92%8C%E5%87%A0%E7%A7%8D%E7%82%B9%E4%BA%91%E7%B1%BB%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/#%E6%B6%88%E6%81%AF%E7%B1%BB%E5%9E%8BRos点云格式转换总结_convertpointcloud2topointcloud-CSDN博客
https://blog.csdn.net/stephanezhang/article/details/122214518
警告警告
这种方案好像不可行,因为vins的点云是稀疏点云,但是ego需要的是稠密点云。
方案探索中。。。。。大家要是有解决方法,欢迎留言,提前感谢大佬!