problem with viso2 "visual odometer got lost" [closed]

asked 2014-01-20 18:56:21 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

hi i am having some problem with the viso2 package's stereo odometry,it gives me "visual odometer got lost" when i am trying to run the launch file.I am currently using 2 Ueye UI-1226LE - USB 2.0 Camera for the stereo odometry.Below are the error that it gives me.

SUMMARY
========

PARAMETERS
 * /dynparam_ubuntu_14461_8489014763432242877/auto_exposure
 * /dynparam_ubuntu_14461_8489014763432242877/frame_rate
 * /dynparam_ubuntu_14461_8489014763432242877/l_pixel_clock
 * /dynparam_ubuntu_14461_8489014763432242877/r_pixel_clock
 * /dynparam_ubuntu_14461_8489014763432242877/zoom
 * /kitty_stereo/stereo_image_proc/correlation_window_size
 * /kitty_stereo/stereo_image_proc/disparity_range
 * /kitty_stereo/stereo_image_proc/min_disparity
 * /kitty_stereo/stereo_image_proc/prefilter_cap
 * /kitty_stereo/stereo_image_proc/prefilter_size
 * /kitty_stereo/stereo_image_proc/speckle_range
 * /kitty_stereo/stereo_image_proc/speckle_size
 * /kitty_stereo/stereo_image_proc/texture_threshold
 * /kitty_stereo/stereo_image_proc/uniqueness_ratio
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /kitty_stereo/
    stereo_image_proc (stereo_image_proc/stereo_image_proc)
  /
    base_link_to_camera (tf/static_transform_publisher)
    dynparam_ubuntu_14461_8489014763432242877 (dynamic_reconfigure/dynparam)
    rosbag (rosbag/play)
    stereo_odometer (viso2_ros/stereo_odometer)

ROS_MASTER_URI=http:// localhost:11311

core service [/rosout] found
process[base_link_to_camera-1]: started with pid [14521]
process[rosbag-2]: started with pid [14539]
process[kitty_stereo/stereo_image_proc-3]: started with pid [14556]
process[stereo_odometer-4]: started with pid [14577]
[ INFO] [1390285927.188771517]: Subscribing to:
    * /kitty_stereo/left/image_rect
    * /kitty_stereo/right/image_rect
    * /kitty_stereo/left/camera_info
    * /kitty_stereo/right/camera_info
process[dynparam_ubuntu_14461_8489014763432242877-5]: started with pid [14602]
[ INFO] [1390285927.228780458]: Basic Odometer Settings:
  odom_frame_id      = /odom
  base_link_frame_id = /base_link
  publish_tf         = true
[ INFO] [1390285928.211526383, 1385798595.722205257]: Retrieving initial transform for /base_link to /camera.
[ INFO] [1390285928.211638745, 1385798595.722205257]: Initialized libviso2 stereo odometry with the following parameters:
Calibration parameters:
  f  = 1504.27
  cu = 188.791
  cv = 59.5449
Matcher parameters:
  nms_n                  = 3
  nms_tau                = 50
  match_binsize          = 50
  match_radius           = 200
  match_disp_tolerance   = 2
  outlier_disp_tolerance = 5
  outlier_flow_tolerance = 5
  multi_stage            = 1
  half_resolution        = 1
  refinement             = 1
Bucketing parameters:
  max_features  = 2
  bucket_width  = 50
  bucket_height = 50
Stereo odometry parameters:
  base             = 0.281359
  ransac_iters     = 200
  inlier_threshold = 1.5
  reweighting      = 1
  ref_frame_change_method = 0
  ref_frame_motion_threshold = 5
  ref_frame_inlier_threshold = 150
