Tuesday, January 26, 2021

AMOS Servers and Correction Data

Over the past couple of weeks some good improvements were made to the internal communications software running on AMOS. When using the network / Internet communications mode, the previous method of communications relied upon running a server with a fixed IP address to act as a communications broker between AMOS and the host computer or phone that was being used to control the boat and view data. The server used some software that I had written called "BoatServer" and it just ran on an available Windows computer here at In Nature Robotics HQ (i.e. my basement). It required setting up the WiFi router to forward network traffic on a particular port to that computer, and also required both the host device and AMOS knowing what IP address our Internet service provider had assigned to the house. From time to time this address would change, perhaps once every few weeks. The solution was reliable most of the time, except when it wasn't. And when it wasn't, it would sometimes mean that either AMOS or the host device was unable to talk to the BoatServer software until the BoatServer software was forcibly closed and restarted. 

For a while I had been considering going back to the original simple network communications approach that I had started with a couple of years ago: running a TCP server directly on AMOS. This always worked quite well over the home WiFi network, but did not work at all when using the hotspot device on AMOS to get a cellular 4G connection to the Internet. Incoming server connections were not supported over the 4G connection. At least not directly. One possible solution was to make use of the remote.it service that I had used previously for controlling the boat over a PuTTY connection. Unfortunately though, this service seemed to have grown a bit in complexity since I used it last 2 years ago, and I was unable to follow their instructions for installing it on the Raspbian operating system that AMOS uses. So I tried switching to ngrok (https://ngrok.com/) instead, which thankfully worked great and was quite simple to install, allowing me to setup fixed IP addresses and ports for a PuTTY connection and a general TCP network / data connection for communicating between AMOS and the host device software. 

This new reliable mode of network communication was used to include RTK correction data from an RTK base antenna (once again setup on the playhouse roof). An FTDI USB-serial converter was used to receive the RTK correction data at the PC and transmit it to AMOS over the regular data / command link. At AMOS, the RTK data was extracted from the incoming commands and data and sent over a second USB-serial converter to the GPS receiver board, where it was used to apply corrections to AMOS's GPS position. The software running on AMOS was also slightly modified to output a GPS status number which was just 0, 1, or 2 depending on whether no GPS data was available, regular GPS data was available, or RTK-corrected GPS data was available. This was tested out in cold, windy weather this past weekend with pretty good results:

The above screenshot came from the map which was directly uploaded from BoatCaptain to ArcGIS. I'll try to embed the map below:

If the above map does not work, then this link will go directly to the ArcGIS web map: https://arcg.is/eLWaX0
I tried to position the boat next to known geographical landmarks: our fence, the corner of the driveway, the mailbox, a telephone pole, etc. At first, AMOS was consistently appearing about 2.5 m northwest of these real-world landmarks, until I realized that the base station position being used (it self-surveyed for about half an hour to find its own base position) was also off by about 2.5 m to the northwest. The GPS software had an option to key in your own latitude, longitude, and elevation. I was unsure of the elevation, so just used the self-surveyed result, but fine-tuning the latitude and longitude to the correct point on the playhouse roof resulted in very accurate AMOS positions, I believe to within 10's of cm of the actual location.
There have been some recent developments occurring in the workshop of Steven Fox. Check out these construction photos of the latest AMOS hull:

No comments:

Post a Comment