Can robot_localization be used with only 1 IMU to obtain orientation data?

asked 2020-03-03 04:28:55 -0500

Randombs gravatar image

I am running Ubuntu 18.04 on a Raspberry Pi 4

I am testing out a Sense HAT IMU with the robot_localization package with no other sensor. Firstly, would ekf_localization_node even work properly if I only want to obtain orientation data from a single IMU? I understand that it is redundant and existing libraries allow me to obtain the orientation and angular velocity without needing it to pass through the robot_localization package. However, I am just trying to test out the robot localization package with an IMU now, and will be fusing GPS data in the future.

I am publishing sensor_msgs/Imu message with quaternion orientation, angular velocity and linear acceleration data, and I expect to get a nav_msgs/Odometry message to be published. When I run "rostopic echo /odometry/filtered" it takes very long for the orientation to update when the Sense_HAT is rotated, and it jumps straight to the new value after a period of time (5+ seconds).

.yaml file

frequency: 30
sensor_timeout: 0.1
two_d_mode: false
transform_time_offset: 0.0
transform_timeout: 0.0

print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false

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

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

imu0_nodelay: false
imu0_differential: false
imu0_relative: true
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  

imu0_remove_gravitational_acceleration: 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.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 ...
(more)
edit retag flag offensive close merge delete

Comments

Please include sample messages from every sensor input. Also, have you tried doing rostopic hz on your IMU data?

Tom Moore gravatar image Tom Moore  ( 2020-04-27 02:39:26 -0500 )edit