ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Configuring robot_localization for odom msgs only

asked 2018-09-19 14:45:37 -0600

babazaroni gravatar image

updated 2018-09-19 14:52:02 -0600

I am sending only odom msgs to the robot localization filter. The odom msg has only position set and the rl filter is configured to look only at position and ignore velocity. I would like the rl filter to be more responsive to velocity inferred from position. As seen below, if there is a dropout in the odom msgs, the filter guess of velocity seems not so responsive to recent odom msgs. I will add an imu later, but getting a better velocity estimate with odom only will add to my understanding of the rl filter.

What should I do to make the velocity estimate more responsive to recent odom msgs?

The green trace is the output of the filter for position x axis, the red is the input odom position for x axis:

image description

The rl filter does appear to be modeling velocity, as some deliberate long odom msg dropouts show a rising position.

image description

Here is my rl config file:

frequency: 30
sensor_timeout: 0.1
two_d_mode: true
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
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: example/odom/delayed
odom0_config: [true,  true,  false,
               false, false, false,
               false, false, false,
               false, false, true,
               false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false

odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
#odom1: example/another_odom
odom1_config: [false, false, true,
               false, false, false,
               false, false, false,
               false, false, true,
               false, false, false]
odom1_differential: false
odom1_relative: true
odom1_queue_size: 2
odom1_pose_rejection_threshold: 2

odom1_twist_rejection_threshold: 0.2
odom1_nodelay: false
pose0: example/pose
pose0_config: [true,  true,  false,
               false, false, false,
               false, false, false,
               false, false, false,
               false, false, false]
pose0_differential: true
pose0_relative: false
pose0_queue_size: 5

pose0_rejection_threshold: 2  # Note the difference in parameter name
pose0_nodelay: false
#twist0: example/twist
twist0_config: [false, false, false,
                false, false, false,
                true,  true,  true,
                false, false, false,
                false, false, false]
twist0_queue_size: 3
twist0_rejection_threshold: 2
twist0_nodelay: false

#imu0: /imu/data/delayed
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: 100 #0.8                 # Note the difference in parameter names
imu0_twist_rejection_threshold: 100 #0.8                #

imu0_linear_acceleration_rejection_threshold: 100 #0.8  #

imu0_remove_gravitational_acceleration: true
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]
#only diagonals listed below
process_noise_covariance: [0.05,0.05,0.06,0.03,0.03,0.06,0.025,0.025,0.04,0.01,0.01,0.02,0.01,0.01,0.015]
initial_estimate_covariance: [1e-9,1e-9,1e-9,1e-9,1e-9,1e-9,1e-9,1e-9 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-06 09:30:43 -0600

Tom Moore gravatar image

The package isn't doing any explicit logic to infer the velocities; the correlation between velocity and pose means that, when we generate the Kalman gain, we end up getting velocity values, even if only the pose changed. The velocity prediction in the kinematic model is just current velocity + acceleration * dt, so once your odom messages stop being published, you're just going to see the filter move on with a constant velocity until you get another input from position or velocity.

Other than monkeying with the process noise and measurement covariances (the latter appear to not be set), I wouldn't expect to have a lot of control over that behavior.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-09-19 14:45:37 -0600

Seen: 318 times

Last updated: Nov 06 '18