Ask Your Question
0

initial_state in robot_localization does not change the odometry/filtered initial pose

asked 2019-09-04 14:26:04 -0600

Lucas Marins gravatar image

updated 2019-09-04 14:26:48 -0600

Hello,

I am working with the robot_localization, filtering two odometry data.

Both of them start at (0,0,0), but I would like to start at (x,y,0).

I am using the initial_state parameter, but the topic keeps publishing the starting pose in (0,0,0).

Which are the possible problems?

I am setting the parameter on my yaml file only:

frequency: 30

sensor_timeout: 0.1
two_d_mode: true  
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: true
debug_out_file: $(env HOME)/.ros/log/ekf.log

publish_tf: true
smooth_lagged_data: false 

dynamic_process_noise_covariance: 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: robot/odom0
odom0_config: [true,  true,  false,
               false, false, false,
               true, true, false,
               false, false, false,
               false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false
odom0_relative: true
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1.0


odom1: robot/odom1
odom1_config: [true, true, false,
               true, true, true,
               true, true, false,
               true, true, true,
               false, false, false]
odom1_differential: false
odom1_relative: true
odom1_queue_size: 2
odom1_pose_rejection_threshold: 2
odom1_twist_rejection_threshold: 1.0
odom1_nodelay: false

use_control: true
stamped_control: false
control_timeout: 0.2

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

acceleration_limits: [1.3, 1.3, 0.0, 0.0, 0.0, 3.4]
deceleration_limits: [1.3, 1.3, 0.0, 0.0, 0.0, 4.5]
acceleration_gains: [0.8, 0.8, 0.0, 0.0, 0.0, 0.9]
deceleration_gains: [1.0, 1.0, 0.0, 0.0, 0.0, 1.0]

initial_state: [20.0, 20.0, 0.0,
                0.0, 0.0, 0.0,
                0.0, 0.0, 0.0,
                0.0, 0.0, 0.0,
                0.0, 0.0, 0.0]
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-11-04 04:00:26 -0600

Tom Moore gravatar image

You should include a sample message from every sensor input, but if I had to guess, you are probably getting a message from the robot/odom0 topic that is providing all 0s for the measurement. You're fusing absolute X and Y from that sensor, so it's going to update your pose estimate.

edit flag offensive delete link more

Comments

I am setting both sensors as relative. Do I always need an absolute sensor to work with "initial_state" parameter?

Lucas Marins gravatar image Lucas Marins  ( 2019-11-11 13:20:11 -0600 )edit
1

Relative mode is relative to the sensor, not the state. So we retain the first measurement from the sensor forever, and all future measurements from that sensor are multiplied by the inverse of that first measurement, and then fed to the filter as an absolute pose. Try using differential mode instead.

Tom Moore gravatar image Tom Moore  ( 2019-11-28 03:47:05 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-09-04 14:26:04 -0600

Seen: 92 times

Last updated: Nov 04 '19