Ask Your Question
1

How to visualize /camera/depth/points without using rviz?

asked 2012-05-07 18:15:22 -0500

DavidLavy gravatar image

updated 2012-05-09 10:20:39 -0500

Hi,

Following this tutorial in the Use ROS there is a tutorial of how to visualize a point cloud, doing that I execute this commands:

$ roscore
$ rosrun openni_camera openni_node
$ rosrun pcl_ros convert_pointcloud_to_image input:=/camera/depth/points output:=/camera/depth/cloud_image

but i get the following error:

[ERROR] [1336450343.870410678]: Error in converting cloud to image message: No rgb field!!

This doesn't happen when I run this instead of my last line:

$ rosrun pcl_ros convert_pointcloud_to_image input:=/camera/rgb/points output:=/camera/depth/cloud_image

I get no error and I do can visualize my image with:

$ rosrun image_view image_view image:=/camera/rgb/cloud_image

It show this image

I can realize that command only accept point clouds from the rgb camera, but how can I visualize the depth images? (without using rviz)

P.S. I'm using ROS Electric, in Ubuntu 11.04

Thanks!

edit retag flag offensive close merge delete

Comments

You get no output at all?

Ryan gravatar image Ryan  ( 2012-05-07 18:39:57 -0500 )edit

Sorry, it's fixed now

DavidLavy gravatar image DavidLavy  ( 2012-05-07 18:54:15 -0500 )edit

Any idea??

DavidLavy gravatar image DavidLavy  ( 2012-05-08 16:58:21 -0500 )edit

We could use some more information. What exact command results in that error? Can you get data from the individual topics in the rostopic list using rostopic hz or similar? What version of ROS are you using?

Eric Perko gravatar image Eric Perko  ( 2012-05-08 17:09:41 -0500 )edit

5 Answers

Sort by ยป oldest newest most voted
2

answered 2013-04-02 03:13:27 -0500

Hemu gravatar image

Instead of using /camera/depth/points try using /camera/depth_registered/points as input argument. /camera/depth/points does not provide RGB data whereas /camera/depth_registered/points provides RGB data along with the depth data.

edit flag offensive delete link more
1

answered 2012-05-09 08:49:43 -0500

Kevin gravatar image

You converted it to an image, use image_view

rosrun image_view image_view image:=/camera/depth/cloud_image
edit flag offensive delete link more
0

answered 2012-05-09 12:05:13 -0500

Eric Perko gravatar image

Have you tried depth_viewer? I believe it is designed to properly scale the depth images from the Kinect for viewing.

edit flag offensive delete link more

Comments

the depth_viewer shows topics of type sensor_msgs/Image, but my topic has type of sensor_msgs/PointCloud2

DavidLavy gravatar image DavidLavy  ( 2012-05-19 18:38:10 -0500 )edit
0

answered 2012-05-08 17:49:16 -0500

Kevin gravatar image

According to DavidLavy's comment above ... this issue is fixed.

edit flag offensive delete link more
0

answered 2012-05-09 09:08:06 -0500

DavidLavy gravatar image

I can't after I run:

$ rosrun pcl_ros convert_pointcloud_to_image input:=/camera/depth/points output:=/camera/depth/cloud_image

I get a continously error msg of:

[ERROR] [1336450343.870410678]: Error in converting cloud to image message: No rgb field!!

It can't convert it to an image

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

1 follower

Stats

Asked: 2012-05-07 18:15:22 -0500

Seen: 3,039 times

Last updated: Apr 02 '13