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.2 Draw GPS track

Draw GPS track

This function plots real-time GPS data information and displays it in RVIZ.

1. Implementation principle

It is impossible to directly visualize GPS information. We need to convert the coordinate system and convert the GPS trajectory from the latitude and longitude WGS-84 coordinates to the real world XYZ coordinate system. With the XYZ coordinates in the real world, we can display the path through RVIZ and simulate the trajectory of GPS. The trajectory is to accumulate the position of each GPS coordinate relative to the first coordinate, and then accumulate to get the trajectory.

2. Startup steps

terminal input,,

roslaunch nmea_navsat_driver gps_path_to_rviz.launch

image-20220616152545671

In the interface displayed by RVIZ we can see that the green line is slowly extending, as shown in the following figure,

image-20220616152752919

3. Launch code analysis

​x
<launch>
    
    <arg name="port" default="/dev/myserial" />
    <arg name="baud" default="9600" />
    <arg name="frame_id" default="gps" />
    <arg name="time_ref_source" default="gps" />
    <arg name="useRMC" default="False" />
    <node name="nmea_serial_driver_node" pkg="nmea_navsat_driver" type="nmea_serial_driver" output="screen">
        <param name="port" value="$(arg port)"/>
        <param name="baud" value="$(arg baud)" />
        <param name="frame_id" value="$(arg frame_id)" />
        <param name="time_ref_source" value="$(arg time_ref_source)" />
        <param name="useRMC" value="$(arg useRMC)" />
    </node>

    <node name="gps_path_node" pkg="nmea_navsat_driver" type="Draw_GPS_Path" output="screen"/>  
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find nmea_navsat_driver)/rviz/gps_path.rviz"/>
</launch>

Three nodes are started, namely nmea_serial_driver_node to read GPS data, gps_path_node to draw GPS data trajectory and rviz node.

Among them, the source code GPS_Path.cpp of the gps_path_node node can be seen under nmea_navsat_driver/src.

Preparing the GPS module for use
Fusion of IMU and GPS data

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
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文