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

fusing IMU and GPS,make rosbag manually

asked 2018-02-22 07:15:22 -0500

omoyouo gravatar image

updated 2018-02-24 01:39:41 -0500

I want to fusing IMU and GPS data to smooth the GPS data,and I followed the question https://answers.ros.org/question/2000... . I write my launch file and parameter.yaml .And I make my rosbag file,but I do not know how to set the imu data frame id and gps data frame id.

And the rqt_graph is as follows :https://imgur.com/a/wNaLG

############################################

<launch>

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


  <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">
    <remap from="odometry/filtered" to="odometry/filtered_map"/>
  </node>

</launch>

##################################################

ekf_se_map:
  frequency: 30
  sensor_timeout: 0.1
  two_d_mode: false
  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

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

  imu0: imu/data
  imu0_config: [false, false, false,
                false, false, 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,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    1e-3, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0.3,  0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0.3,  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.5,   0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0.5,   0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0.1,  0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0.3,  0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.3,  0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.3,  0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.3,  0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.3,  0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.3]

  initial_estimate_covariance: 
                               [1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    1.0,  0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0 ...
(more)
edit retag flag offensive close merge delete

Comments

Please clarify, is the question on how to set the frame_id in the messages of the bag file?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-02-23 05:38:48 -0500 )edit

Yes,you can say that

omoyouo gravatar image omoyouo  ( 2018-02-24 01:24:20 -0500 )edit

How about using the rosbag API to set the frame_id. Start with the 1.1 example and set msg.header.frame_id instead of msg.header.stamp

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-02-24 23:01:55 -0500 )edit

Yes,you can see it from the bag file script (at the last).I set the imu message frame id to 'odom' and the gps message to 'gps'

omoyouo gravatar image omoyouo  ( 2018-02-25 04:19:38 -0500 )edit

Have missed the script, whats your problem with it?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-02-25 05:15:49 -0500 )edit

The problem is that it dose not work.I set up these two frame_id casually,I wonder if this is the reason that the project did not work.If so ,what should I set up?

omoyouo gravatar image omoyouo  ( 2018-02-25 05:44:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-25 09:55:24 -0500

Wolf gravatar image

If you just want to fuse a GPS + IMU to a smooth tf maybe geodetic_utils is an alternative solution. The

https://github.com/ethz-asl/geodetic_...

listens to both for fusing them an broadcasting tf

See:

https://github.com/ethz-asl/geodetic_...

edit flag offensive delete link more

Comments

I think "fusing" is rather a misleading word in this context. geodetic_utils can merge together an IMU message and a GPS message but for sure it does not "fuse" IMU measurements to smooth out GPS coordinates.

Femer gravatar image Femer  ( 2018-02-25 12:51:23 -0500 )edit

I just want to use the IMU data (about 1Khz) to smooth the GPS data (1Hz),so I can use the filtered gps results (may be 1Hz) as the groundtruth in a way.

omoyouo gravatar image omoyouo  ( 2018-02-25 20:14:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-22 07:15:22 -0500

Seen: 609 times

Last updated: Feb 25 '18