Ask Your Question
0

navSat with hectorMapping for outdoor navigation

asked 2018-08-20 13:36:54 -0600

billyDong gravatar image

updated 2018-08-21 08:09:16 -0600

Hello,

I'm trying to configure a robot with GPS for outdoor navigation. For that I'm using robot_localization package with the navSat transform and I want to fuse hectorMapping for pathPlanning and obsctacle avoindance. I've seen this package I tried to replicate for my purposes, so I have this localization.yaml file:

# For parameter descriptions, please refer to the template parameter files for each node.

ekf_se_odom: # Used only for broadcasting odom to base_link transforms
  frequency: 30
  sensor_timeout: 0.1
  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: base_link
  world_frame: odom

# -------------------------------------
# Wheel odometry:

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

# -------------------------------------
# Laser scanmatching odometry:

  odom1: scanmatch_odom
  odom1_config: [false, false, false,
                 false, false, false,
                 true,  true,  true,
                 false, false, true,
                 false, false, false]
  odom1_queue_size: 10
  odom1_nodelay: true
  odom1_differential: false
  odom1_relative: false

# --------------------------------------
# imu configure:

  imu0: /imu/data
  imu0_config: [false, false, false,
                true,  true,  false,
                false, false, false,
                true,  true,  true,
                true,  true,  true]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false

  process_noise_covariance: [--- ]
  initial_estimate_covariance: [  ----]

ekf_se_map: # Used only for broadcasting MAP to ODOM transforms
  frequency: 30
  sensor_timeout: 0.1
  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: base_link
  world_frame: map

# -------------------------------------
# Wheel odometry:

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

# -------------------------------------
# GPS odometry:

  odom1: /gps/rtkfix
  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

# -------------------------------------
# Laser scanmatching odometry:

  odom2: scanmatch_odom
  odom2_config: [false, false, false,
                 false, false, false,
                 true,  true,  true,
                false, false, true,
                false, false, false]
  odom2_queue_size: 10
  odom2_nodelay: true
  odom2_differential: false
  odom2_relative: false

# --------------------------------------
# imu configure: (IMU is too noisy for this)

  imu0: /imu_um7/data
  imu0_config: [false, false, false,
                false,  false, false,
                false, false, false,
                false,  false,  false,
                false,  false,  false]
  imu0_nodelay: true
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false

  process_noise_covariance: [...]
   initial_estimate_covariance: [...]

My launch file for localization:

<?xml version="1.0"?>
<launch>

  <rosparam command="load" file="$(find agrob_gps_nav_stack)/params/localization.yaml" />
  <rosparam command="load" file="$(find agrob_gps_nav_stack)/params/navsat.yaml" />

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/>

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
    <remap from="odometry/filtered" to="odometry/filtered_map"/>
  </node>

  <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" clear_params="true" > <!-- output="screen" -->
      <remap from="odometry/filtered" to="odometry/filtered_map"/>
      <remap from="gps/fix" to="gps/fix"/>
      <remap from="imu/data" to="/imu_um7/data"/>
  </node>

</launch>

Here's the rviz image with the result after a rotation with the robot. The laser drifts from the map. Such thing does not happen if I use hector map to publish the tf between map and odom (but I don't do that because I want to use GPS)

rviz_imagehttps://imgur.com/a/w8TCBZJ

EDIT ... (more)

edit retag flag offensive close merge delete

Comments

the values, true and false, how are you choosing them? Or are you copying them from some other package and using those?

Choco93 gravatar imageChoco93 ( 2018-08-21 02:09:13 -0600 )edit

@Choco93 the values are copied from this package which is okay because i'm using the husky platform too.. in their solution they have commented the hector_map and switched for gmapping, but I want to use the hector map

billyDong gravatar imagebillyDong ( 2018-08-21 04:10:03 -0600 )edit

@Choco93 with the exception of IMU on map->odom transform, it's too noisy so I decided to not fuse any data from the IMU

billyDong gravatar imagebillyDong ( 2018-08-21 04:19:14 -0600 )edit

that's what I was thinking that it is probably from IMU, i usually just use yaw, you can try without angular velocities

Choco93 gravatar imageChoco93 ( 2018-08-21 08:00:40 -0600 )edit

@Choco93 the IMU is problematic, I set everything to false because it was to noisy. Even with just the yaw. Please see the edit on the question

billyDong gravatar imagebillyDong ( 2018-08-21 08:06:18 -0600 )edit

there is just angular drift, right? No linear drift?

Choco93 gravatar imageChoco93 ( 2018-08-21 08:10:23 -0600 )edit

@Choco93 no, theres linear and angular drift.. https://imgur.com/a/Rqxxcrz

billyDong gravatar imagebillyDong ( 2018-08-21 08:54:19 -0600 )edit

My best guess is that it's due to IMU, you can remove linear accelerations from IMU and then check, and as for angular drift check if you have madgwick filter running and if the output is meaningful.

Choco93 gravatar imageChoco93 ( 2018-08-23 02:13:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-23 04:16:56 -0600

billyDong gravatar image

in order to solve this I activated the laser odometry of hector map, and used the madgwick filter for IMU. If someone is trying to do something similar the first thing to do is to read this entire guide : http://docs.ros.org/jade/api/robot_lo...

Theres thing you should pay attention like, if your odometry data has linear velocity and position, you should fuse the linear position. If you have two or more sensors with the same data you should fuse the most reliable one or activate the differential mode. Robot localization considers an IMU with a common position so check if your acceleration in Z is 9.81 and not -9.81.. Turn the robot counterclock wise and check if the yaw increases and the angular velocity is positive...

After all of this, I'm going to leave here my localization.yaml file, and the launch for hector map and um7 IMU.

UM7_launch

hector_launch

localization

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

1 follower

Stats

Asked: 2018-08-20 13:36:54 -0600

Seen: 241 times

Last updated: Aug 23 '18