rtabmap barely finds features in simulated stereo image
I am using rtabmap_ros
with a simulated stereo camera in gazebo, but I am struggeling to get the stereo_odometry
node computing any transformation.
The problem is that too few (mostly not even one) features are found in my camera images. Which is confusing me, since my own implementation of GFTT finds plenty of features in the same images.
Am I getting anything wrong? Are there more requirements on the visual features for rtabmap for visual odometry?
Considering the following setup, where I am using GFTT feature detector:
<node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry">
<remap from="left/image_rect" to="/stereo_camera/left/image_rect"/>
<remap from="right/image_rect" to="/stereo_camera/right/image_rect"/>
<remap from="left/camera_info" to="/stereo_camera/left/camera_info"/>
<remap from="right/camera_info" to="/stereo_camera/right/camera_info"/>
<remap from="odom" to="/stereo_odometer/odometry"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="odom_frame_id" type="string" value="odom"/>
<param name="publish_tf" value="true" />
<param name="Odom/InlierDistance" type="string" value="20"/>
<param name="Odom/MinInliers" type="string" value="10"/>
<param name="Odom/FeatureType" type="string" value="4"/>
<param name="GFTT/UseHarrisDetector" type="string" value="false"/>
<param name="GFTT/BlockSize" type="string" value="3"/>
<param name="GFTT/K" type="string" value="0.1"/>
<param name="GFTT/MinDistance" type="string" value="20"/>
<param name="GFTT/QualityLevel" type="string" value="0.005"/>
<param name="Odom/MaxFeatures" type="string" value="1000"/>
<param name="Odom/Strategy" type="string" value="1"/>
</node>
The output of rostopic echo /odom_info
says, I get a total amount of 2 recognized features in a particular scene (see attached image below):
---
header:
seq: 387
stamp:
secs: 1615
nsecs: 663000000
frame_id: odom
lost: True
matches: 2
inliers: 0
variance: 0.0
features: 0
localMapSize: -1
timeEstimation: 0.00351881980896
timeParticleFiltering: 4.57832234264e-41
stamp: 1615.66296387
interval: 0.10000000149
distanceTravelled: 0.0
type: 1
wordsKeys: []
wordsValues: []
wordMatches: []
wordInliers: []
refCorners:
-
x: 599.0
y: 419.0
-
x: 602.0
y: 421.0
newCorners:
-
x: 323.645477295
y: 419.167877197
-
x: 332.146850586
y: 421.871734619
cornerInliers: []
transform:
translation:
x: 0.0
y: 0.0
z: 0.0
rotation:
x: 0.0
y: 0.0
z: 0.0
w: 0.0
transformFiltered:
translation:
x: 0.0
y: 0.0
z: 0.0
rotation:
x: 0.0
y: 0.0
z: 0.0
w: 0.0
---
However, my own implementation of GFTT in OpenCV using the same parameters finds a plenty of features. The following image shows the features from my implementation. The same image was fed into the stereo_odometry
node. Is there any hint why stereo_odometry
finds only two features?
Edit: Example output of stereo_odometry
[ WARN] (2015-09-30 11:23:52.840) util3d_registration.cpp:173::transformFromXYZCorrespondences() RANSAC refineModel: Refinement failed: got an empty set of inliers!
[ WARN] (2015-09-30 11:23:52.840) OdometryOpticalFlow.cpp:403::computeTransform() Transform not valid (inliers = 0/14)
[ INFO] [1443605032.840375078, 364.936000000]: Odom: quality=0, std dev=0.000000m, update time=0.005786s
Edit2 : Here is an example disparity map of my scene: https://goo.gl/photos/6SPKukujRP6fBQpLA
Edit3 : example bag file: https://drive.google.com/file/d/0B_p8...
Can you record a small rosbag? It can be just 10 seconds...
rosbag record /stereo_camera/left/image_rect/compressed /stereo_camera/right/image_rect/compressed /stereo_camera/left/camera_info /stereo_camera/right/camera_info /tf