[ WARN] [1390285928.216198038, 1385798595.722205257]: Visual Odometer got lost!
[dynparam_ubuntu_14461_8489014763432242877-5] process has finished cleanly
log file: /home/acsc/.ros/log/a56e242a-8245-11e3-bf8d-48022a9ad0c5/dynparam_ubuntu_14461_8489014763432242877-5*.log
[ WARN] [1390285929.245663614, 1385798596.751227928]: Visual Odometer got lost!
[ WARN] [1390285930.250121013, 1385798597.777895990]: Visual Odometer got lost!
[ WARN] [1390285931.248951670, 1385798598.781152478]: Visual Odometer got lost!
[ WARN] [1390285932.318369814, 1385798599.847003310]: Visual Odometer got lost!
[ WARN] [1390285933.353832605, 1385798600.882260371]: Visual Odometer got lost!
[ WARN] [1390285934.417855748, 1385798601.942012156]: Visual Odometer got lost!
[ WARN] [1390285935.456077597, 1385798602.975817837]: Visual Odometer got lost!
[ WARN] [1390285936.456490832, 1385798603.986285772]: Visual Odometer got lost!
[ WARN] [1390285937.527047462, 1385798605.048900696]: Visual Odometer got lost!
[ WARN] [1390285938.559818811, 1385798606.088479625]: Visual Odometer got lost!
[ WARN] [1390285939.594780232, 1385798607.122738611]: Visual Odometer got lost!

and this is the launch file i am currently using

<launch>

    <!-- Arguments -->
    <arg name="kitty_01" default="/home/acsc/fuerte_workspace/sandbox/kitti_01.bag"/> <!-- Your bagfile here -->
    <arg name="camera" default="/kitty_stereo" /> <!-- The namespace where images are published -->
    <arg name="disparity_params" default="/home/acsc/fuerte_workspace/sandbox/disparity_params.yaml"/> <!-- Camera calibration parameters -->

    <param name="/use_sim_time" value="true"/>

<node pkg="tf" type="static_transform_publisher" name="base_link_to_camera" args="0 0 0 0 0 0 /base_link /camera 100 " />

    <!-- Run the rosbag -->
    <node pkg="rosbag" type="play" name="rosbag" args="--clock $(arg kitty_01)"/>

    <!-- Run the ROS package stereo_image_proc -->
    <group ns="$(arg camera)" >
        <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">
            <rosparam file="$(arg disparity_params)"/>
        </node>
    </group>

    <!-- Run the viso2_ros package -->
    <node pkg="viso2_ros ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-08-14 01:47:11.356286

Comments

Your parameters and launch file look alright. Have you checked the `/stereo_odometer/info` topic? Does the disparity image of your stereo system look good? You can also have a look at the point cloud published by the odometer to see if features are detected. Do you get errors without motion?

Stephan gravatar image Stephan  ( 2014-01-23 21:25:45 -0500 )edit

Hi the disparity image of stereo system looks fine,I get errors even without motion.Does the tf have something to do with the error?can you show me what should I do for the tf as I am not very sure.as for the others can I get back to you in 2 days time cause I am currently away.thanks for the help

desmond gravatar image desmond  ( 2014-01-23 21:59:21 -0500 )edit

hi i have added the result that i have got from the /stereo_odometer/info topic above.

desmond gravatar image desmond  ( 2014-01-26 13:26:47 -0500 )edit

For the point cloud i tried using rviz but it gives me a error "For frame [/camera]: No transform to fixed frame [/odom]. TF error: [Unable to lookup transform, cache is empty, when looking up transform from frame [/camera] to frame [/odom]]"

desmond gravatar image desmond  ( 2014-01-26 13:26:51 -0500 )edit

hi i have also notice that after a certain amount of time the program will say "[rosbag-2] process has finished cleanly".The bagfile i am using is "set_01 (grayscale)" from www6.in.tum.de/~kloses/rvc/kitti_bags/

desmond gravatar image desmond  ( 2014-01-26 13:32:16 -0500 )edit

12 matches with 6 inliers is poor. viso2 works normally with thousands of matches. It seems that either your system is not well calibrated or the scene has no features. For rviz, try setting the fixed frame to your cam frame. As VO calculation fails, odom->base_link is not published by viso2_ros.

Stephan gravatar image Stephan  ( 2014-01-27 00:10:04 -0500 )edit

ok thanks,for the base_line of the camera if the calculated base_line is 0.281 meter while my actual base_line is 0.285 meter does it make a huge difference? For the length of the chessboard square i use is 0.093 meter is it ok?

desmond gravatar image desmond  ( 2014-01-27 01:47:06 -0500 )edit

And from what you see is there any problem with my code or is it the problem with the calibration or the scene has no features?

desmond gravatar image desmond  ( 2014-01-27 01:47:59 -0500 )edit