How to publish a pointcloud of ros msgs in a topic from a pcd file?
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:
How to publish a pointcloud of ros msgs in a topic from a pcd file?的更多相关文章
- ROS(一)Topic 通信
ROS系统起源于2007年斯坦福大学人工智能实验室的项目与机器人技术公司Willow Garage的个人机器人项目(Personal Robots Program)之间的合作,2008年之后就由Wil ...
- ros 使用命令测试topic
发布话题 $ rostopic pub -r /chatter std_msgs/String "test" 输出数据: $ rostopic echo /chatter data ...
- python smbus IOError: [Errno 2] No such file or directory
1.打开配置文件 sudo nano /boot/config.txt 打开以下选项 "dtparam=i2c_arm=on" ctrl + o 保存 ctrl + x 退出 2. ...
- 如何在ROS中使用PCL(2)
记录关于我们运行roslaunch openni_launch openni.launch 命令时生成的话题以及这些话题的数据类型便于后期的处理,只有知道它们的数据结构,才能很好的对数据进行处理,我 ...
- ROS教程
Learning ROS 学习ROS Depending on your learning style and preferences, you can take two approaches to ...
- ROS语音交互(四)接入图灵语义理解
首先程序中会用到Json,curl 安装相应的库 $ sudo apt-get install libcurl3 libcurl4-openssl-dev$ sudo apt-get install ...
- ROS多个master消息互通
需求 有时候我们需要有几个不同的master, 他们之间要交换topic的内容,这时候就不能使用ros自带的设置同一个master的方法. 我们的处理方法是,构造一个client和一个server,他 ...
- 理解ROS话题
首先需要打开一个终端在里面运行roscore: roscore 再打开一个终端,在里面运行一个turtlesim_node节点: rosrun turtlesim turtlesim_node 打开另 ...
- (二)ROS系统架构及概念 ROS Architecture and Concepts 以Kinetic为主更新 附课件PPT
第2章 ROS系统架构及概念 ROS Architecture and Concepts PPT说明: 正文用白色,命令或代码用黄色,右下角为对应中文译著页码. 这一章需要掌握ROS文件系统,运行图级 ...
随机推荐
- python3小例子:scrapy+mysql
https://blog.csdn.net/u010151698/article/details/79371234
- SQL SERVER存储过程的几种示例
1.常用系统存储过程及使用语法:exec sp_databases; --查看数据库exec sp_tables; --查看表exec sp_columns student;--查看列exec sp_ ...
- IP Fragmentation(IP分片)
https://www.cisco.com/c/en/us/tech/ip/index.html IP协议在传输数据包时,将数据报文分为若干分片进行传输,并在目标系统中进行重组,这一过程称为分片(Fr ...
- 获取wifi热点
https://stackoverflow.com/questions/31555640/how-to-get-wifi-ssid-in-ios9-after-captivenetwork-is-de ...
- java继承实例基础
总结:多态.重写.构造方法调用 package com.a; public class fsd { int a = 23; public fsd() { System.out.println(4444 ...
- java流类、、、理解不够,流太多不知怎么用好?
总结:输入流.输出流..子类多.需要加强: package com.da; import java.io.*; public class rtr { public static void main(S ...
- Mybatis Laz-Load功能实现代码赏析(原创)
对于Mybatis 拥有的Lazy Load(有中文翻译成延迟加载)功能,应该很同学都有听说过,今天主要与大家一起来解读一下Mybatis在Lazy Load功能的实现的代码.Lazy Load实现的 ...
- 2016.1.1 VS中宏的使用技巧点滴
Dim selection As TextSelection = DTE.ActiveDocument.Selection'定义 TextSelection 对象 selection.StartOfL ...
- Android 媒体编解码器(转)
媒体编解码器 MediaCodec类是用来为低级别的媒体编码和解码的媒体编解码器提供访问.您可以实例化一个MediaCodec类通过调用createEncoderByType()方法来进行对媒体文件进 ...
- spring整合web项目演示