Unable to visualize camera inside RViz

asked 2017-11-05 23:02:44 -0500

Ravi Joshi gravatar image

I am trying to visualize camera inside RViz. The camera info topic and image topic are available as shown below:

[baxter - http://011312P0016.local:11311] baxterpc@BaxterPC7350:~/ros_ws$ rostopic list|grep kinect
/head/kinect2/k2_rgb/camera_info
/head/kinect2/k2_rgb/image

I can also get the live echo from camera_info topic in the terminal.

[baxter - http://011312P0016.local:11311] baxterpc@BaxterPC7350:~/ros_ws$ rostopic echo /head/kinect2/k2_rgb/camera_info
header: 
  seq: 1958
  stamp: 
    secs: 2410039413
    nsecs:         0
  frame_id: /k2/rgb_frame
height: 1080
width: 1920
distortion_model: plumb_bob
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [1081.3720703125, 0.0, 959.5, 0.0, 1081.3720703125, 539.5, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [1081.3720703125, 0.0, 959.5, 0.0, 0.0, 1081.3720703125, 539.5, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False

The image can be seen using ros image_view tool as following:

[baxter - http://011312P0016.local:11311] baxterpc@BaxterPC7350:~/ros_ws$ rosrun image_view image_view image:=/head/kinect2/k2_rgb/image

Below is the screenshot: image description

However, when I add the camera the in RViz, it doesn't show anything. Please see below the screenshot of RViz: image description

edit retag flag offensive close merge delete

Comments

Did you try changing the transport hint?

VictorLamoine gravatar image VictorLamoine  ( 2017-11-07 01:32:54 -0500 )edit

@VictorLamoine: What is transport hint? Can you please elaborate a bit more?

Ravi Joshi gravatar image Ravi Joshi  ( 2017-11-07 03:29:45 -0500 )edit

Last screenshot, under the "Camera" topic, there is a "Transport Hint", test them all!

VictorLamoine gravatar image VictorLamoine  ( 2017-11-07 04:06:20 -0500 )edit