rgbd_odometry does not pose anythintg

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rgbd_odometry does not pose anythintg

Megacephalo
Hi,

Recently I putting my navigation stack together and want to use RGB-D odometry as my primary odometry, but once I fire up the rgbd_odometry as indicated on this tutorial page with my own corresponding topics, there is nothing publishing out of the node. Do I missed something ? What is the proper way to make /rgbd_odometry publish topics all the time? Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: rgbd_odometry does not pose anythintg

matlabbe
Administrator
Hi,

When rgbd_odometry is started, you should see topics to which it is subscribed. Make sure that all input topics are published (e.g., you can use "$ rostopic hz my_topic" to verify). It you set output as screen, you should see messages appearing on the terminal (even if the odometry cannot be computed):
<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
  <param name="frame_id"        type="string" value="camera_link"/>
  <param name="subscribe_depth" type="bool"   value="true"/>
  <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
  <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
  <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
</node>
You may see warnings on the terminal if something is wrong (e.g., TF problems or images not compatible).

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rgbd_odometry does not pose anythintg

Megacephalo
Hi,

Thanks for replying so fast! I modified to add some more parameters you indicated in your reply. I double check if the node gets every topic it needs as follows:

Node [/rgbd_odometry]
Publications:
 * /rgbd_odom [nav_msgs/Odometry]
 * /tf [tf/tfMessage]
 * /rosout [rosgraph_msgs/Log]
 * /odom_local_map [sensor_msgs/PointCloud2]
 * /odom_last_frame [sensor_msgs/PointCloud2]
 * /odom_info [rtabmap_ros/OdomInfo]

Subscriptions:
 * /camera/rgb/image_raw [sensor_msgs/Image]
 * /tf [tf/tfMessage]
 * /camera/rgb/camera_info [sensor_msgs/CameraInfo]
 * /tf_static [tf2_msgs/TFMessage]
 * /camera/depth/image_raw [sensor_msgs/Image]
 * /clock [rosgraph_msgs/Clock]

and set output="screen". From the warnings it seems that the odometry is working, but the warnings appear in between the infos, like these lines that I extracted:

[ INFO] [1461744454.319656827, 792.447000000]: Odom: quality=0, std dev=0.000000m, update time=0.029590s
[ WARN] (2016-04-27 16:07:34.391) OdometryBOW.cpp:318::computeTransform() Local map too small!? (3 < 20)
[ INFO] [1461744454.392321245, 792.497000000]: Odom: quality=0, std dev=0.000000m, update time=0.027326s
[ WARN] (2016-04-27 16:07:34.453) OdometryBOW.cpp:318::computeTransform() Local map too small!? (3 < 20)
[ INFO] [1461744454.453368104, 792.537000000]: Odom: quality=0, std dev=0.000000m, update time=0.017773s

well, at least it is much better of detecting something 3<20 rather than 0<20 as before. I thought this may due to a lack of minimum required number of features, since the simulated environment is kind of featuresless, as shown in the picture below



So I added the following parameters

  <node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
      <remap from="rgb/image"       to="/camera/rgb/image_raw"/>
      <remap from="depth/image"     to="/camera/depth/image_raw"/>
      <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
      <remap from="/odom" to="/rgbd_odom"/> 
      <remap from="scan" to="/beebot/laser/scan" />
      < param name="frame_id" type="string" value="camera_link"/>
      < param name="subscribe_depth" type="bool"   value="true"/>
      < param name="Odom/Holonomic" type="bool" value="false" />
      < param name="Odom/MaxFeatures" type="int" value="0" />
      < param name="Odom/ParticleSize" type="int" value="5000" />
      < param name="RGBD/PoseScanMatching" type="string" value="true" />
  </node>

and thus I get the following kind of messsages:

[ INFO] [1461746823.867357842, 1087.660000000]: Odom: quality=0, std dev=0.000000m, update time=0.027174s
[ WARN] (2016-04-27 16:47:03.924) OdometryBOW.cpp:318::computeTransform() Local map too small!? (11 < 20)
[ INFO] [1461746823.924531255, 1087.696000000]: Odom: quality=0, std dev=0.000000m, update time=0.024988s
[ WARN] (2016-04-27 16:47:03.986) OdometryBOW.cpp:318::computeTransform() Local map too small!? (11 < 20)
[ INFO] [1461746823.986350252, 1087.733000000]: Odom: quality=0, std dev=0.000000m, update time=0.024611s
[ WARN] (2016-04-27 16:47:04.082) OdometryBOW.cpp:318::computeTransform() Local map too small!? (11 < 20)
[ INFO] [1461746824.082515543, 1087.778000000]: Odom: quality=0, std dev=0.000000m, update time=0.036423s

At this point, rgbd_odometry still cannot publish any odometry messages. Why is that ? Thank you so much !

Cheers !
Reply | Threaded
Open this post in threaded view
|

Re: rgbd_odometry does not pose anythintg

matlabbe
Administrator
Hi,

Visual odometry and loop closure detection may not work in a simulated environment without enough discriminative visual features.

For this environment and if you have a lidar, you may prefer to use laser-based mapping approaches like gmapping or hector_slam.

With rtabmap, you could use wheel odometry instead of visual odometry. Note that RTAB-Map may not be able to detect loop closures in this environment.

In your launch example, there are some parameters mixed between rgbd_odometry and rtabmap nodes. "Odom/ParticleSize" is also not used by default (only for advanced usage):
<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
      <remap from="rgb/image"       to="/camera/rgb/image_raw"/>
      <remap from="depth/image"     to="/camera/depth/image_raw"/>
      <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
      <remap from="odom" to="/rgbd_odom"/>  
      < param name="frame_id" type="string" value="camera_link"/> 
      < param name="subscribe_depth" type="bool"   value="true"/> 
      < param name="Odom/Holonomic" type="bool" value="false" /> 
      < param name="Odom/MaxFeatures" type="int" value="0" /> 
</node>
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen">
      <remap from="rgb/image"       to="/camera/rgb/image_raw"/>
      <remap from="depth/image"     to="/camera/depth/image_raw"/>
      <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
      <remap from="odom" to="/rgbd_odom"/>  
      <remap from="scan" to="/beebot/laser/scan" />
      < param name="frame_id" type="string" value="camera_link"/> 
      < param name="subscribe_depth" type="bool"   value="true"/> 
      < param name="RGBD/PoseScanMatching" type="string" value="true" /> 
</node>

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rgbd_odometry does not pose anythintg

Megacephalo
Thank you !

Understood. In fact I am using robot_localization with hector_slam together with the onboard wheel odometry to boost the precision of pose estimation. I hope for the real environment, rgbd_odometry would work like a charm. Thanks for the help !