rtabmap_ros: transformation error

I’m trying to make octomap with stereo camera.I have launched like this,

**> ROS_NAMESPACE=/stereo_camera rosrun ueye stereo which will publish

/stereo_camera/camera/parameter_descriptions /stereo_camera/camera/parameter_updates /stereo_camera/left/camera_info /stereo_camera/left/image_raw /stereo_camera/right/camera_info /stereo_camera/right/image_raw after i have launched the demo_stereo_outdoor.launch file with some modification like below,

<launch>  
<arg name="rviz" default="true" /> <arg name="rtabmapviz" default="false" /> <param name="use_sim_time" type="bool" value="false"/> <group ns="/stereo_camera" > <node pkg="nodelet" type="nodelet" name="stereo_nodelet" args="manager"/>
  <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">

  </node>
</group> <group ns="rtabmap">
  <!-- Stereo Odometry -->   
  <node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen">
     <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_odometry"/>

     <param name="frame_id"      type="string" value="base_footprint"/>
     <param name="odom_frame_id" type="string" value="odom"/>

     <param name="Odom/Strategy"      type="string" value="0"/> <!-- 0=Frame-to-Map, 1=Frame=to=Frame -->
     <param name="Vis/EstimationType" type="string" value="0"/> <!-- 0=3D->3D 1=3D->2D (PnP) -->
     <param name="Vis/MaxDepth"       type="string" value="10"/>
     <param name="Vis/MinInliers"     type="string" value="10"/>
     <param name="Odom/FillInfoData"  type="string" value="$(arg rtabmapviz)"/> 
     <param name="GFTT/MinDistance"   type="string" value="10"/>
     <param name="GFTT/QualityLevel"  type="string" value="0.00001"/> 
  </node>

  <!-- Visual SLAM: args: "delete_db_on_start" and "udebug" -->
  <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
     <param name="frame_id"         type="string" value="base_footprint"/>
     <param name="subscribe_stereo" type="bool" value="true"/>
     <param name="subscribe_depth"  type="bool" value="false"/>

     <remap from="left/image_rect"   to="/stereo_camera/left/image_rect_color"/>
     <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_odometry"/>

     <param name="queue_size" type="int" value="30"/>

     <!-- RTAB-Map's parameters -->
     <param name="Rtabmap/TimeThr"                   type="string" value="700"/>
     <param name="Kp/MaxFeatures"                    type="string" value="200"/>
     <param name="Kp/MaxDepth"                       type="string" value="10"/>
     <param name="Kp/DetectorStrategy"               type="string" value="0"/>   <!-- use SURF -->
     <param name="SURF/HessianThreshold"             type="string" value="1000"/>
     <param name="Vis/EstimationType"                type="string" value="0"/>   <!-- 0=3D->3D, 1=3D->2D (PnP) -->
     <param name="RGBD/LoopClosureReextractFeatures" type="string" value="true"/>
     <param name="Vis/MaxDepth"                      type="string" value="10"/>
  </node>

  <node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
     <param name="subscribe_stereo"    type="bool" value="true"/>
     <param name="subscribe_odom_info" type="bool" value="true"/>
     <param name="queue_size"          type="int" value="10"/>
     <param name="frame_id"            type="string" value="base_footprint"/>

     <remap from="left/image_rect"  to="/stereo_camera/left/image_rect_color"/>
     <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_info"         to="odom_info"/>
     <remap from="odom"              to="/stereo_odometry"/>
     <remap from="mapData"           to="mapData"/>
  </node>
</group> <node if="$(arg rviz)" pkg="rviz" type="rviz" name="rviz" args="-d $(find rtabmap_ros)/launch/config/demo_stereo_outdoor.rviz"/> </launch>



also i do the transformation from camera frame id which is /left using rosrun tf static_publisher 0 0 0 0 0 0 base_footprint left 100.
But the transformation doesn't work.I'm getting the following error

odometry: Could not get transform from base_footprint to /left (stamp=1467028492.328837) after 0.100000 seconds (“wait_for_transform_duration”=0.100000)! The stereo baseline (-0.223329) should be positive (baseline=-Tx/fx). We assume a horizontal left/right stereo setup where the Tx (or P(0,3)) is negative in the right camera info msg. I have executed the tutorial with rosbag,it works fine (i can see the octomap if i launch octomap_server_node).

why the transformation is not working? Am i missing anything in the launch file?

Thanks in advance,

-Arun

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 32 (16 by maintainers)

Most upvoted comments

Hi,

It looks like that published images by ueye stereo are not synchronized, the left and right images have different timestamps. You should set approx_sync to true for stereo_odometry node and stereo_approx_sync to true for rtabmap node.

The message:

The stereo baseline (-0.223329) should be positive (baseline=-Tx/fx). We assume a horizontal left/right stereo setup where the Tx (or P(0,3)) is negative in the right camera info msg.

tells that there is a problem with the calibration. Did you use this tutorial to calibrate the cameras?

cheers