带SVO的ROS:未正确指定相机型号

时间:2014-07-26 10:55:51

标签: ros

我试图获得rpg_svo - 一个实施半直接视觉测距的项目 - 运行。我可以在数据集上运行示例代码,但不能在相机实时流上运行。

我正在使用来自image_pipeline的最新拉动的Indigo。我希望错误不是因为我使用Indigo而不是更稳定的ROS版本。

这是我的终端转储:

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

这是我对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>

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>

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

感谢您的帮助!这不是解决方案,但它给了我正确的方向。

确实,我的.yaml校准文件有问题。问题是SVO库需要另一种格式的校准文件。为了生成校准文件,我使用了image_pipeline的cameracalibrator。不幸的是,该库需要ATAN格式的校准文件。使用此ATAN相机型号校准单目相机的工具可在此处找到:

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

我希望,我可以帮助遇到同样问题的其他人!