ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

TF issue with robot_localization

asked 2017-12-11 04:35:33 -0600

Salahuddin_Khan gravatar image

updated 2017-12-11 04:44:57 -0600

Hi, I'm fairly new to ROS. I'm trying to fuse wheel-odometry, GPS and IMU using robot_localization node. I'm attaching a rosbag which contains data published by the sensors. The car is essentially going in a circle. I've done sensor data publication exactly as specified by the robot_localization wiki. Yet the output of the robot_localization is incorrect and weird, it gives wrong Twist output data. I've already spent a week trying to solve this problem any help will be appreciated PS: data from all the sensors are pretty accurate, I've not added any noise to the sensors. The bagfile : link text TF tree :link text

Wheel-Odometry : child_frame_id = 'fusion/base_link' header.frame_id = 'fusion/base_link'

IMU: header.frame_id = 'base_footprint'

GPS: header.frame_id = 'fusion/base_link'

ekf_se_odom:
  frequency: 30
  sensor_timeout: 2
  two_d_mode: true
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: true
  debug: false

  map_frame: map
  odom_frame: odom
  base_link_frame: fusion/base_footprint
  world_frame: odom

  odom0: /fusion/odom
  odom0_config: [false, false, false,
                 true,  true,  true,
                 true,  false, false,
                 false, false, false,
                 false, false, false]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  odom1: odometry/gps
  odom1_config: [true,  true,  false,
                 false, false, false,
                false, false, false,
                 false, false, false,
                 false, false, false]
  odom1_queue_size: 10
  odom1_nodelay: true
  odom1_differential: false
  odom1_relative: false

  imu0: fusion/imu/data_raw
  imu0_config: [false, false, false,
                false, false, false,
                false, false, false,
                true , true,  true,
                true,  true,  true]
  imu0_nodelay: true
  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

  use_control: false
  stamped_control: false
  control_timeout: 0.2
  control_config: [true, false, false, false, false, true]
  acceleration_limits: [2, 0.0, 0.0, 0.0, 0.0, 3.4]
  deceleration_limits: [2, 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,    0,    0,    0,    0,    0 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-03-14 03:31:46 -0600

Salahuddin_Khan gravatar image

It worked after I removed all the forward slashes from the frame_ids

edit flag offensive delete link more

Comments

Great! Glad you found a fix.

Tom Moore gravatar image Tom Moore  ( 2018-04-09 03:54:37 -0600 )edit
1

answered 2018-01-26 03:01:23 -0600

Tom Moore gravatar image

updated 2018-01-26 03:01:54 -0600

Please post full sample messages for every sensor input.

Just looking at your config and the frame_ids you posted, I can make the following recommendations:

  1. Your odometry frame_id should not be in the base_link frame. The pose data should be in a world-fixed frame (e.g., odom). The child_frame_id is fine.
  2. Get rid of the rejection thresholds. Those are advanced parameters that should be avoided until the system is behaving the way you want.

But I can't say much more without sample messages. Downloading and reviewing bags is time-consuming, so it would help me a great deal if you could post some sample messages.

edit flag offensive delete link more

Comments

I apologise for posting a reply so late, I solved it after a few days of me posting question. Here's what I did. 1. I did change the frame_id of wheel odometry at later stage but since I was only fusing Longitudinal Velocity it worked then.2. Removed all the forward slashes from all the frame_id

Salahuddin_Khan gravatar image Salahuddin_Khan  ( 2018-03-14 03:29:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-11 04:35:33 -0600

Seen: 543 times

Last updated: Mar 14 '18