Shenzhen YZrobot Technology CO.,Ltd.

Technical center Current location:Home > Information Center > Technical center

ROS robot localization and navigation with GPS

Release time:2018-11-03Browsing times:3114Font:smallmediumlarge

1. Basic information of GPS

GPS positioning is a very popular technology. It is not exaggerated to say that almost everyone in today's society is

using it actively or passively. The most common application case is smart phone. Now every mobile phone has built-in

GPS positioning function, users can always know their location.



The full name of GPS is "Global Satellite Positioning System". At present, there are four main options for commercial

application: GPS system (USA), BDS system (Beidou, China),  GLONASS system (Russia) and Galileo satellite navigation

system (EU).


GPS is to use the network satellite signals received by the equipment to calculate the current exact location of the

equipment. The principle of implementation is not mysterious. If you want to know more about the technical principles,

please Baidu, which will not be repeated here.


There is no doubt that the GPS system in the United States is currently the most comprehensive and commercialized

preferred system. The Beidou system in China has developed rapidly in recent years. Although the positioning accuracy

and the scope of use of the system are still slightly lower than those of the United States, it is estimated that it will soon

reach or even surpass the United States.


The autonomous GPS systems in Russia and the European Union have not made significant progress in recent years due

to the financial budget costs. Therefore, the number of users is limited and they have not yet been fully popularized.


Feasibility and limitation of robot using GPS module to locate

The GPS module is a basic configuration for outdoor machine positioning and navigation. Note that this is mainly for

robots working outdoors. If your robot is used indoors, it will not be allowed to work outdoors at all, then the GPS

module has no value. Because the roof and wall of the building will greatly weaken the GPS satellite signal, the general

commercial level GPS module can not receive the required signal at all.


Are outdoor robots equipped with GPS modules to know exactly where they are?

Yes, it is but not exact! The reason is that on large-scale maps (the scale is about 100 meters per centimeter), the GPS

module of common commercial economy can generally achieve the positioning accuracy of 20 meters to 50 meters, and

the current position of the robot can be more accurately known on the map of 100 meters/centimeter level. No, it refers

to the micro-scale map of the robot's working area (usually less than 10 meters per centimeter). The position error

range given by the GPS module is too large. The longitude and latitude coordinates calculated by the GPS module alone

can not achieve the accurate positioning of the robot, and of course, the accurate direction of motion of the robot can

not be calculated. Unfortunately, the position error of 20 to 50 meters is unacceptable for the application of robots to

accomplish specified tasks.


Some people may be curious, why many commercial GPS module technical parameters are written on the accuracy of

2.5 meters, but you say here is 10 to 50 meters, is the GPS you use too LOW? Engineers who have used GPS modules

will tell you, yes! In theory, the error of 2.5 meters is nominal for the ordinary commercial economic GPS module. In

practical application, the error of 10-50 meters is very normal. There are many reasons for this error caused. We will

analyze them in the future paper.


3. ROS robot how to use GPS module to precisely locate

Seeing the above conclusion, does it mean that GPS has little effect on the positioning and navigation of robots? No!

Nowadays, robots are not only equipped with GPS sensors. Common robots are equipped with short-range accurate

ranging equipment such as lidar, sonar radar and visual ranging. Using these equipment, on the one hand, robots can

find obstacles around in time and avoid them in time, on the other hand, robots can also make use of them.


An accurate range sensor is written to realize localization, localization and navigation in local environment.

Obviously, using GPS module to locate the rough position in the range of 20-50 meters, and using the short-distance

precise ranging equipment (sonar, lidar, etc.) carried by the robot to achieve local precise positioning in a small range,

so that the outdoor robot can locate accurately in any size map range. That's right.


4. How to use GPS data in ROS robot localization system

Common commercial GPS module output data format conforms to NMEA0183 standard. Through serial communication,

robot can obtain GPS data examples as follows:

