chaoshu的个人博客分享 http://blog.sciencenet.cn/u/chaoshu

博文

PerceptIn RTK GNSS System

已有 2499 次阅读 2020-3-31 22:18 |个人分类:GNSS|系统分类:科研笔记

PerceptIn由张哲和刘少山在2016年3月创办,主打SLAM技术,在创业之前,张哲是硅谷最热的AR增强现实创业公司Magic Leap的首席工程师(Lead Engineer),而刘少山在百度硅谷研发院担任高级架构师,从事无人车项目的操作系统和硬件交互研发。

官方网站:https://www.perceptin.io/

 RTK GNSS System:https://www.perceptin.io/post/perceptin-rtk-gnss-system


1. Introduction

This is part of the PerceptIn technology blog on how to build your own autonomous vehicles and robots.  The other technical articles on these topics can be found at https://www.perceptin.io/blog.


Figure 1: modular design architecture

In this article we present a step-to-step detailed guide on setting up your RTK GNSS system for high-precision localization (< 30 cm). Note that RTK stands for Real-Time Kinematic and is a technique that uses carrier-based ranging and provides ranges (and therefore positions) that are orders of magnitude more precise than those available through code-based positioning. The basic concept of RTK is to reduce and remove errors common to a base station and rover pair, as illustrated in Figure 2.


Figure 2: RTK GNSS [1]

In the rest of the article, we first introduce the RTK-GNSS architecture in section 2; in sections 3, 4, 5, we demonstrate how to setup a cloud server to broadcast base station correction signal, or the RTCM signal.  When a cloud server is not a good option, we also demonstrate how to setup FreeWave radio to broadcast RTCM signals.


2. RTK-GNSS Architecture

A RTK-GNSS system uses the satellite positioning measurement method of RTK (Real-time kinematic) carrier phase difference technology to obtain high-precision positioning. Figure 3 shows how we setup our RTK GNSS system: 

    First, the antenna of the base station (GPS Base) receiver is installed at a fixed position, and the installation requirements are as shown in Figure 4. 

    Second, setting the base station receiver fixed coordinates by calculating the average of the self-positioning over a period of time. 

    Third, connecting the base station receiver to the Raspberry Pi (NtripServer) through a serial cable, and transmits the location coordinates of the base station and the received satellite information to the cloud server (NtripCaster) in real time. 

    Fourth, the rover station (GPS Rover) connects the Raspberry Pi (NtripClient) by the serial port COM2 to receive the differential correction data from the cloud server, and simultaneously receives the satellite signal to solve RTK positioning.

    Finally, the rover station outputs positioning data by the serial port COM1.


Figure 3 RTK-GNSS Architecture


Figure 4 GPS Antenna installation requirements

Note that as PerceptIn customers, you can access PerceptIn’s RTK AWS cloud instance to get your RTCM signal, thus in this guide we will not go into the details of setting up the AWS instance. 


3. Setting up NtripServer and NtripClient on Raspberry Pi

3.1 Install the Raspberry Pi system

On Raspberry Pi Install and compile RTKLIB,open a terminal and run the following command :

            git clone https://github.com/tomojitakasu/RTKLIB.git

            cd /RTKLIB/app/str2str/gcc

            make //Compile and generate the str2str executable file

Create a Raspberry Pi access point,run the following command in the terminal 

           sudo apt-get install vim 

           git clone https://github.com/oblique/create_ap 

           cd create_ap

           sudo make install 

           sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq 

           sudo create_ap wlan0 eth0 access-point-name password //Create a WiFi access point


After setting up the WiFi access point successfully, you can use your laptop to connect the Raspberry Pi WiFi, and then log in to the Raspberry Pi via ssh pi@192.168.12.1.


3.2. Run RTKLIB-str2str on the Raspberry Pi

3.2.1 Base station side running ntrip server

The role of the Raspberry Pi is to connect 4G terminals and transmit differential signals over the network to the ntrip caster.

Figure 5 Connecting Raspberry Pi to GNSS Station

After the Raspberry Pi plugged in the 4G terminal and could access to the Internet, run the str2str program to send differential signals to the ntrip caster. The command is as follows:

           sudo home/pi/RTKLIB/app/str2str/gcc/str2str -in serial://ttyUSB0:115200:8:n:1  \

           -out ntrips://:password@IP:port/mountpoint

