【发布时间】:2016-05-29 06:16:24
【问题描述】:
我想为一个机器人项目建立由苏黎世大学 Robotics and Perception Group 的单目视觉里程计系统。项目地址是https://github.com/uzh-rpg/rpg_svo。他们将其实现为 ROS 节点,这真的很酷,但是当我启动 svo_ros 节点 roslaunch svo_ros live.launch 时出现错误:
[ INFO] [1455715165.624976791]: SVO initialized
[ INFO] [1455715165.625768093]: Found parameter: svo/cam_topic, value: /image_raw
[ INFO] [1455715197.445786640]: RESET
*** Error in `/home/user/workspace/indigo/devel/lib/svo_ros/vo': malloc(): memory corruption: 0x0000000001187920 ***
我猜这是由错误的图像大小配置引起的,因此 svo 使用的 OpenCV 函数会破坏处理图像的内存。 我使用 camera_calibration ros 节点校准了我的相机。我将输出转换为 /param/camera_pinhole.yaml 中的 .yaml 文件表示,如下所示
cam_model: Pinhole
cam_width: 644
cam_height: 484
cam_fx: 588.481298
cam_fy: 587.819899
cam_cx: 328.046456
cam_cy: 226.471844
cam_d0: -0.363501
cam_d1: 0.165011
cam_d2: 0.000571
cam_d3: -0.000577
当我从校准数据中获得图像分辨率 644x484 并使用 image_view 包的 image_view 节点确认它时,我会说我配置的图像 cam_width 和 height 是正确的。我什至尝试将launch-filge中的image_width和image_height设置为相同的大小,但它没有改变任何东西。
<launch>
<node pkg="svo_ros" type="vo" name="svo" clear_params="true" output="screen">
<!-- param name="image_width" value="644" type="int" />
<param name="image_height" value="484" type="int" />
<param name="cam_width" value="644" type="int" />
<param name="cam_height" value="484" type="int" / -->
<!-- Camera topic to subscribe to -->
<param name="cam_topic" value="/image_raw" type="str" />
<!-- Camera calibration file -->
<rosparam file="$(find svo_ros)/param/camera_pinhole.yaml" />
<!-- Default parameter settings: choose between vo_fast and vo_accurate -->
<rosparam file="$(find svo_ros)/param/vo_fast.yaml" />
</node>
</launch>
我是否错过了适合任何参数或其他配置,或者有人有其他想法出了什么问题?
提前致谢。
【问题讨论】: