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

How to configure properly robot_localization with IMU, Odometry and GPS data

asked 2019-06-10 10:04:22 -0500

romiao gravatar image

updated 2019-06-12 15:55:27 -0500

Hello everyone! I'm new to ROS, and I'm working with robot_localization package (2D mode) on Melodic. I'm using an IMU, Odometry and GPS data. I've configured robot_localization using two EKF and navsat_transform_node.

  • The first EKF has odom as world_frame, and IMU and Odometry as subscribers;
  • The second EKF has map as world_frame, and IMU, Odometry and /odometry/gps as subscribers;
  • Navsat_transform_node has GPS, IMU and /odometry/filtered_map as subscribers.

I'm using IMU sensor from my smartphone, through the Android app Ros Sensors Driver.

I was wondering if I were setting right all the nodes: /odometry/filtered looks like it's working, but I was noticing that there is no difference in the results if I use only the odometry and the Imu, without the gps data... How is it possible? I've also noticed that the covariance matrix of /odometry/filtered is diverging fairly quickly, and I don't know how to reduce this divergence. Can anyone give me some advice? Here are the launch files.

<launch>

<param name="/use_sim_time" value="true" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="-0.06 0 0.1376 0.385 0.018 -0.010 base_link imu_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_gps" args="0.18 0.13 0.1476 0 0 0 base_link gps_link" />
<node name="ekf_localization_node" pkg="robot_localization" type="ekf_localization_node" clear_params="true">

  <param name="frequency" value="30"/>
  <param name="sensor_timeout" value="0.1"/>
  <param name="two_d_mode" value="true"/>

  <param name="map_frame" value="map"/>
  <param name="odom_frame" value="odom"/>
  <param name="base_link_frame" value="base_link"/>
  <param name="world_frame" value="odom"/>

  <param name="transform_time_offset" value="0.0"/>
  <param name="transform_timeout" value="0.0"/>

    <param name="odom0" value="/wolf/odom"/>

    <param name="imu0" value="/wolf/imu"/>

    <rosparam param="odom0_config">[false, false, false,
                                    false, false,  true,
                                     true,  true,  true,
                                    false, false, false,
                                    false, false, false]</rosparam>
    <rosparam param="imu0_config">[false, false, false,
                                    true,  true, true,
                                   false, false, false,
                                    true,  true,  true,
                                    true,  true,  true]</rosparam>
    <param name="odom0_differential" value="false"/>
    <param name="imu0_differential" value="false"/>

    <param name="odom0_relative" value="false"/>
    <param name="imu0_relative" value="true"/>

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

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

    <param name="odom0_queue_size" value="10"/>
    <param name="imu0_queue_size" value="10"/>

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

  <rosparam param="process_noise_covariance">[0.05, 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.06, 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.03, 0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                                              0,    0,    0,    0,    0,    0.06, 0,     0,     0,    0,    0 ...
(more)
edit retag flag offensive close merge delete

Comments

1

Just making sure: there are hundreds of Q&As about robot_localization, including posts about GPS, odometry and IMU configurations. Have you found and looked at those?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-12 02:39:57 -0500 )edit

Yes I've read a lot of Q&A about this package, and it's thanks to those informations that I managed to configure the two EKFs and navsat_transform_node... I just don't understand why /odometry/filtered releases the same localization informations if I use GPS, IMU and Odom, or if I use only IMU and Odom...

romiao gravatar image romiao  ( 2019-06-12 02:56:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-17 20:16:40 -0500

cassini.huygens gravatar image

Have you tried this one: http://docs.ros.org/melodic/api/robot... This seems to be in enough details to help you catch up with your question. But my understanding is that they do have the same localisation information result, on reason is they try to help improve the localization final result by combing information (for instance GPS has some advantages)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-06-10 10:04:22 -0500

Seen: 1,150 times

Last updated: Jun 12 '19