Then write the following command to the Raspberry Pi’s /etc/rc.local file to set the Raspberry Pi to run ntrip server automatically when starting. 

           nohup /home/pi/RTKLIB/app/str2str/gcc/str2str -in serial://ttyUSB0:115200:8:n:1 \

           -out ntrips://:password@IP:port/mountpoint > /dev/null &

3.2.1  Setting NtripClient at GNSS Rover 

The role of the Raspberry Pi is to connect 4G terminals and receive differential signals over the network from the ntrip caster. After the Raspberry Pi plugged in the 4G terminal and could access to the Internet, run the str2str program to receive differential signals from the ntrip caster. The command is as follows:

           sudo /home/pi/RTKLIB/app/str2str/gcc/str2str -in \ ntrip://user:password:@IP:port/mountpoint -out serial://ttyUSB0:115200:8:n:1

Then write the following command to the Raspberry Pi’s /etc/rc.local file to set the Raspberry Pi to run ntrip client automatically when starting. The setting format is shown as below :

           nohup /home/pi/RTKLIB/app/str2str/gcc/str2str -in \ ntrip://user:password@IP:port/mountpoint -out serial://ttyUSB0:115200:8:n:1 >/dev/null &


4. Setting base station and rover station

4.1 Base station setting 

Figure 6 Setting up base station


Figure 7 Components

1. Antenna

2. GNSS receiver module

3. Power supply (5V)

4. Magnetic foundation plate

5. Serial to USB connector

6. Antenna cable (TNC male to TNC male)

Base station hardware connection


Figure 8 Setup steps


Figure 9 Connection to PC

Then place the base antenna at a place with open sky, for example on a roof top as shown below: 

Figure 10 Placement of a GNSS base station antenna

 4.2 Base station software setting 

(a) sudo apt-get install cutecom

sudo cutecom

(b) set the base antenna position 

(1) input “freset” in the command line and press “Enter” button.

Figure 11 input the freset command


(2) input command: gpgga com1 1 

//set the output GPGGA frequency 1 Hz. If executed command successfully, you will see “$command,gpgga com1 1,response: OK * 49” and GPGGA message. 


Figure 12 “gpgga com1 1”command successful


  (3) input command: mode base time 60 1.5 2.5

   //If executed this command successfully will display “$command,mode base time 60 1.5 2.5, 

   response OK * 78 ”. Then we need to wait 60 seconds when the GPGGA fix status is 7,base 

   station set ok.

   $GPGGA,045526.00,2234.79008586,N,11355.59480467,E,7,25,0.6,34.7453,M,-3.7924,M,,*43


Figure 13 “mode base time 60 1.5 2.5”command successful

  

(4) input command: rtcm1006 com2 10

// command successfully you will see “$command,rtcm1006 com2 10, response OK * 03” 

(5) input command: rtcm1033 com2 10

// command successfully you will see “$command,rtcm1033 com2 10, response OK * 05”

(6) input command: rtcm1074 com2 1 

// Set GPS correction message, If command successfully you will see “$command,rtcm1074 com2 1, response OK * 36” 

(7) input command: rtcm1124 com2 1 

//Set BDS correction message, If command successfully you will see “$command,rtcm1124 com2 1, response OK * 32” 

(8) input command: rtcm1084 com2 1 

//Set GLO correction message, If command successfully you will see “$command,rtcm1084 com2 1, response OK * 39” 

(9) input command: rtcm1094 com2 1 

//Set Galileo correction message, If command successfully you will see “$command,rtcm1094 com2 1, response OK * 38” 

(10) input command: saveconfig 

// save config, If command successfully you will see “$command,saveconfig, response OK * 55”

(c) Connecting to the NtripCaster

The str2str module of RTKLIB is used to set up the NtripServer and NtripClient.

Steps to set up NtripServer in Linux:

(1) Compile RTKLIB

        git clone https://github.com/tomojitakasu/RTKLIB.git

        cd /RTKLIB/app/str2str/gcc

        make

(2) Test base station COM2 output to NtripCaster

Check the COM2 serial device number on PC (/dev/ttyUSB1 ) ,then execute follows command:

        sudo /home/perceptin/RTKLIB/RTKLIB-master/app/str2str/gcc/str2str -in  \ serial://ttyUSB1:115200:8:n:1 -out ntrips://:password@IP:PORT/Mountpoint

