Ask Your Question
0

No image_rect after remapping and rtabmap not publishing map data

asked 2015-05-19 10:28:11 -0500

F.Brosseau gravatar image

updated 2015-05-20 10:13:52 -0500

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/Tutor... ) 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 -->

<node name="republish_left" type="republish" pkg="image_transport" args="compressed in:=$(arg camera)/left/image_raw raw out:=$(arg camera)/left/image_raw_throttle_relay"/> <node name="republish_right" type="republish" pkg="image_transport" args="compressed in:=$(arg camera)/right/image_raw raw out:=$(arg camera)/right/image_raw_throttle_relay"/>

<!-- STEREO ODOMETRY -->

<node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen"> <remap from="left/image_rect" to="$(arg camera)/left/image_rect"/> <remap from="right/image_rect" to="$(arg camera)/right/image_rect"/> <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="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"/>

</node>

<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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-05-20 09:11:26 -0500

matlabbe gravatar image

updated 2015-05-20 12:42:26 -0500

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?

edit flag offensive delete link more

Comments

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.

F.Brosseau gravatar imageF.Brosseau ( 2015-05-21 03:14:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-05-19 10:28:11 -0500

Seen: 473 times

Last updated: May 20 '15