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

Using the Localization Package using only the GPS and IMU (no output odometry/filtered message being echoed)

asked 2017-04-04 01:06:39 -0500

gorpilla gravatar image

updated 2017-04-04 07:19:13 -0500

Hi Everyone, I am currently working on the Localization package in order to get position and velocity data for my robot using only a GPS and IMU. Right now when I try to run the program, my odometry/filtered topic does not output any data. I assume it is because it is not inputting any data for the odometry topic. The following is our launch / parameters files and a sample output of our GPS and IMU data.

My questions are: 1. How do I map / configure my data to give me an accurate odometry output? Is there anything more inputs I need to add? 2. How do I get a velocity output using the localization package?

I am fairly new to ROS so any feedback would be helpful, thank you.

current rqt_graphhttp://imgur.com/a/b2Wdm

Hardware GPS: Sparkfun IMU: Razor 9dof

GPS Output Data:

header: 
seq: 37
stamp: 
secs: 1491283112
secs: 297769069
 frame_id: /gps
status: 
 status: 0
 service: 1
latitude: 21.382495
longitude: -157.92706
altitude: 69.0
position_covariance: [1.44, 0.0, 0.0, 0.0, 1.44, 0.0, 0.0, 0.0, 5.76]
position_covariance_type: 1

IMU output data:

header: 
seq: 2108
stamp: 
secs: 1491283316
nsecs: 151560068
 frame_id: base_imu_link
orientation: 
  x: 0.0896993330926
  y: 0.023179361013
  z: 0.266404467092
  w: 0.959398460901
orientation_covariance: [0.0025, 0.0, 0.0, 0.0, 0.0025, 0.0, 0.0, 0.0, 0.0025]
angular_velocity: 
  x: 15.9
  y: -0.61
  z: -4.1
angular_velocity_covariance: [0.02, 0.0, 0.0, 0.0, 0.02, 0.0, 0.0, 0.0, 0.02]

linear_acceleration: 
  x: -0.037921640625
  y: 1.83019796875
  z: 9.490369375
linear_acceleration_covariance: [0.04, 0.0, 0.0, 0.0, 0.04, 0.0, 0.0, 0.0, 0.04]

Launch File:

<launch>

 <rosparam command="load" file="$(find robot_localization)/params/dual_ekf_navsat_example.yaml" />

<node pkg="nmea_navsat_driver" type="nmea_serial_driver" name="navsat" respawn="true">
  <param name="port" value="/dev/ttyACM0"/>
  <param name="baud" value="4800"/>
</node>

<arg name="razor_config_file" default="$(find razor_imu_9dof)/config/razor.yaml"/>
  <node pkg="razor_imu_9dof" type="imu_node.py" name="imu_node" output="screen">
    <rosparam file="$(arg razor_config_file)" command="load"/>
  </node>

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

  <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" clear_params="true">
    <remap from="/imu/data" to="/imu" />
    <remap from="/gps/fix" to="/fix" />
    <remap from="odometry/filtered" to="odometry/filtered"/>
  </node>

</launch>

Parameters File:

ekf_se_odom:
  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

  odom0: odometry/gps
  odom0_config: [true, true, false,
                 false, false, false,
                 false, false, false,
                 false, false, false,
                 false, false, false]
  odom0_queue_size: 2
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  imu0: imu
  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: [1e-3, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    1e-3, 0,    0,    0,    0,    0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-11 04:06:32 -0500

Tom Moore gravatar image

Your IMU data is in the base_imu_link frame. You need to provide a transform from base_link->base_imu_link. Otherwise, the EKF has no idea how to transform your IMU data before it can be fused. The same is true for your GPS. You should provide a base_link->gps transform. You should also get rid of the forward slash in the GPS message's frame_id (/gps should be gps).

Unrelated, but I would also recommend that you set the yaw value to true in your IMU configuration, and disable the accelerations. You have no velocity reference, so the accelerations are going to cause your velocity to grow without bound.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-04-04 00:54:55 -0500

Seen: 1,104 times

Last updated: Apr 11 '17