Ask Your Question
0

How do I Publish pcd files in my folder on a topic?

asked 2013-05-04 12:56:31 -0500

Rohitdewani gravatar image

So I have 100 pcd files. they look like this

VERSION .7 FIELDS x y z rgb SIZE 4 4 4 4 TYPE F F F U COUNT 1 1 1 1 WIDTH 38092 HEIGHT 1 VIEWPOINT 0 0 0 1 0 0 0 POINTS 38092 DATA ascii 224 0 681 2172952 229 0 662 2107159 ....

Now I want to publish these files one by one on a topic . How do I do that? I have gone through the pcl ros tutorials.They subscribe to a topic, do some processing inside the call back function and then they publish it on a topic.

What I want to do is just publish these pcd files on a topic

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-05-04 14:34:23 -0500

Check out the wiki page for pcl_ros. In particular, it depends on what ROS message type you'd like to publish. If your PCD contains generic pointCloud data, then it looks like you could probably use pcd_to_pointcloud, which publises ROS PointCloud2 messages:

 $ rosrun pcl_ros pcd_to_pointcloud <file.pcd> [ <interval> ]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-05-04 12:56:31 -0500

Seen: 1,772 times

Last updated: May 04 '13