ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to visualize Point cloud ?

asked 2012-12-04 19:06:36 -0600

KARTHIK MURUGAN gravatar image

updated 2014-04-20 14:09:29 -0600

ngrennan gravatar image

hi, I am new to ROS.I am using Fuerte distro. I went through the tutorials and learnt the basic commands regarding packages,nodes,publish,topic,etc using turtlesim (the means by which they were explained in the tutorial). Is there any tutorial to know about reading images(from the disk) and image processing or is it possible to read image or any data only from a bag file.

I have a bag file probably containing image & velodyne pointcloud data(found using rxbag) but i am not able to see any pointcloud. In the tutorial rviz was not clear for me. Please anyone help me with rviz and how to visualize the pointcloud from the bagfile. How to interpret the contents of the bagfile and use them?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
4

answered 2012-12-05 02:33:40 -0600

ChickenSoup gravatar image

Hi,

Here are the steps:

1) run rviz [rosrun rviz rviz]

2) Add display type in rviz [Add->PointCloud2] or may be just PointCloud

3) play your bag file [rosbag play abcdefg.bag]

4) Browse for the topic in the added display type in rviz

and if the point cloud is still not visible, change the display colors (because, usually it starts with white)

cheers!

edit flag offensive delete link more

Comments

thank you. i tried ur suggestion. I played the bag file. i run rviz . I am able to see the image by selecting in the image topic. I cant see any pointcloud since there is no topic in the PointCloud2 list. i also tried PointCloud. But when i do rostopic list, i get /velodyne_packets...

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-06 05:59:25 -0600 )edit

try [rostopic type /velodyne_packets] to check the type. may be the bag file does not contain any PointCloud topics afterall.

ChickenSoup gravatar image ChickenSoup  ( 2012-12-06 18:57:39 -0600 )edit

yeah u r ryt... i had to convert that topic type to sensor_msgs/pointcloud2 topic... now i am able to select it but cant see any pointcloud... when i select the status field it shows:Transform [sender=/velodyne_pointcloud_CloudNodelet] For frame [/velodyne]: Fixed Frame [/world] does not exist

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-08 00:39:02 -0600 )edit

yeah u r ryt... i had to convert that topic type to sensor_msgs/pointcloud2 topic... now it shows some error in fixed frame... when i select the status field it shows:Transform [sender=/velodyne_pointcloud_CloudNodelet] For frame [/velodyne]: Fixed Frame [/world] does not exist

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-08 00:39:03 -0600 )edit
0

answered 2012-12-08 15:56:55 -0600

forrestv gravatar image

Change the "fixed frame" at the top of rviz's config to /velodyne

edit flag offensive delete link more

Comments

yes i can see the point cloud after changing as u said. What does fixed frame signify?Why should it be set to /velodyne?

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-09 00:42:26 -0600 )edit

It's the frame that rviz transforms everything into to display it, the world frame. You don't have a tf between /velodyne and /map or something, so you need to tell it to use /velodyne as the world frame.

forrestv gravatar image forrestv  ( 2012-12-11 20:35:24 -0600 )edit
0

answered 2016-12-15 11:41:18 -0600

How can i do that with code? C++

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-12-04 19:06:36 -0600

Seen: 20,415 times

Last updated: Dec 08 '12