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

Camera model not correctly specified.

asked 2014-07-26 07:17:25 -0600

I'm trying to get rpg_svo - a project implementing semi-direct visual odometry - running. I can run the sample codes on a dataset, but not on a camera live stream.

I am using Indigo with the latest pull from the image_pipeline. I hope the error is not because I am using Indigo and not a more stable version of ROS.

Here is my terminal dump:

SUMMARY
========

CLEAR PARAMETERS
 * /svo/

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.7
 * /svo/cam_topic: /usb_cam/image_raw
 * /svo/camera_matrix/cols: 3
 * /svo/camera_matrix/data: [423.946127, 0, 3...
 * /svo/camera_matrix/rows: 3
 * /svo/camera_name: narrow_stereo
 * /svo/distortion_coefficients/cols: 5
 * /svo/distortion_coefficients/data: [-0.395356, 0.132...
 * /svo/distortion_coefficients/rows: 1
 * /svo/distortion_model: plumb_bob
 * /svo/grid_size: 30
 * /svo/image_height: 480
 * /svo/image_width: 640
 * /svo/loba_num_iter: 0
 * /svo/max_n_kfs: 10
 * /svo/projection_matrix/cols: 4
 * /svo/projection_matrix/data: [312.081909, 0, 2...
 * /svo/projection_matrix/rows: 3
 * /svo/rectification_matrix/cols: 3
 * /svo/rectification_matrix/data: [1, 0, 0, 0, 1, 0...
 * /svo/rectification_matrix/rows: 3

NODES
  /
    svo (svo_ros/vo)

core service [/rosout] found
process[svo-1]: started with pid [14234]
create vo_node
[ WARN] [1406362716.365539658]: Cannot find value for parameter: svo/publish_img_pyr_level, assigning default: 0
[ WARN] [1406362716.367242172]: Cannot find value for parameter: svo/publish_every_nth_img, assigning default: 1
[ WARN] [1406362716.368814410]: Cannot find value for parameter: svo/publish_every_nth_dense_input, assigning default: 1
[ WARN] [1406362716.372849123]: Cannot find value for parameter: svo/publish_world_in_cam_frame, assigning default: 1
[ WARN] [1406362716.374322519]: Cannot find value for parameter: svo/publish_map_every_frame, assigning default: 0
[ WARN] [1406362716.375674323]: Cannot find value for parameter: svo/publish_point_display_time, assigning default: 0
[ WARN] [1406362716.685035733]: Cannot find value for parameter: svo/publish_markers, assigning default: 1
[ WARN] [1406362716.685835016]: Cannot find value for parameter: svo/publish_dense_input, assigning default: 0
[ WARN] [1406362716.686585599]: Cannot find value for parameter: svo/accept_console_user_input, assigning default: 1
[ERROR] [1406362716.687362055]: Cannot find value for parameter: svo/cam_model
terminate called after throwing an instance of 'std::runtime_error'
  what():  Camera model not correctly specified.
[svo-1] process has died [pid 14234, exit code -6, cmd /home/long/Workspaces/catkin/devel/lib/svo_ros/vo __name:=svo __log:=/home/long/.ros/log/5b375c1a-149d-11e4-8bc0-24f5aa6f5f4f/svo-1.log].
log file: /home/long/.ros/log/5b375c1a-149d-11e4-8bc0-24f5aa6f5f4f/svo-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

This is my launchfile for usb_cam:

<launch>
    <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="index" value="0"/>
        <param name="vendor" value="0x046d"/>
                <param name="product" value="0x080c"/>

        <param name="image_width" value="640" />
        <param name="image_height" value="480" />
        <param name="pixel_format" value="mjpeg" />
        <param name="camera_frame_id" value="webcam" />
    </node>
</launch>

And the launch file of svo_ros:

<launch>
    <node pkg="svo_ros" type="vo" name="svo" clear_params="true" output="screen">

        <!-- Camera topic to subscribe to -->
        <param name="cam_topic" value="/usb_cam/image_raw" type="str" />

        <!-- Camera calibration file -->
        <rosparam file="$(find svo_ros)/param/cam.yaml" />

        <!-- Default parameter settings: choose between vo_fast and vo_accurate -->
        <rosparam file="$(find svo_ros)/param/vo_fast.yaml" />

    </node>
</launch>

Any idea?

edit retag flag offensive close merge delete

Comments

cam.yml is not present in https://github.com/uzh-rpg/rpg_svo/tree/master/svo_ros/param, change it to camera_atan.yaml or camera_pinhole.yaml

bvbdort gravatar image bvbdort  ( 2014-07-26 14:46:29 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-07-26 14:47:16 -0600

ahendrix gravatar image

It looks like your launch file isn't setting the svo/cam_model parameter, which the svo node requires in order to run.

From looking at the current version of svo_ros, it looks like the camera calibration yaml files that they supply have changed names; they're now param/camera_atan.yaml and param/camera_pinhole.yaml, and the latest version of the launch file references param/camera_atan.yaml : https://github.com/uzh-rpg/rpg_svo/bl...

I'm a little surprised that the rosparam tag doesn't complain that it can't find the yaml file in question.

edit flag offensive delete link more
0

answered 2014-07-28 10:01:18 -0600

Thanks for your help! It wasn't the solution, but it gave me the right direction.

Indeed, there was something wrong with my .yaml calibration files. The thing is that the SVO library requires the calibration file in another format. To generate the calibration file, I used the cameracalibrator of the image_pipeline. Unfortunately, the library requires a calibration file in ATAN format. A tool to calibrate a monocular camera using this ATAN camera model, can be found below in the comments!

I hope, I can help other people who encounter the same problem!

edit flag offensive delete link more

Comments

http://wiki.ros.org/ethzasl_ptam/Tutorials/camera_calibration

Long Hoang gravatar image Long Hoang  ( 2014-07-28 10:01:40 -0600 )edit

Since you already have installed ethzasl_ptam... can you compute a atan-calibration file for me? here is a bag-file of a sequence over the chessboard with a logitech webcam... that would be great! https://drive.google.com/file/d/0B7PH...

mister_kay gravatar image mister_kay  ( 2014-11-05 09:09:17 -0600 )edit

@mister_kay I used the original PTAM code, since ethzasl_ptam somehow have a GUI bug on my machine. You can find the PTAM code here: http://www.robots.ox.ac.uk/~gk/PTAM/

You still have to "convert" the result of the calibration, into a ros config file, that I can do for you if needed.

Long Hoang gravatar image Long Hoang  ( 2014-11-29 21:52:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-26 04:16:08 -0600

Seen: 1,998 times

Last updated: Jul 28 '14