Ask Your Question
0

Robot_pose_ekf does not publish the robot pose

asked 2012-12-10 17:49:43 -0500

Astronaut gravatar image

Hello

I would like to use the robot_pose_ekf for the pose estimation.My sensor package is just IMU and laser. So I do not have any encoders, and thought of using the odometry of the hector_ mapping. But the robot_pose_ekd does not pucblish the pose. This is the output of the status by rosservice call /robot_pose_ekf/get_status

status: Input:
 * Odometry sensor
   - is NOT active
   - received 0 messages
   - listens to topic /scanmatch_odom
 * IMU sensor
   - is NOT active
   - received 82 messages
   - listens to topic /imu/data
 * Visual Odometry sensor
   - is NOT active
   - received 0 messages
   - listens to topic 
Output:
 * Robot pose ekf filter
   - is NOT active
   - sent 0 messages
   - pulishes on topics /robot_pose_ekf/odom and /tf

And this is my launch file

<launch>
    <param name="use_sim_time" value="true"/>
    <node name="rosplay" pkg="rosbag" type="play" args="test5.bag --clock "/>
    <node name="hector_mapping" pkg="hector_mapping" type="hector_mapping" output="screen">
        <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map"/>
        <param name="base_frame" value="scanmatcher_frame"/>
        <param name="odom_frame" value="scanmatcher_frame"/>

    <param name="map_resolution" value="0.025"/>
    <param name="map_update_distance_thresh" value="0.4"/>
    <param name="map_update_angle_thresh" value="0.9"/>
    <param name="map_multi_res_levels" value="3.6"/>


 </node>


    <node pkg="tf" type="static_transform_publisher" name="baselink_laser" args="0 0 0 0 0 0 /scanmatcher_frame /laser 10"/>
    <!--node pkg="tf" type="static_transform_publisher" name="laser_imu" args="0 0 0 0 0 0 /laser /base_imu 10"/-->
    <!--node pkg="tf" type="static_transform_publisher" name="baselink_camera" args="0 0 0 0 0 0 /base_link /camera 10"/-->

    <node pkg="tf" type="static_transform_publisher" name="corner_a" args="0.45 0.3 0 0 0 0 /scanmatcher_frame /corner1 10"/>
    <node pkg="tf" type="static_transform_publisher" name="corner_b" args="0.45 -0.3 0 0 0 0 /scanmatcher_frame /corner2 10"/>
    <node pkg="tf" type="static_transform_publisher" name="corner_c" args="-0.45 -0.3 0 0 0 0 /scanmatcher_frame /corner3 10"/>
    <node pkg="tf" type="static_transform_publisher" name="corner_d" args="-0.45 0.3 0 0 0 0 /scanmatcher_frame /corner4 10"/>

    <!--
    EKF to fuse IMU and hector_mapping odometry
    -->

    <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
    <param name="output_frame" value="odom"/>
    <param name="freq" value="30.0"/>
    <param name="sensor_timeout" value="1.0"/>
    <param name="odom_used" value="true"/>
    <param name="imu_used" value="true"/>
    <param name="vo_used" value="false"/>
    <param name="debug" value="false"/>
    <param name="pub_odometry" value="true"/>
    <param name="self_diagnose" value="false"/>
    <remap from="odom" to="scanmatch_odom"/>
    <remap from="imu_data" to="imu/data"/>


    </node>

    <!-- Start an rviz node with a custom configuration for the viewpoint, map_server, trajectory, laser scans, etc -->
    <node pkg="rviz" type="rviz" output="screen" name="rviz" args="-d $(find pow_analyzer)/launch/pow_rviz.vcg"/>

</launch>

Any help??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-12-10 21:15:11 -0500

Lorenz gravatar image

robot_pose_ekf is a node that fuses odometry and IMU. You need to provide odometry for it to work, in particular when you enable the odom_used parameter. Note that the node does not use the TF odometry transform but it needs a real odometry message, including position, velocity and the uncertainty covariance matrix.

edit flag offensive delete link more

Comments

but I do not have encoders. So should I disable the odom_used parameter??Is it possible to provide an fake odometry from hector_mapping ??I mean it must be other option than using the real encoder odometry or??

Astronaut gravatar image Astronaut  ( 2012-12-10 21:40:24 -0500 )edit
1

If you disable it, robot_pose_ekf will be useless since you'd have only one input. As I said before, I think you are close to the limits of your approach. To improve, you'll have to use real odometry based on encoders.

Lorenz gravatar image Lorenz  ( 2012-12-10 21:48:21 -0500 )edit

But @ Stefan Kohlbrecher and @ dornhere suggested to use odometry from hector_mapping and put into robot_pose_ekf . So this odometry is not from encoders. Means must be some option that robot_pose_ekf takes this odomtry .

Astronaut gravatar image Astronaut  ( 2012-12-10 22:47:27 -0500 )edit

It provides a PoseWithCovarianceStamped which is not an Odometry message. It is missing velocity information. You can try to generate that by computing it based on position data but the results probably won't be satisfying. In my experience, Odometry from scan matching just never worked good enough.

Lorenz gravatar image Lorenz  ( 2012-12-10 22:54:01 -0500 )edit

He suggested to use the undocumented "pub_odometry" parameter, which leads to odometry getting published on the "scanmatch_odom" topic. Than feed that into robot_pose_ekf .

Astronaut gravatar image Astronaut  ( 2012-12-10 22:57:48 -0500 )edit

Apparently, it does not. Otherwise your robot_pose_ekf node would have received messages on that topic. Verify your topic names and types. rostopic info and rxgraph can help here.

Lorenz gravatar image Lorenz  ( 2012-12-10 22:59:52 -0500 )edit

Well i wrote a node that subscribe to a hectorMapping pose (poseupdate) and publish it as odometry. Now the robot_pose_ekf receive odometry massages but still can not publish the robot pose.

Astronaut gravatar image Astronaut  ( 2012-12-10 23:07:08 -0500 )edit

Have you tried visual odometry? Probably not as good as real encoders, but if you have a camera, they may work good enough.

Kevin gravatar image Kevin  ( 2012-12-11 03:49:37 -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: 2012-12-10 17:49:43 -0500

Seen: 1,995 times

Last updated: Dec 10 '12