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

Cropped/displaced camera view in rviz (gscam)

asked 2011-08-18 02:38:10 -0600

raahlb gravatar image

updated 2011-08-18 02:39:03 -0600

I'm using gscam to stream the view from a USB camera. However, when viewing it in an rviz camera display only a cropped view is shown. It seems like the view is displaced by half the view size to the right and down, so only a quarter of the view is shown. When using image_view everything looks fine. Does anyone know what is causing this problem?

According to mplayer the camera image's resolution is 640x480.

I'm using the default camera_parameters.txt:

# Camera intrinsics

[image]

width
640

height
480

[default]

camera matrix
1.00000 0.00000 1.00000 
0.00000 1.00000 1.00000
0.00000 0.00000 1.00000 

distortion
0.00000 0.00000 0.00000 0.00000 0.00000 


rectification
1.00000 0.00000 0.00000 
0.00000 1.00000 0.00000 
0.00000 0.00000 1.00000 

projection
1.00000 0.00000 1.00000 0.00000 
0.00000 1.00000 1.00000 0.00000 
0.00000 0.00000 1.00000 0.00000 

and this is my GSCAM_CONFIG:

v4l2src device=/dev/video0 ! video/x-raw-rgb, width=640, height=480, framerate=30/1 ! ffmpegcolorspace ! identity name=ros ! fakesink"
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-09-09 02:02:37 -0600

jbohren gravatar image

The available version of gscam doesn't properly publish TF frame information, and so it won't work with an rviz camera display. See this branch for this functionality.

edit flag offensive delete link more

Comments

Jon, you are everywhere.

Zihan Chen gravatar image Zihan Chen  ( 2014-03-31 14:55:52 -0600 )edit

Question Tools

Stats

Asked: 2011-08-18 02:38:10 -0600

Seen: 586 times

Last updated: Sep 09 '12