Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

robot_localization, problem with Roll, Pitch measurements

Dear all,

I want to configure the package robot_localization (using Xsense IMU), in order that it takes into account the orientation of the robot (roll, pitch and for sure yaw) while rotating.

Unfortunately, I did not find any documentation or example to configure it correctly.

I have achieved to configure it where it takes into account the the rotation on Roll as well as the Z position of the robot with the following configuration file

frequency: 20
two_d_mode: false

# X, Y, Z
# roll, pitch, yaw
# X vel, Y vel, Z vel
# roll vel, pitch vel, yaw vel
# X accel, Y accel, Z accel

#Odometry input config

odom0: /odom
odom0_config: 
[false, false, false,
false, false, false,
true, true, true,
true, true, true,
false, false, true]
odom0_differential: false
odom0_relative: true

# input config
imu0: /imu/data # Xsense
imu0_config: 
[false, false, false,
true,  true,  true,
false, false, false,
true,  true,  true,
true,  false,  true]

mu0_differential: false
imu0_relative: true
imu0_remove_gravitational_acceleration: false
dynamic_process_noise_covariance: true
#Frames config
odom_frame: odom
base_link_frame: base_link
world_frame: odom

But this configuration does not work when I tried to rotate the robot around X axis (pitch)

But, When I tried the following configuration it worked well for the rotation on Pitch and this time was not taking into account the Roll rotation

frequency: 20
two_d_mode: false

# X, Y, Z
# roll, pitch, yaw
# X vel, Y vel, Z vel
# roll vel, pitch vel, yaw vel
# X accel, Y accel, Z accel

#Odometry input config
odom0: /odom
odom0_config: [false, false, false,
false, false, false,
true, true, true,
true, true, true,
false, false, false]
odom0_differential: false
odom0_relative: true


# input config
#imu0: /imu # Razor
imu0: /imu/data # Xsense
imu0_config: [false, false, false,
true,  true,  true,
false, false, false,
true,  true,  true,
true,  false,  false]

imu0_differential: false
imu0_relative: true
imu0_remove_gravitational_acceleration: false


dynamic_process_noise_covariance: true

#Frames config
odom_frame: odom
base_link_frame: base_link
world_frame: odom

The difference between these two is taking into account the acceleration on Z axis (for both IMU and odometry).

Do you know why I get this results?

Thanks in advance,