0
$\begingroup$

Rosanswers logo

Hello everybody, I use ROS Hydro for several week now and I need some help.

I am trying to build a map with stereovision. To do that, I am working with stereo_image_proc and rtabmap_ros.

I used this tutorial (http://wiki.ros.org/rtabmap_ros/Tutorials/StereoOutdoorMapping#A3D_Mapping) to help me.

The problem is that, I don't have any image from my /artemis/navCam/left/image_rect topic. But it was working before I used remap tag.

<!--Point cloud and disparity image from stereovision-->
<node
    name="stereo_image_proc"
    pkg="stereo_image_proc"
    type="stereo_image_proc">
        <env name="ROS_NAMESPACE" value="/artemis/navCam" />
        <remap from="left/image_raw"    to="left/image_raw_throttle_relay"/>
        <remap from="left/camera_info"  to="left/camera_info_throttle"/>
        <remap from="right/image_raw"   to="right/image_raw_throttle_relay"/>
        <remap from="right/camera_info" to="right/camera_info_throttle"/>
        <param name="disparity_range" value="128"/>
</node> 

<node
    name="stereo_image_proc2"
    pkg="stereo_image_proc"
    type="stereo_image_proc">
        <env name="ROS_NAMESPACE" value="/artemis/odoCam" />
</node> 

The image_rect topics are working with the odoCam part. Is there something special with the remap tag ?

The other problem is that I can't see maps in Rviz.(I supposed it happens because of the previous error) I have a message like : no tf existing from [] to [artemisBody]

See a part of my roslaunch file below:

<!--Point cloud and disparity image from stereovision-->
<node
    name="stereo_image_proc"
    pkg="stereo_image_proc"
    type="stereo_image_proc">
        <env name="ROS_NAMESPACE" value="/artemis/navCam" />
        <remap from="left/image_raw"    to="left/image_raw_throttle_relay"/>
        <remap from="left/camera_info"  to="left/camera_info_throttle"/>
        <remap from="right/image_raw"   to="right/image_raw_throttle_relay"/>
        <remap from="right/camera_info" to="right/camera_info_throttle"/>
        <param name="disparity_range" value="128"/>
</node>

<node
    name="stereo_image_proc2"
    pkg="stereo_image_proc"
    type="stereo_image_proc">
        <env name="ROS_NAMESPACE" value="/artemis/odoCam" />
</node>

<!-- Just to uncompress images for stereo_image_rect -->
<!-- STEREO ODOMETRY -->
  <param name="frame_id" type="string" value="artemisBody"/>
  <param name="odom_frame_id" type="string" value="odom"/>

  <param name="Odom/InlierDistance" type="string" value="0.1"/>
  <param name="Odom/MinInliers" type="string" value="10"/>
  <param name="Odom/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
  <param name="Odom/MaxDepth" type="string" value="10"/>
  
  <param name="GFTT/MaxCorners" type="string" value="500"/>
  <param name="GFTT/MinDistance" type="string" value="5"/>
<group ns="rtabmap"> 
  <!-- 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="artemisBody"/>
     <param name="subscribe_stereo" type="bool" value="true"/>
     <param name="subscribe_depth" type="bool" value="false"/>

     <remap from="left/image_rect" to="$(arg camera)/left/image_rect_color"/>
     <remap from="right/image_rect" to="$(arg camera)/right/image_rect_color"/>
     <remap from="left/camera_info" to="$(arg camera)/left/camera_info_throttle"/>
     <remap from="right/camera_info" to="$(arg camera)/right/camera_info_throttle"/>

     <remap from="odom" to="$(arg camera)/odometry"/>

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

     <!-- RTAB-Map's parameters -->
     <param name="Rtabmap/TimeThr" type="string" value="700"/>
     <param name="Rtabmap/DetectionRate" type="string" value="1"/>
     
     <param name="Kp/WordsPerImage" type="string" value="200"/>
     <param name="Kp/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>

     <param name="SURF/HessianThreshold" type="string" value="1000"/>

     <param name="LccBow/MaxDepth" type="string" value="10"/>
     <param name="LccBow/MinInliers" type="string" value="10"/>
     <param name="LccBow/InlierDistance" type="string" value="0.02"/>

     <param name="LccReextract/Activated" type="string" value="true"/>
     <param name="LccReextract/MaxWords" type="string" value="400"/>
     
     <!-- Disable graph optimization because we use map_optimizer node below -->
     <param name="RGBD/OptimizeIterations" type="string" value="0"/> 
  </node>

  <!-- Optimizing outside rtabmap node makes it able to optimize always the global map -->
 <node pkg="rtabmap_ros" type="map_optimizer" name="map_optimizer"/>
     
<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
  <remap from="stereo" to="$(arg camera)"/> 
  <remap from="image" to="image_raw_throttle_relay"/>
  <remap from="$(arg camera)/odometry" to="odometry" />

  <param name="base_link_frame_id" value="artemisBody"/>
  <param name="odom_frame_id" value="odom"/>
  <param name="ref_frame_change_method" value="1"/>
  <param name="queue_size" value="30"/>
<!--Open Rviz-->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rtabmap_ros)/launch/config/stereo_outdoor_demo.rviz" required="true" />

EDIT : The second problem is resolved but I still don't have any map data. I am using the MapCloud plugin in Rviz in order to see something on /rtabmap/mapData topic but nothing seems to be published on it.

I also tried to see /rtabmap/grid_map with 'Map' but I have a warning with 'No map received'.

Question : Is there some services to call in order to create a map ? (i have tried some services like publish map and get map)

Thanks in advance.


Originally posted by F.Brosseau on ROS Answers with karma: 379 on 2015-05-19

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The tutorial you are referring are using topics saved in the ros bags provided (with suffix "throttle"). What are the topics sent in the "/artemis/navCam" namespace by your stereo camera? You probably not need a remap at all for the stereo_image_proc, as well as all the republish nodes.

EDIT1: You have two stereo odometry nodes running (rtabmap_ros/stereo_odometry and viso2_ros/stereo_odometer). Use only one.

EDIT2: Make sure that all the rtabmap input topics you set are really published:

<remap from="left/image_rect" to="$(arg camera)/left/image_rect_color"/>
<remap from="right/image_rect" to="$(arg camera)/right/image_rect_color"/>
<remap from="left/camera_info" to="$(arg camera)/left/camera_info_throttle"/>
<remap from="right/camera_info" to="$(arg camera)/right/camera_info_throttle"/>
<remap from="odom" to="$(arg camera)/odometry"/>

Using rostopic tool (assuming that $(arg camera) = "camera"):

$ rostopic echo hz camera/left/image_rect_color
$ rostopic echo hz camera/right/image_rect_color
$ rostopic echo hz camera/left/camera_info_throttle
$ rostopic echo hz camera/right/camera_info_throttle
$ rostopic echo hz camera/odometry

Is "throttle" suffix still right?


Originally posted by matlabbe with karma: 6409 on 2015-05-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by F.Brosseau on 2015-05-21:
It works now. You are right, I remove the viso2_ros part. Look like, I lost myself in the remap, so I use the rostopic echo to see which topic were publishing in order to use them in input for the rtabmap node. Thanks a lot for your help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.