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

camera_info override

asked 2014-10-02 18:02:04 -0600

mtourne gravatar image

Hi! I've been using an android app to pipe the camera image into ROS.

This works moderately well, even though there is some lag to get the image.

The problem is that the published /camera/camera_info is all empty. (see below)

Is there a way I can override the camera_info topic with the calibration data I've gathered, and bypass what the AndroidCameraViewer driver reports ?

Thank you

Output of :

$ rostopic echo /camera/camera_info 

header: 
  seq: 7485
  stamp: 
    secs: 1412290798
    nsecs: 453000000
  frame_id: camera
height: 960
width: 1280
distortion_model: ''
D: []
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-15 15:14:10 -0600

TimboInSpace gravatar image

You need to run CameraCalibrator.py, obtain a calibration .yaml file from that script, then provide your image publisher the URL to your calibration yaml file as a parameter to the image publisher.

This page gives details on the calibration process.

What are you using to publish these images? Does it have a camera_info_url parameter, or anything like that?

edit flag offensive delete link more

Comments

I've been using an android app (which doesn't appear to be on the store anymore), basically it was missing some information in the topics published that prevented other nodes that would consume camera data to function properly. I was curious if I could manually fake this data.

mtourne gravatar image mtourne  ( 2014-12-15 17:36:12 -0600 )edit

You don't need to fake it. One option is: on the non-android device set up a camera info manager publishing on a different camera name than your current one. Then set up an mage_transport republisher on the same name as your new camera info manager. Hope it goes well

TimboInSpace gravatar image TimboInSpace  ( 2014-12-18 13:24:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-02 18:02:04 -0600

Seen: 1,401 times

Last updated: Dec 15 '14