Robotics StackExchange | Archived questions

TF is broken when using robot_localization package with only IMU sensor and how correctly to use and configurate the package?

Hi m using this robot_lokalization package to obtain the linear velocity. As only sensor input in my case is IMU. I configure the parameters and set the frames as follow

map_frame: map             
odom_frame: odom         
base_link_frame: /thrbot/base_link 
world_frame: odom

The launch file is the following one

<launch>
  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
    <rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml" />
    <param name="odom_used" value="false"/>
  </node>

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_imu" args="0 0 0 0 0 0  /thrbot/base_link /thrbot/imu_link  100" />

</launch>

The robot baselink frame is `thrbot/baselinkand the IMU one isthrbot/imu_link`

Here is the photo of the TF without using the packagewhich is totally fine but when launch the package with the above launch file the TF is not correct anymore as can see here broken TF when using the package .

To fix the TF i change the configure the parameters in ekf_template.yaml as follow

odom_frame: odom          
base_link_frame: /thrbot/base_footprint  
world_frame: odom 

and the launch file to follow

<launch>
  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
    <rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml" />
    <param name="frame_id" value="odom"/>
  </node>

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_odom" args="0 0 0 0 0 0 /odom /thrbot/base_footprint 100" />

</launch>

Now the TF looks good as can see fixed TF Than following parameters are configure in ekf_template.yaml:

imu0: /thrbot/imu
imu0_config: [false, false, false,
              true, true, true,
              false, false, false,
              true,  true,  true,
              true,  true,  true]

imu0_remove_gravitational_acceleration: true
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 5
imu0_pose_rejection_threshold: 0.8                
imu0_twist_rejection_threshold: 0.8                
imu0_linear_acceleration_rejection_threshold: 0.8

My question is now is this correct configuration for underwater UUV with only IMU sensor input to get linear velocity(regardless of the accuracy and the accumulated error)?

Asked by Astronaut on 2021-09-26 09:57:54 UTC

Comments

What are the specs of your IMU?

Asked by osilva on 2021-09-27 19:17:36 UTC

This paper discusses the performance and limitations of IMUs for UUV applications: https://www.researchgate.net/profile/Brian-Claus-2/publication/325884228_A_Navigation_Solution_Using_a_MEMS_IMU_Model-Based_Dead-Reckoning_and_One-Way-Travel-Time_Acoustic_Range_Measurements_for_Autonomous_Underwater_Vehicles/links/5e90b29492851c2f52930709/A-Navigation-Solution-Using-a-MEMS-IMU-Model-Based-Dead-Reckoning-and-One-Way-Travel-Time-Acoustic-Range-Measurements-for-Autonomous-Underwater-Vehicles.pdf?origin=publication_detail

Since there are many factors involved. You are right in pointing out the accumulated errors even when using EkF. Is there any chance to go above water and get calibration with GPS?

Asked by osilva on 2021-09-27 19:25:21 UTC

Ok. First my question here is regarding the correct use and parameters setting of the robot_localization package when only IMU sensor input is available. Please can you read the question and if can help regarding that would be great. Second, this are the specs of the IMU ADIS16448. Third , I will do sensor fusion of IMU and the Z (component) of the Pressure sensor( barometer) and we suppose the sea level is always flat.But that the second step, first I wanna get some value for the linear velocity only using IMU as that value need it for my simulation. Hope more clear now and appreciate if can help?

Asked by Astronaut on 2021-09-28 02:27:00 UTC

Thank you for the clarification. When I read the documentation of this package and refer to the tutorial I think one component missing it’s the covariance matrix setup. Not sure if you have done already. As your sensor specs will help with this.

Asked by osilva on 2021-09-28 03:46:31 UTC

ok. But thats more on the parameters tuning. Im asking about overall setup and how correctly to set the frames(as its must be locally everything) in order to get correct Linear velocity output from this package.

Asked by Astronaut on 2021-09-28 04:03:12 UTC

Answers