confused about robot_localization usage
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 ...
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?Feel free to e-mail me if you can't post it. Use tmoore at cra dot com. Thanks.
Oh, and one more thing: what version are you using?
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
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...
Great, thanks, I'll take a look.
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...