mpu6050+gmapping [closed]

asked 2020-03-19 08:16:23 -0500

dandolain gravatar image

updated 2020-03-20 04:47:40 -0500

Hi, I am trying to do gmapping using motors, encoders and MPU 6050 (I am using this library  https://github.com/fsteinhardt/mpu605...), to fusion the values i am using  robot localization package. When I used only  encoders values the map is  good. By using IMU the map overlapping Any idea how to fix this problem? C:\fakepath\IMG_٢٠٢٠٠٣٢٠_١٠٥٣٠١.jpg

The ekf_template. Yaml:
frequency: 50


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


#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: /odom


#x     , y     , z,
#roll  , pitch , yaw,
#vx    , vy    , vz,
#vroll , vpitch, vyaw,
#ax    , ay    , az

odom0_config: [true,  true,  true,
               false, false, false,
               true, true, true,
               true, true, 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

#x     , y     , z,
#roll  , pitch , yaw,
#vx    , vy    , vz,
#vroll , vpitch, vyaw,
#ax    , ay    , az


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

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

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]


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,     0,     0,    0,    0,    0.02, 0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.01, 0,    0 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Tom Moore
close date 2022-02-25 03:31:59.292725

Comments

It'll be helpful if you can share the config file, also an image explaining the issue you're facing.

parzival gravatar image parzival  ( 2020-03-19 08:21:15 -0500 )edit

Try changing your config files. As per the documentation

  • If the odometry provides both position and linear velocity, fuse the linear velocity.
  • If the odometry provides both orientation and angular velocity, fuse the orientation.
parzival gravatar image parzival  ( 2020-03-20 08:31:33 -0500 )edit

Consider test "imu0_differential: true". I only get success after setting it to true.

dpetrini gravatar image dpetrini  ( 2020-03-26 06:29:00 -0500 )edit

I tried that but i didn't work.

dandolain gravatar image dandolain  ( 2020-03-26 08:39:37 -0500 )edit

@dandolain did you try what I suggested?

parzival gravatar image parzival  ( 2020-03-26 08:43:38 -0500 )edit

@parzival, the enocders give me the orientation and the angular speed

dandolain gravatar image dandolain  ( 2020-03-26 09:02:10 -0500 )edit

@dandolain as I said earlier, select linear velocity and orientation from your odometry messages.

parzival gravatar image parzival  ( 2020-03-26 09:13:57 -0500 )edit

@parzival, so what's the benefit from the imu if i will use the encider values only?

dandolain gravatar image dandolain  ( 2020-03-26 09:42:37 -0500 )edit