(3) If base station COM2 output to NtripCaster successfully, we need to plug the COM2 USB into the Base-station Raspberry Pi.


4.3 Rover Setting

4.3.1 Rover hardware setup

Rover station is composed of two GNSS antenna, which outputs the position and vehicle heading.

Figure 14 Rover hardware setup

Figure 15 Rover hardware components

1. GNSS antenna

2. GNSS receiver module

3. Power supply (5V)

4. Magnetic foundation plate

5. Serial to USB connector

6. GNSS antenna cable (TNC male to TNC male)



Figure 16 Rover station antenna installation


Figure 17 cable connection

  

4.3.2 Rover software setup

(a) Connect GNSS module

(1) Connect Rover station COM1 serial to PC

(2) sudo cutecom //Open serial port tool

(3) check the Rover station COM1 serial device number on PC (/dev/ttyUSB0), then click “Open device”.

(b) set the com1 output frequency     

(1) Enter command:gpgga com1 0.05

//set gpgga com1 output frequency to 20Hz,if command successful you will see “$command,gpgga com1 0.05, response OK * 63” 

(2)  Enter command: gprmc com1 0.05 

//set gprmc com1 output frequency to 20Hz, if command successful you will see “$command,gprmc com1 0.05, response OK * 7E” 

(3)  Enter command: gphdt com1 0.05

//set gphdt com1 output frequency to 20Hz, if command successful you will see “$command,gphdt com1 0.05, response OK * 7A” 

(4)  Enter command: headinga com1 0.05 

//set headinga com1 output frequency to 20Hz, if command successful you will see “$command,headinga com1 0.05, response OK * 1C” 

(5) Enter command: saveconfig

//save config, If command successful, you will see “$command,saveconfig, response OK * 55”

(c) connecting to the NtripCaster

The str2str module of RTKLIB is used to set up the NtipServer and NtripClient.

Steps to set up NtripClient in Linux:

(1) Connect Rover station COM2 serial to PC, check the Rover station COM2 serial device number on PC (/dev/ttyUSB1 ).

(2)Test Rover station COM2 receive RTCM data from NtripCaster, run the command:

sudo /home/perceptin/RTKLIB/RTKLIB-master/app/str2str/gcc/str2str  -in \ ntrip://:user:password@IP:PORT/Mountpoint -out serial://ttyUSB1:115200:8:n:1

If RTCM data successfully received from NtripCaster, the data size and rate would show on the screen, and the COM1 output GPGGA message would display fix status (the value is 4):

(3) If Rover station COM2 receives RTCM data from NtripCaster successfully, we need to plug the COM2 USB into the Rover-station Raspberry Pi.


5. FreeWave Radio Basic Configuration 

In previous sections, we demonstrated how to setup a cloud server to stream RTK correction data from a base station. However, if we don't want to set up a cloud server, we can utilize the FreeWave Radio to transmit RTCM data.

If we use FreeWave Radio to transmit RTCM data, we will not need a cloud server account and Raspberry Pi, we simply need to connect the COM2 serial interface of the Base station and Rover station to FreeWave Radio. The RTK-GNSS data transmission scheme by FreeWave radio is shown as below: 

Figure 18. The RTK-GNSS data transmission scheme by FreeWave radio

  

FreeWave 900 MHz or 2.4 GHz radios for use during evaluation of our RTK-GNSS receivers. Those radios need to be properly configured. Now we describe configuration steps for RTK base and RTK rover radios.  Note that radios can be configured using a simple serial terminal program or FreeWave Tool Suite. 


(1) Install Terminal Program:

        sudo apt-get install gtkterm 

(2) Radio Hardware Setup 

For configuration, radios should be connected to your computer via the RS-232 port using a straight RS-232 cable. If there is no RS-232 port on your computer, use a USB to RS-232 adapter. FreeWave radios require a 6 to 30 V DC power supply. Use the wall power adapter included with the radios, or a 12 V battery, to power radio during configuration. 

(3) Entering Radio Programming Mode 

Follow this steps to set radio in the programming mode. 

● Attach antenna to the radio board. Radio should be never powered without antenna attached. 