$GNGGA,084852.000,2236.9453,N,11408.4790,E,1,05,3.1,89.7,M,0.0,M,,*48
$GNGLL,2236.9453,N,11408.4790,E,084852.000,A,A*4C
$GPGSA,A,3,10,18,31,,,,,,,,,,6.3,3.1,5.4*3E
$BDGSA,A,3,06,07,,,,,,,,,,,6.3,3.1,5.4*24
$GPGSV,3,1,09,10,78,325,24,12,36,064,,14,26,307,,18,67,146,27*71
$GPGSV,3,2,09,21,15,188,,24,13,043,,25,55,119,,31,36,247,30*7F
$GPGSV,3,3,09,32,42,334,*43
$BDGSV,1,1,02,06,68,055,27,07,82,211,31*6A
$GNRMC,084852.000,A,2236.9453,N,11408.4790,E,0.53,292.44,141216,,,A*75
$GNVTG,292.44,T,,M,0.53,N,0.98,K,A*2D
$GNZDA,084852.000,14,12,2016,00,00*48
$GPTXT,01,01,01,ANTENNA OK*35


There are three data types in the data: GN, GP and BD, which represent the dual-mode mode mode, GPS mode

and Beidou mode respectively.

NMEA0183 protocol frame format content can refer to the following forms

(1) $GPGGA (GPS location information)

(2) L $GPGLL (geolocation information)

(3) A $GPGSA (current satellite information)

(4) $GPGSV (visible satellite information)

(5) $GPRMC (minimalist location information)

(6) $GPVTG (ground speed information)

(7) antenna status output.


We mainly use the data of GPGGA (or GNGGA) frame, and analyze them as follows:


1. UTC time, the format is hhmmss.sss, and the three seconds after the decimal point is ignored, that is 08 points 48

minutes and 52  seconds. UTC + time zone difference = local time time zone difference East is positive, West is

negative. In this regard, the time difference between East eight district is recorded as +08, so the Beijing time is

16:48 5 seconds.

2. The data format of longitude and latitude received is the gradient format. In practice, for convenience, it should be

converted into the degree + decimal decimal, for example:

Latitude: ddmm.mmmm north latitude 2236.945322+ (36.9453/60) =22.615755

Longitude: dddmm.mmmm east longitude 11408.4790 114+ (08.4790/60) =114.141317

3.  The eighth term is the attenuation factor, which represents the error level.



Robot positioning mainly uses longitude and latitude and attenuation factor three indicators. Longitude and latitude are

used to locate, and attenuation factor is used to calculate the location error radius.


For the maps of robots that have been drawn, the most frequently used PGM format occupancy maps in ROS framework

are positioned in the XY two-dimensional coordinate system in meters. This coordinate system and the longitude and

latitude coordinate  system provided by GPS need at least two points to calibrate and convert to each other. Therefore,

when robots use two.


In order to locate and navigate a space-occupying map in dimension PGM format, we must first select two points on the

PGM map as reference points for calibration (usually the origin of coordinates and the longest distance point on X axis

are selected as reference points for calibration), then record the latitude and longitude values of these two calibration

points, and calculate GPS longitude through riangular function of plane geometry.


Conversion function between latitude coordinate system and PGM map coordinate system, so that the longitude and

latitude data obtained by GPS can be corresponded to the map coordinates of the robot one by one.


In order to enable ROS robot to use the received GPS information for positioning and navigation, we need to write two

special nodes, one for reading the frame information of GPS module and the other for converting GPS information into

ROS map coordinates. The above latitude and longitude and PGM coordinates can be easily realized by C++ or PYTHON

transfer functions between them. Of course, the coordinate information transformed by the common commercial GPS

module has a precision error of about 10 meters to 20 meters, which requires the improved AMCL under ROS.


Only when the nodes are processed twice can the precise positioning and navigation of ROS-based robots, such as

patrol robots and security robots, be realized accurately.

 

 
Online chat
Mr.Wang

Service Hotline
+86 139 2383 0386
To
top