Configuring Robot Localisation with a GPS, IMU and Odometry

asked 2021-11-22 10:49:34 -0500

lizzywizzy gravatar image

Hello, I am trying to implement the robot_localisation ROS node for my robot within my gazebo simulation.

I have the following sensor inputs:

GPS

  • libhector_gazebo_ros_gps plugin
  • topic: /fix
  • topic type: sensor_msgs/NavSatFix

IMU

  • libgazebo_ros_imu_sensor plugin
  • topic: /imu
  • topic type: sensor_msgs/Imu

ODOM

  • libgazebo_ros_skid_steer_drive plugin
  • topic: /rover/odom
  • topic type: nav_msgs/Odometry

I have set up 2 ROS nodes within my launch file:

<node pkg="robot_localization" type="ekf_localization_node" name="local_ekf" clear_params="true" output="screen">
    <rosparam command="load" file="$(find rover_gazebo)/config/gps_imu_fusion.yaml"/>
    <remap from="/odom/imu" to="/imu"/>
    <remap from="/odometry/gps" to="/odometry/gps"/>
  </node>

  <node pkg="robot_localization" type="navsat_transform_node" name="global_ekf" clear_params="true" output="screen">
    <rosparam command="load" file="$(find rover_gazebo)/config/nav_sat_params.yaml"/>
    <remap from="/imu/data" to="/imu"/>
    <remap from="/gps/fix" to="/fix"/>
  </node>

Where the config files are:

gps_imu_fusion.yaml

frequency: 30

sensor_timeout: 0.1

two_d_mode: true

transform_time_offset: 0.1

transform_timeout: 0.0

print_diagnostics: true

debug: false

debug_out_file: /path/to/debug/file.txt

publish_tf: true

publish_acceleration: false

map_frame: map              # Defaults to "map" if unspecified
odom_frame: odom            # Defaults to "odom" if unspecified
base_link_frame: base_link  # Defaults to "base_link" if unspecified
world_frame: odom           # Defaults to the value of odom_frame if unspecified

odom0: /odometry/gps

    odom0_config: [true,  true,  false,
                   false, false, false,
                   false, false, false,
                   false, false, false,
                       false, false, false]

    odom0_queue_size: 10

    odom0_nodelay: false

    odom0_differential: false

    odom0_relative: false

    odom0_pose_rejection_threshold: 5
    odom0_twist_rejection_threshold: 1

    imu0: /odom/imu
    imu0_config: [false, false, false,
                  false, false, true,
                  false, false, false,
                  false, false, false,
                  false, false, false]
    imu0_nodelay: false
    imu0_differential: false
    imu0_relative: false
    imu0_queue_size: 5

imu0_pose_rejection_threshold: 0.8                 # Note the difference in parameter names
imu0_twist_rejection_threshold: 0.8                #
imu0_linear_acceleration_rejection_threshold: 0.8  #

use_control: true

stamped_control: false

control_timeout: 0.2

control_config: [true, false, false, false, false, true]

acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]

deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]

acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]

deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]

process_noise_covariance: [0.750, 0,     0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,     0.750, 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.09, 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.08, 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.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 ...
(more)
edit retag flag offensive close merge delete

Comments

Thank you for the thorough question. Can you please provide frames tree? Have you considered using a bag to be able what’s happening with the messages

osilva gravatar image osilva  ( 2021-11-23 18:02:55 -0500 )edit