Skip to content

Warthog Emlid gps

dofor110 edited this page Aug 27, 2024 · 5 revisions

This page gives details on the code and usage of the three Emlid gps on the warthog.


General information

There are three gps on the warthog, two Emlid reach rs+ and one Emlid reach rs. Each of them has a name coming from the four last digit of their serial code. By default the gps are set to UART which mean they can communicate using the RS 232 cable. Below are the names of each gps and the COM port it is using.

  • E845 ----> COM1 ----> dev/ttyS0

  • 6802 ----> COM2 ----> dev/ttyS1

  • C959 ----> COM3 ----> dev/ttyS2

Here is a picture of the COM ports position, for more info on the warthog computer go there nuvo-9000-user-manual

IMPORTANT you will see that if you plug and unplug the cable, nothing will change in the dev/ directory. It's normal, the COM ports are always linked to the same tty wich is always there, it also means that no udev rules are needed.

Placing the right gps at the right place is also important because the code uses the position relative to each gps to compute the pose later. Below is a plan showing where to put the gps.

Charging the gps

It's important to notice that the rs 232 cable does not charge the gps. Hopefully new cable are coming that possibly would allow that. At the moment you have to charge the gps with usb cable.

Code description

The two packages used are:

The gpsx package is composed of gps_node, which is used to read the data from one gps and send a Gpsx message to a topic. Inside gpsx, there is a launch file emlid.launch.py used to launch everything. First of all it read the data and sends it to one topic for each gps. Basicaly it launches gps_node three times and renames it and the topic linked with the name of its gps. The coordinates_converter node subscribes to those topic and convert it to EPSG 2949 for x and y and z to EPSG 2955 (this is a fix since EPSG 2949 have no z and EPSG 2955 is very close to EPSG 2949). Then the coordinates_converter node publishes the value in one topic for each gps.

Configuration

To change the configuration of a gps you can connect with the browser or using the Emlid flow app on your phone.


Connect to the gps network, the password is "emlidreach"

If you are using the browser, enter the ip address on your browser "http://192.168.42.1/"

If you are using the Emlid flow app just select the gps in the app


To get data from a usb connection change position 1 in serial from UART or RS-232 to USB If you have some problem with the usb port showing, try changing the base setting to NTRIP local

This is the configuration of the gps when connected to the warthog with RS-232 cable


RTK

RTK has been set up on the three emlid gps on the warthog. The gps previously used on the backpack is used as base for the RTK. The base frequency is 902.0 Mhz. You can follow these tutorial for a detailed guide :

Base and rover set up

Setting up base position manually


Time synchronization

To do the synchronization, the gpsd and ntpsec package are used. There is an ntp.conf file in /etc/ntpsec that you should not have to touch. There is also a gpsd file in /etc/default , normally you dont have to change anything unless you want to synch with another gps. By default it communicate with the ttyS0 com port which is the E845 front gps. If you want to change that, go in the gpsd file and replace ttyS0 by ttyS1 or ttyS2 in DEVICES="/dev/ttyS0" depending on the gps you want to use.

Synchronizing the system clock with the gps clock.

  • Make sure that there is no instance of gpsd running already

    sudo systemctl stop gpsd.socket

  • Synch the clocks

    sudo systemctl start gpsd

  • Update the clock

    sudo systemctl restart ntpsec

You can use the "timedatectl" command to see if it worked. It should say that the clock is synch.

Wire

The base cable that came with the gps only had pin 1, 6 and 7 connected on both side. We add to connect the pin 5 on both side to be able to do the time synchronization. At the moment there is only the cable that we modified that allow pps.

For more info on how to configure the time synchronization click here


Work in progress

A node named pose_compute subscribes to those topic and, using the urdf data in tf_static, it compute the pose and publishes it to warthog_gps. (not working)

Norlab's Robots

Protocols

Templates

Resources

Grants

Datasets

Mapping

Deep Learning

ROS

Ubuntu

Docker (work in progress)

Tips & tricks

Clone this wiki locally