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

confused about robot_localization usage

asked 2014-11-26 03:41:42 -0500

madmage gravatar image

updated 2014-11-27 06:19:48 -0500

Dear all, I am trying to use the robot_localization package (ekf_localization) to fuse odometry and IMU data to get an initial guess for a pose estimator. I have read the robot_localization documentation, but I am still confused about: 1) the REP-105 says that we should have a tf chain /map -> /odom -> /base_projected, I have a robot node that is publishing /odom->/base_projected transformation, so I should set ekf to publish to a /odom_imu->/odom transformation and then pass /odom_imu to the pose estimator? to achieve this, I set:

      <param name="map_frame" value="odom_imu"/>
      <param name="odom_frame" value="odom"/>
      <param name="base_link_frame" value="base_projected"/>
      <param name="world_frame" value="odom_imu"/>

2) I am not sure how to setup the ekf localizer, since it is jumping and losing the right position (i.e., it is worse than the odometry alone): in the _config parameters, I use only the x, y, z velocities of the odometry and the roll pitch and yaw position and velocities; both odom and imu are set to retrieve the differential data

looking at the system with rviz, I see the odom_imu very near (and following) to the base_projected, while I expected it to be near the /odom frame, am I wrong?

EDIT: this is the entire launch file, as requested:

<launch>
    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
      <param name="frequency" value="30"/>  
      <param name="sensor_timeout" value="0.1"/>  
      <param name="two_d_mode" value="false"/>

      <param name="map_frame" value="odom_imu"/>
      <param name="odom_frame" value="odom"/>
      <param name="base_link_frame" value="base_projected"/>
      <param name="world_frame" value="odom_imu"/>

      <param name="odom0" value="/odom"/>
      <param name="imu0" value="/imu/data"/> 

      <rosparam param="odom0_config">[true, true, true, 
                                      false, false, true, 
                                      false,  false,  false, 
                                      false, false, false]</rosparam>

      <rosparam param="imu0_config">[false, false, false, 
                                     true,  true,  true, 
                                     false, false, false, 
                                     false, false, false]</rosparam>

      <param name="odom0_differential" value="true"/>
      <param name="imu0_differential" value="true"/>

      <param name="remove_gravitational_acceleration" value="true"/>

      <param name="debug"           value="false"/>
      <param name="debug_out_file"  value="debug_ekf_localization.txt"/>

      <rosparam param="process_noise_covariance">[0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0 ...
(more)
edit retag flag offensive close merge delete

Comments

I don't see anything immediately wrong. so I'd have to see what you're seeing in rviz to better diagnose this. I apologize if this is a pain, but could you make a bag file of your whole system running (and please drive it around a bit), but WITHOUT ekf_localization_node running?

Tom Moore gravatar image Tom Moore  ( 2014-11-27 09:14:35 -0500 )edit

Feel free to e-mail me if you can't post it. Use tmoore at cra dot com. Thanks.

Tom Moore gravatar image Tom Moore  ( 2014-11-27 09:15:02 -0500 )edit

Oh, and one more thing: what version are you using?

Tom Moore gravatar image Tom Moore  ( 2014-11-27 09:21:14 -0500 )edit

ROS indigo is the version. Actually I am running a rosbag WITHOUT the localization node and run it with rosrun, so well yes, I can send it to you, I think I can put it somewhere for you to download, maybe I better reduce it since it is very big

madmage gravatar image madmage  ( 2014-11-27 10:26:49 -0500 )edit

You can download the (reduced) bag here: https://dl.dropboxusercontent.com/u/2... and, just to be sure we are using the same ekf options, you can download the launchfile here: https://dl.dropboxusercontent.com/u/2...

madmage gravatar image madmage  ( 2014-11-27 10:58:42 -0500 )edit

Great, thanks, I'll take a look.

Tom Moore gravatar image Tom Moore  ( 2014-11-28 07:11:21 -0500 )edit

Sorry, Tom, I sent the wrong bag to you: in this bag the IMU has been mounted in the wrong way (rotated 90° to the left). Please use this other bag: https://www.dropbox.com/s/dcq23wn5ooe...

madmage gravatar image madmage  ( 2014-11-28 09:15:59 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-11-26 07:54:22 -0500

Tom Moore gravatar image

updated 2014-11-28 15:05:38 -0500

Would you mind posting your entire launch file and a sample message from each input that you have? Feel free to remove comments from the launch file to make it less cluttered. It sounds like there may be some issues with frame IDs.

EDIT: OK, I've got this sorted. First, I'll give you an updated launch file:

<launch>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">

      <param name="frequency" value="30"/>  

      <param name="sensor_timeout" value="0.1"/>  

      <param name="two_d_mode" value="false"/>

      <param name="map_frame" value="odom_imu"/>
      <param name="odom_frame" value="odom"/>
      <param name="base_link_frame" value="base_projected"/>
      <param name="world_frame" value="odom_imu"/>

      <param name="odom0" value="/odom"/>
      <param name="imu0" value="/imu/data"/> 

      <rosparam param="odom0_config">[true,  true,  false, 
                                      false, false, true, 
                                      false, true, true, 
                                      false, false, false,
                                      false, false, false]</rosparam>

      <rosparam param="imu0_config">[false, false, false, 
                                     true,  true,  true,
                                     false, false, false, 
                                     false, false, false,
                                     false, false, false]</rosparam>

      <param name="odom0_differential" value="true"/>
      <param name="imu0_differential" value="true"/>

      <param name="imu0_remove_gravitational_acceleration" value="true"/>

      <param name="debug"           value="true"/>
      <param name="debug_out_file"  value="debug_ekf.txt"/>

      <rosparam param="process_noise_covariance">[0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.04, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0 ...
(more)
edit flag offensive delete link more

Comments

I hope I have understood what you needed, I added this information in the initial question.

madmage gravatar image madmage  ( 2014-11-27 01:21:33 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-26 03:41:42 -0500

Seen: 1,707 times

Last updated: Nov 28 '14