● Connect radio's RS-232 port to PC, use a USB to RS-232 adapter if necessary 

● Power up the radio 

● Open terminal program and configure port parameters to 19200 bps, 8 bits, no parity, 1 stop 

    bit, no flow control. 

    ○ In CoolTerm, click on Options button, set the parameters, then click Connect button. 

    ○ In GtkTerm, click on Configuration -> Port (Shift+Ctrl+s) 

● Press radio Programming Button located next to the Power Input on the radio board. 

(4) Programming Radio for RTK Base Station 

Follow these steps to program radio as a transmitter of RTK base station corrections. This radio will work as a Point-to-MultiPoint master. It will be able to transmit corrections to multiple rovers simultaneously. 

● Enter radio programming mode as described in the above Entering Radio Programming Mode section. 

● Press 0 (Set Operation Mode) 

    ○ Press 2 (Point to MultiPoint Master) 

    ○ Press Esc to return to the Main Menu 

● Press 1 (Set Baud Rate) 

    ○ Press 1 (115200) 

    ○ Press Esc to return to the Main Menu 

● Press 5 (Edit MultiPoint Parameters) 

    ○ Press 0 (Number Repeaters) 

        ■ Press 0 

    ○ Press 1 (Master Packet Repeat) 

        ■ Press 0 

    ○ Press 2 (Max Slave Retry) 

         ■ Press 0 

    ○ Press 6 (Network ID) 

         ■ Enter desired network ID value in range from 0 to 4095 except 255 and press  Enter 

            (value 255 will enable Call Book instead of Network ID). It is   recommended to use the 

            last three or four (when lower than 4095) digits of the   base station Radio Number as the 

            network ID. 

      ○ Press Esc to return to the Main Menu 

● Optionally, to change radio power output, press 3 (Edit Radio Transmission Characteristics) 

    ○ Press 5 (RF Xmit Power) 

        ■ On 900 MHz radio enter desired power level in range 0 to 10 (0 = 5 mW, 3 =  80 mW, 5 = 

            230 mW, 7 = 480 mW, 10 = 1W) 

        ■ On 2.4 GHz radio enter desired power level in dBm (20 dBm = 0.1W, 27 dBm  = 0.5 W) 

     ○ Press Esc to return to the Main Menu 

● Press Esc to Exit Setup 

● Power off the radio. Settings are saved in the radio's non-volatile memory. The radio is ready for RTK operation. 

(5) Programming Radio for RTK Rover 

Follow these steps to program radio as a receiver of RTK corrections. This radio will work as a Point-to-MultiPoint slave. It will not be able to transmit any data. Only receive it. Use the same radio settings for all rover radios in the system with multiple rovers. 

● Enter radio programming mode as described in the above Entering Radio Programming Mode section. 

● Press 0 (Set Operation Mode) 

    ○ Press 3 (Point to MultiPoint Slave) 

    ○ Press Esc to return to the Main Menu 

● Press 1 (Set Baud Rate) 

    ○ Press 1 (115200) 

    ○ Press Esc to return to the Main Menu 

● Press 5 (Edit MultiPoint Parameters) 

    ○ Press 0 (Number Repeaters) 

        ■ Press 0 

    ○ Press 1 (Master Packet Repeat) 

        ■ Press 0 

    ○ Press 2 (Max Slave Retry) 

        ■ Press 0 (Note: if transmission from rover to base is required, set Max Slave  Retry to 1) 

    ○ Press 3 (Retry Odds) 

        ■ Press 0 

    ○ Press 6 (Network ID) 

        ■ Enter the same network ID value as set in RTK base station radio above and  press <Enter> 

    ○ Press Esc to return to the Main Menu 

● Press Esc to Exit Setup 

● Power off the radio. Settings are saved in the radio's non-volatile memory. The radio is ready for RTK operation.  


References

(1) Real-Time Kinematic (RTK): 

https://www.novatel.com/an-introduction-to-gnss/chapter-5-resolving-errors/real-time-kinematic-rtk/




https://blog.sciencenet.cn/blog-858128-1226248.html

上一篇:Ubuntu 16.04 LTS安装Bernese5.2流程
下一篇:基于VS2019编译G-Nut/Anubis
收藏 IP: 58.19.92.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 18:35

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部