How to publish a pointcloud of ros msgs in a topic from a pcd file?
2024-09-04 16:20:40
How to publish a pointcloud of ros msgs in a topic from a pcd file?
Two methods
1. modified source
2. pcd_to_pointcloud
- run ros node pcl_ros in a terminal
usage:
$ rosrun pcl_ros pcd_to_pointcloud <file.pcd> [ <interval> ]
Loads a PCD file, publishing it one or more times as a ROS point cloud message.
Published Topics
- cloud_pcd (sensor_msgs/PointCloud2)
// A stream of point clouds generated from the PCD file.
// <interval> is the (optional) number of seconds to sleep between messages.
// If <interval> is zero or not specified the message is published once.
- in my condition, I use
// can add _frame_id:=/camera_link
$ rosrun pcl_ros pcd_to_pointcloud /home/william/Documents/demos/cylinders/preprocessing/data/realSense02.pcd 10 _frame_id:=/map
- run rviz:
$ rosrun rviz rviz
If the frame id you add is not camera_link, then should be edit.
click 'Add', click 'By topic', choose 'Pointcloud2' below topic '/cloud_pcd'. Then the pointcloud can be visualized.
References:
最新文章
- 关于Finereport移动端报表二次开发的两个小例子
- Codeforces Round #Pi (Div. 2) C. Geometric Progression map
- Activity的活动周期
- 【百度地图API】圣诞节里不会迷路的麋鹿——驾车导航
- WebBrowser控件使用技巧分享
- Polycarp&#39;s problems
- JavaSE教程-03Java中分支语句与四种进制转换-思维导图
- 记一次python的一些参数
- Python 函数调用&;定义函数&;函数参数
- java8实战二------lambda表达式和函数式接口,简单就好
- Base 底层库开源项目总结
- 创建spark_读取数据
- 数据库中char和varchar区别
- 18.os模块获取url后缀
- 使用EF操作Oracle数据库小计
- hpu 1267 Cafeteria (01背包)
- 基于反射启动Spring容器
- 造成MySQL全表扫描的原因
- spring 事务配置
- Android-进程理解/进程的优先级别
热门文章
- Docker资源
- 操作Oracle 一条龙
- TFSEclipsePlugin-UpdateSiteArchive 手动拷贝
- Day2-Python基础2---字典操作
- 关于web.xml不同版本之间的区别
- 【转】 Pro Android学习笔记(八一):服务(6):复杂数据Parcel
- Swing编程把图片放入frame里。先不作为背景图片
- expected declaration specifiers or '...' before string constant
- 侯捷STL学习(五)--allocator和容器之间的实现关系
- java ----获取路径的各种方法(总结)