ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

RTABMAP not working with Kinect+Odometry

asked 2016-01-08 05:03:42 -0500

maik_mico gravatar image

updated 2016-01-11 06:01:59 -0500

Hi,

I am trying to use RTAB-MAP with an AGV with a kinnects (Xtion asus pro live) added on top. The system have two computers: 1- (roscore) AGV computer (publishing the odometry, laser scanner, etc..). 2- (where I am running RTAB-map) Computer with kinect.

However, when I launch rtabmap (kinect+odometry), nothing appears. (launching only the kinect works fine).

This is my roslaunch file (including static_tf from base_link to camera_link which is not provided by the AGV):

<launch>
    <!-- TF static transform base_link to camera_link -->
    <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 1.5 0 0 0 /base_link /camera_link 100" />


    <group ns="rtabmap">

    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">

        <param name="frame_id" type="string" value="base_link"/>
        <param name="subscribe_depth" type="bool" value="true"/>

        <remap from="odom" to="/odom_comb"/>
        <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"/>

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

        <!-- RTAB-Map's parameters -->


        <param name="RGBD/AngularUpdate" type="string" value="0.01"/>
        <param name="RGBD/LinearUpdate" type="string" value="0.01"/>
        <param name="Rtabmap/TimeThr" type="string" value="700"/>
        <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
        <param name="RGBD/OptimizeFromGraphEnd" type="string" value="true"/>

    </node>
    </group>


    <!-- Visualisation RTAB-Map -->
    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz"  output="screen">
        <param name="subscribe_depth"     type="bool"   value="true"/>
        <param name="subscribe_laserScan"      type="bool"   value="false"/>
        <param name="subscribe_odom_info" type="bool"   value="false"/>
        <param name="frame_id"            type="string" value="base_link"/>

        <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>

</launch>

I suspect that the problem is on the TF tree due to publishing transforms from 2 different computers. The tf tree (without unning RTABMAP) can be seen here: agv+static_pub+rtabmap (I cannot attach pictures due to not having enough points on this forum).

Also, the output from roswtf is:


WARNING The following node subscriptions are unconnected: 
    * /SerialProxy:
    * /serial0_rx
    * /web_map_generator:
    * /move_base_node/local_costmap/inflated_obstacles
 * /supervisor:
   * /move_base_node/MIRPlannerROS/len_to_goal
 * /rtabmap/rtabmap:
   * /tf_static
   * /rtabmap/move_base/feedback
   * /rtabmap/move_base/status
   * /rtabmap/goal
   * /rtabmap/goal_node
   * /rtabmap/move_base/result
 * /mirEventTrigger:
   * /event_cmd
 * /rtabmapviz:
   * /goal_reached
   * /goal_node
   * /odom
   * /mapData
   * /tf_static
   * /global_path
   * /info
WARNING The following nodes are unexpectedly connected:
 * /laser_back/driver->/roswtf_12815_1452249335691 (/tf)
 * /mirSound->/bridge (/rosout)
 * /laser_front/driver->/roswtf_12815_1452249335691 (/tf)
 * unknown (http://192.168.12.20:40313/)->/mirSound (/mir_sound)
 * unknown (http://192.168.12.20:50779/)->/mirSound (/mir_sound)
 * /bridge->/bridge (/rosout)
 * unknown (http://192.168.12.20:59477/)->/mirSound (/mir_sound)
 * /bridge_api->/bridge (/rosout)
 * /rtabmap/rtabmap->/roswtf_12815_1452249335691 (/tf)
WARNING These nodes have died:
 * mir_param_publisher-1
WARNING Received out-of-date/future transforms:
 * receiving transform from [/StateTF] that differed from ROS time by 28611.7888631s
 * receiving transform from [/transform_footprint] that differed from ROS time by 28611.7991738s
 * receiving transform from [/laser_back/transform] that differed from ROS time by 28611.7992606s
 * receiving transform from [/transform_imu] that differed from ROS time by 28611.7991301s
 * receiving transform from [/mir_amcl] that differed from ROS time by 28611.984325s
 * receiving ...
(more)
edit retag flag offensive close merge delete

Comments

I updated the links to the goggle drive files (I realized that people could not see them). Sorry for any inconvenience

maik_mico gravatar image maik_mico  ( 2016-01-09 08:00:06 -0500 )edit

Please include all the relevant (console) output in your question proper. If the google drive links ever go dead, this question (and any potential answers) will become useless.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-09 11:00:15 -0500 )edit

I have modified the original message including the relevant console output, roslaunch, etc.. The only thing I could not upload yet is a picture with the tf tree..

maik_mico gravatar image maik_mico  ( 2016-01-11 06:03:53 -0500 )edit

Hi Mathieu,

I am receiving the topics correctly (odom_comb topic 40hz, camera topics 30hz). However rtabmap is not outputing anything on the console

maik_mico gravatar image maik_mico  ( 2016-01-11 06:12:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-11 10:14:14 -0500

matlabbe gravatar image

Does /odom_comb have a timestamp set in the topic header? Or maybe the clocks from the computers are not synchronized. In roswtf above, you have a warning about out-of-data transforms with a delay of 28611.7888631s. You can compare the topic stamps with: $rostopic echo /odom_comb/header/stamp

edit flag offensive delete link more

Comments

Problem solved. I had the same suspicion about Time stamps difference. It was in the order of more than 20000secs. So I created a node that subscribes and publishes the relevant transforms and odom_comb with new names and the local machine time stamp and everything works

maik_mico gravatar image maik_mico  ( 2016-01-11 10:42:21 -0500 )edit

Thank you very much Mathieu. Should I document the solution and writte it on this post so it is also useful for other users? Or I just mark the previous message saying that its solved?

maik_mico gravatar image maik_mico  ( 2016-01-11 10:44:17 -0500 )edit

@maik_mico: if possible, just synchronise the time of the involved PCs. Use something like chrony or ntp. No need to write custom nodes.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-11 10:48:04 -0500 )edit

I agree that would be the most optimum solution.. However I cannot access the computer from the AGV so I can only build things on top of it from a separate computer.

maik_mico gravatar image maik_mico  ( 2016-01-11 11:31:12 -0500 )edit

So you can install and run ROS on the AGV computer, but can't change its time? What make and model are we talking about?

gvdhoorn gravatar image gvdhoorn  ( 2016-01-11 11:55:11 -0500 )edit

Not exactly. The AGV it's developed under ROS but I cannot login to it's computer, so I just connected my computer to the same network and did an export ROS_MASTER_URI... Thus, I can access all its topics but cannot modify anything from its software. P.d: the AGV it's the MiR100

maik_mico gravatar image maik_mico  ( 2016-01-11 12:59:08 -0500 )edit

Well, you could always see whether the AGV is already running an NTP or Chrony server. Or, alternatively, you could set the clock of your addon PC to match the clock on the AGV.

In any case, perhaps just contact them and ask?

gvdhoorn gravatar image gvdhoorn  ( 2016-01-11 13:24:42 -0500 )edit

I will ask them if they are running NTP or Chrony. Thanks for the tip

maik_mico gravatar image maik_mico  ( 2016-01-11 13:32:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-08 05:03:42 -0500

Seen: 1,698 times

Last updated: Jan 11 '16