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

Pose going up and constant "Visual Odometry got Lost!" message

asked 2015-02-07 06:31:26 -0500

Athria gravatar image

updated 2015-02-12 10:25:37 -0500

Hello, I'm using the viso2_ros' stereo node with Ubuntu 12.04 and ROS Hydro. My setup consists of two webcams attached to a steady surface at a distance of 17.3 cm from each other and calibrated with the stereo camera_calibration.

I am viewing in Rviz the Pose and Point_cloud published by the node and after a few seconds of running, the Pose starts shooting up:

the pose vector goes up from the point where the pink arrow is at

I also get a the "Visual Odometry got Lost!" message frequently. I checked the ~info topic and this was the outcome:

Messages published by the ~info topic

I read the FAQs for the package and I tried to apply the solutions given to people with similar issues. So I reset the odometer by calling the stereo_odometer/reset_pose service and changed the match_disp_tolerance parameter.

Reseting the odometer didn't work because the pose went back down to the grid but after a few seconds it was going up again.

I increased the match_disp_tolerance parameter from 5 (the value that it had by default) to 20 and then to 100. For some reason the number of "Visual Odometry got Lost!" messages increased with the parameter, and I think it worked the best with the original value.

changing match_disp_tolerance to 20

I thought the problem might be that the number of inliers was too low, but even if i changed the background drastically the number of inliers didn't remain high for long (sometimes I get a lot of inliers but after a few seconds, without moving the camera, they decrease to less than 10, then they go up again and so on). This is the image I was viewing for the messages on some of the screenshots above:

background

And this is the launch file I'm using:

<!-- Arguments -->
<arg name="camera" default="/stereo" /> <!-- The namespace where images are published -->


<!-- Run the camera -->
    <group ns="stereo" >
        <node pkg="uvc_camera" type="uvc_stereo_node" name="uvc_stereo_node">
            <param name="left/device" type="string" value="/dev/video1" />
            <param name="right/device" type="string" value="/dev/video2" />
    </node>
</group>

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

<!-- Publish transforms -->

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


<!-- Run the viso2_ros package -->

<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_rect"/>
    <param name="match_disp_tolerance" type="int" value=“20” />  <!-- Set to 5 by default -->
</node>

<!-- Run Rviz -->   
<node pkg="rviz" type="rviz" name="rviz">
</node>

Since I was getting the "Visual Odometry got Lost!" message constantly, I decided to test the odometry of the stereo camera without the robot, that's why I publish the tf with arguments 0 0 0 0 0 0 1 base_link camera 100. I still have some trouble grasping the tfs so I didn't want to add any mistake with them to my current problem.

I'm not sure if I'm doing something wrong or if my cameras are not good enough to use the package ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2015-02-11 04:32:23 -0500

Miquel Massot gravatar image

updated 2015-02-13 01:54:48 -0500

In my opinion, your stereo pair does not look well calibrated. The disparity image should show at least some structure. Could you tell me which was your score when you calibrated the stereo rig? The number that appears after the calibration is the reprojection error in pixels. A number below 0.6 or 0.4 is desirable.

The calibration should also show that a particular feature in the left image can be found in the same row in the right image. By visual inspection at your image pairs, these images are not correctly calibrated.

As suggested by Stephan, use a rigid calibration pattern or glue that piece of paper to something rigid and flat. Now is looking better, but you should achieve a better calibration.

Try to follow this tutorial with your images. Your disparity image should look like this image looks in the tutorial. Which are your stereo params?

edit flag offensive delete link more

Comments

Hello, thank you very much for the answer, I didn't know the value of the error, so I recalibrated again. This was the best calibration I could get:

Calibration outcomeCalibration outcome reprojection error

Athria gravatar image Athria  ( 2015-02-11 10:16:22 -0500 )edit

Sometimes the error is as low as 0.42 and others as high as 1.8 (if i move the pattern fast) for that calibration. I tried again to use Viso2 but I got pretty much the same results, so I guess the calibration is still bad. Is there a way to improve it? I can't get the Size bar higher. Thank you!

Athria gravatar image Athria  ( 2015-02-11 10:19:43 -0500 )edit
1

That looks better then before. Be sure to move the calibration pattern to each corner, very close, very far away and tilted to all sides. Move slowly. It looks like it is just a piece of paper? You have to make sure that it does not bend so glue it onto something rigid.

Stephan gravatar image Stephan  ( 2015-02-11 12:24:32 -0500 )edit

Hello, I was using the default stereo params, I had tried to follow that tutorial before but I never managed to get anything similar to their images. I've been trying again and this is as close as I could get by following the tutorial's advice: best image

Athria gravatar image Athria  ( 2015-02-13 11:13:45 -0500 )edit

I also tweaked my stereo camera params a bit, to try and get a better image and I ended up with this parameters: With tweaked params1 and With tweaked params2

Athria gravatar image Athria  ( 2015-02-13 11:24:32 -0500 )edit

Sorry for the late comment. We are using these params.

Miquel Massot gravatar image Miquel Massot  ( 2015-03-16 12:45:43 -0500 )edit

Thank you very much! I'll keep working on my params

Athria gravatar image Athria  ( 2015-03-21 03:07:14 -0500 )edit

Are you getting good odometry results?

Sai Anirudh Kondaveeti gravatar image Sai Anirudh Kondaveeti  ( 2015-07-28 12:37:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-07 06:31:26 -0500

Seen: 787 times

Last updated: Feb 13 '15