odom frame jumps after IMU Odometry fusion with robot_localization

asked 2016-09-20 14:41:17 -0600

prince gravatar image

Greeting, I am trying to update the odometry yaw estimate using IMU sensor. I followed instructions as provided in robot_localization wiki page. But, odom frame jumps a lot. It appear there are two conflicting sources of odom information. I am using following launch file:

enter code here<!-- Launch file for ekf_localization_node -->

<launch>

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

  <!-- ======== STANDARD PARAMETERS ======== -->

  <!-- The frequency, in Hz, at which the filter will output a position estimate. Note that
       the filter will not begin computation until it receives at least one message from
       one of the inputs. It will then run continuously at the frequency specified here,
       regardless of whether it receives more measurements. Defaults to 30 if unspecified. -->
  <param name="frequency" value="30"/>

  <!-- The period, in seconds, after which we consider a sensor to have timed out. In this event, we
       carry out a predict cycle on the EKF without correcting it. This parameter can be thought of
       as the minimum frequency with which the filter will generate new output. Defaults to 1 / frequency
       if not specified. -->
  <param name="sensor_timeout" value="0.1"/>

  <!-- If this is set to true, no 3D information will be used in your state estimate. Use this if you
       are operating in a planar environment and want to ignore the effect of small variations in the
       ground plane that might otherwise be detected by, for example, an IMU. Defaults to false if
       unspecified. -->
  <param name="two_d_mode" value="false"/>
  <param name="map_frame" value="map"/>
  <!-- Defaults to "odom" if unspecified -->
  <param name="odom_frame" value="odom"/>
  <!-- Defaults to "base_link" if unspecified -->
  <param name="base_link_frame" value="base_link"/>
  <param name="world_frame" value="odom"/>
  <param name="transform_time_offset" value="0.0"/>

  <param name="pose0" value="example/pose"/>
  <param name="twist0" value="example/twist"/> -->
  <param name="odom0" value="/ros0xrobot/odom"/>
  <param name="imu0" value="/imu"/>
  <rosparam param="odom0_config">[false,  false, false,
                                  false, false, false,
                                  true,  false, false,
                                  false, false, false,
                                  false, false, false]</rosparam>

  <!--rosparam param="odom1_config">[false, false, false,
                                  false, false, false,
                                  true,  false, false,
                                  false, false, false,
                                  false, false, false]</rosparam-->

  <!--rosparam param="pose0_config">[true,  true,  false,
                                  false, false, false,
                                  false, false, false,
                                  false, false, false,
                                  false, false, false]</rosparam-->

  <!--rosparam param="twist0_config">[false, false, false,
                                   false, false, false,
                                   true,  true,  true,
                                   true,  true,  true,
                                   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="imu0_differential" value="false"/>

-->

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

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

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

  <!-- ======== ADVANCED PARAMETERS ======== -->
  <!-- By default, the subscription queue size for each message type is 1. If you wish to increase that so as not
       miss any messages (even if your frequency is set to a relatively small value), increase these. -->
  <param name="odom0_queue_size" value="2"/>
  <param name="odom1_queue_size" value="1"/>
  <param name="pose0_queue_size" value="10"/>
  <param name="twist0_queue_size" value="3"/>
  <param name="imu0_queue_size" value="10"/>

  <param name="odom0_pose_rejection_threshold" value="5"/>
  <param name="odom0_twist_rejection_threshold" value="1"/>
  <param name="pose0_rejection_threshold" value="2"/>
  <param name="twist0_rejection_threshold" value="1 ...
(more)
edit retag flag offensive close merge delete

Comments

In rosparam "odom0_config" , are you using it for x,y position and yaw or for x velocity?

Dharmateja Kadem gravatar imageDharmateja Kadem ( 2016-09-20 17:40:34 -0600 )edit

Yes. Idea is to rely on imu for yaw, not on odometry.

prince gravatar imageprince ( 2016-09-22 21:27:36 -0600 )edit

Please:

(a) Clean up the launch file by removing comments and commented-out parameters

(b) Provide sample input messages

My guess is that you have two_d_mode off and aren't measuring anything for Y and Z or Y and Z velocity, but I need more information.

Tom Moore gravatar imageTom Moore ( 2016-10-09 05:11:53 -0600 )edit
1

Did you ever figure this problem out?

Tom Moore gravatar imageTom Moore ( 2017-07-20 04:19:29 -0600 )edit