Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ekf_localisation without real odom

Hi everyone, I got a question about the the ekf_localisation; can I use it on a robot without odometry but with an IMU and a laser ? I use hector slam to determine my position.

First I try with just my IMU to test this node, here is my actual launcher:

<launch>

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

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

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

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

<param name="odom_frame" value="odom"/>

<param name="base_link_frame" value="imu_link"/>

<param name="world_frame" value="odom"/>

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

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

<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 ======== -->

<param name="imu0_queue_size" value="10"/>
<param name="imu0_pose_rejection_threshold" value="0.3"/>
<param name="imu0_twist_rejection_threshold" value="0.1"/>
<param name="imu0_linear_acceleration_rejection_threshold" value="0.1"/>

<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,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0.025, 0,     0,    0,    0,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
0,    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.01, 0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
0,    0,    0,    0,    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.01, 0,
0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.015]</rosparam>


<rosparam param="initial_estimate_covariance">[1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9,  0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1e-9,  0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1e-9,  0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1e-9, 0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1e-9, 0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1e-9]</rosparam>

<!--  Placeholder for output topic remapping
<remap from="odometry/filtered" to=""/>
-->

</node>

</launch>

Here is the odom filtered:

header: 
  seq: 125
  stamp: 
    secs: 1443712220
    nsecs: 480115258
  frame_id: odom
child_frame_id: imu_link
pose: 
  pose: 
    position: 
      x: 0.0
      y: 0.0
      z: 0.0
    orientation: 
      x: -0.000553407607566
      y: -0.00250171176373
      z: -0.00767693513457
      w: 0.999967249386
  covariance: [172.8659835261435, 0.00011214272849202666, -0.20452346604929553, 0.0, 0.0, 0.0, 0.00011214272849285722, 172.86631414472626, 0.0006632764256535396, 0.0, 0.0, 0.0, -0.20452346604929653, 0.0006632764256536409, 260.77181163895153, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1464448450641471, 3.648621430523182e-05, 0.00023775973606195798, 0.0, 0.0, 0.0, 3.6486214305231793e-05, 0.06699488265570672, -4.5170725041431335e-05, 0.0, 0.0, 0.0, 0.0002377597360619585, -4.5170725041431335e-05, 0.1339675910520929]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: -0.000713658596179
      y: 0.00251778983511
      z: -0.00370075763203
  covariance: [6.905606479820875, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.905606479820875, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.389820056070775, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01533368834275951, -2.9592663583203985e-233, -9.547991947813301e-248, 0.0, 0.0, 0.0, -2.9592663583204052e-233, 9.999777818634916e-10, 0.0, 0.0, 0.0, 0.0, -9.5479919478133e-248, 0.0, 9.999888906849335e-10]

It doesn't change with the IMU, so I wonder where is my mistake.

ekf_localisation without real odom

Hi everyone, I got a question about the the ekf_localisation; can I use it on a robot without odometry but with an IMU and a laser ? I use hector slam to determine my position.

First I try with just my IMU to test this node, here is my actual launcher:

<launch>

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

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

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

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

<param name="odom_frame" value="odom"/>

<param name="base_link_frame" value="imu_link"/>

<param name="world_frame" value="odom"/>

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

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

<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 ======== -->

<param name="imu0_queue_size" value="10"/>
<param name="imu0_pose_rejection_threshold" value="0.3"/>
<param name="imu0_twist_rejection_threshold" value="0.1"/>
<param name="imu0_linear_acceleration_rejection_threshold" value="0.1"/>

<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,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0.025, 0,     0,    0,    0,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
0,    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.01, 0,    0,    0,    0,
0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
0,    0,    0,    0,    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.01, 0,
0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.015]</rosparam>


<rosparam param="initial_estimate_covariance">[1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,     0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9,  0,     0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1e-9,  0,     0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1e-9,  0,    0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1e-9, 0,    0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1e-9, 0,
0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1e-9]</rosparam>

<!--  Placeholder for output topic remapping
<remap from="odometry/filtered" to=""/>
-->

</node>

</launch>

Here is the odom filtered:

header: 
  seq: 125
  stamp: 
    secs: 1443712220
    nsecs: 480115258
  frame_id: odom
child_frame_id: imu_link
pose: 
  pose: 
    position: 
      x: 0.0
      y: 0.0
      z: 0.0
    orientation: 
      x: -0.000553407607566
      y: -0.00250171176373
      z: -0.00767693513457
      w: 0.999967249386
  covariance: [172.8659835261435, 0.00011214272849202666, -0.20452346604929553, 0.0, 0.0, 0.0, 0.00011214272849285722, 172.86631414472626, 0.0006632764256535396, 0.0, 0.0, 0.0, -0.20452346604929653, 0.0006632764256536409, 260.77181163895153, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1464448450641471, 3.648621430523182e-05, 0.00023775973606195798, 0.0, 0.0, 0.0, 3.6486214305231793e-05, 0.06699488265570672, -4.5170725041431335e-05, 0.0, 0.0, 0.0, 0.0002377597360619585, -4.5170725041431335e-05, 0.1339675910520929]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: -0.000713658596179
      y: 0.00251778983511
      z: -0.00370075763203
  covariance: [6.905606479820875, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.905606479820875, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.389820056070775, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01533368834275951, -2.9592663583203985e-233, -9.547991947813301e-248, 0.0, 0.0, 0.0, -2.9592663583204052e-233, 9.999777818634916e-10, 0.0, 0.0, 0.0, 0.0, -9.5479919478133e-248, 0.0, 9.999888906849335e-10]

It doesn't change with the IMU, so I wonder where is my mistake.

edit: Here is the IMU topic from a driver I made for the SBG ellipse N.

header: 
  seq: 1606
  stamp: 
    secs: 1443767346
    nsecs: 303496216
  frame_id: imu_link
orientation: 
  x: 0.00123538135085
  y: 0.00163402350154
  z: -0.427456617355
  w: 0.904033482075
orientation_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity: 
  x: -0.00114835833665
  y: 0.00221727741882
  z: -0.00355834118091
angular_velocity_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration: 
  x: 0.0206403769553
  y: -0.0543171241879
  z: -9.78275775909
linear_acceleration_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]