yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
GPS Module📖
1.GPS module information
  • GPS module information
2.MCU course
Arduino course
  • 1.Test course
  • 2.Parse course
Jetson nano course
  • Parses location information
RaspberryPi course
  • Parses location information
STM32
  • GPS parsing output
3.ROS course
  • 3.0 Instructions for use
  • 3.1 Preparing the GPS module for use
  • 3.2 Draw GPS track
  • 3.3 Fusion of IMU and GPS data
  • 3.4 GPS and Move_Base Navigation
Download
  • Datasheet
  • Code
  • PC software
  • ROS_VM
  • 3D_Model_File
Download ZIP

Welcome to GPS Module repository

3.3 Fusion of IMU and GPS data

Fusion of IMU and GPS data

This function fuses IMU and GPS data and displays the fused data in Rviz.

1. Run

terminal input

roslaunch imu_gps_localization imu_gps_localization.launch 
rosbag play gps.bag

After running, with the playback of data packets, in Rviz the green track is also continuously extended, representing the position after fusion,

image-20220616154457009

In this case, we use the data package in the folder as a demonstration. In actual development, we need to use the rosbag tool to record the data of IMU and GPS.

We can view the contents of this packet through rosbag info gps.bag ,

image-20220616160727273

The content of the topic part is the topic recorded by this data packet. It can be seen that IMU (/imu/data and /imu/mag and GPS (/nmea_sentence) data are included.

During operation, we can also view the node graph to see the topic transmission between nodes, terminal input

xxxxxxxxxx
rosrun rqt_graph rqt_graph

image-20220616161214393

2、launch file

​x
<launch>
    <param name="acc_noise"       type="double" value="1e-2" />
    <param name="gyro_noise"      type="double" value="1e-4" />
    <param name="acc_bias_noise"  type="double" value="1e-6" />
    <param name="gyro_bias_noise" type="double" value="1e-8" />

    <param name="I_p_Gps_x"       type="double" value="0.0" />
    <param name="I_p_Gps_y"       type="double" value="0.0" />
    <param name="I_p_Gps_z"       type="double" value="0.0" />

    <param name="log_folder"      type="string" value="$(find imu_gps_localization)" />

    <node name="nmea_topic_driver" pkg="nmea_navsat_driver" type="nmea_topic_driver" output="screen" />
    <node name="imu_gps_localization_node" pkg="imu_gps_localization" type="imu_gps_localization_node" output="screen" />

    <node pkg="rviz" type="rviz" name="rviz" output="screen" 
      args="-d $(find imu_gps_localization)/ros_wrapper/rviz/default.rviz" required="true">
    </node>

</launch>

Among them, the node imu_gps_localization_node is used to fuse IMU and GPS data. Its source code is located in imu_gps_localization-master/ros_wrapper/src. The focus is on localization_wrapper.cpp , which includes subscription topics, fusion data and publishing topic data.

Draw GPS track
GPS and Move_Base Navigation

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文