Autonomous Navigation: The Aquabots Connectivity Layer
Day 3 of the Aquabots Autonomous Vessels project marks a critical transition from hardware assembly to system integration. While previous stages focused on "Adding the GPS," this phase implements the Update Cycle—the ability for the vessel to consistently report its global coordinates to the Aquabots Client server, transforming a static boat into a trackable IoT asset.
The Modular Software Architecture
To manage the complexity of an autonomous vessel, the project utilizes a Distributed Module architecture on the Arduino Mega 2560. This separation of concerns prevents a "Monolithic" code failure:
- WebClient Module: Acts as the gateway. It manages the HTTP/TCP handshake with the Aquabots server, ensuring data remains secure and transmission is efficient.
- Registration Module: Handles the unique vessel identity. It ensures that the coordinates sent are attributed to the correct hull ID in the central fleet database.
- TinyGPS Module: This is the data generator. By tapping into Serial1 of the Mega, it parses raw NMEA sentences into readable Latitude and Longitude floats.
- Vessel Module (The "Heart"): Orchestrates the other modules. It retrieves the latest parsed data from TinyGPS and pushes it to the WebClient at a regular interval.
Overcoming Signal Latency
Reporting GPS data in a marine environment presents unique challenges:
- RF Signal Management: The Adafruit GPS Antenna is crucial for maintaining a lock in open water. The project ensures that even for "Cold Starts," the autonomous logic doesn't trigger until a 3D-fix is confirmed.
- Coordinate Precision: Reporting coordinates as high-precision floats ensures that drift can be calculated down to the centimeter, essential for the future implementation of PID-based steering.
- Continuous Polling: Unlike a car tracker that might update once a minute, an autonomous vessel requires frequent updates to correct for currents and wind, which are handled in the main
loop()through theVesselmodule's non-blocking timing.
Roadmap to Autonomy
By establishing this reliable telemetry link, the foundation is laid for Day 4: Revving the Servos. Once the vessel knows where it is and can tell the server, the server can begin sending back "Waypoints," effectively beginning the autonomous journey across the water.
It's been a while since Day 2 of our project to develop an autonomous vessel. Sometimes personal issues get in the way of doing really fun stuff, but everything is out of the way and the past week we have been busy to do some testing and take off from where we left of previously.
As a small reminder, we can register a vessel with the Aquabots Client, and have just added a Grove GPS unit to our Arduino, so that we can pinpoint the location. today we will add a bit of code so that the Aquabots Client will be able to continuously get the updated position provided by the GPS. The hardware (therefore) is exactly similar to that of day 2.
Today we will include all the software sources, so that we can see the dependencies between the various sources. The main entry is the Vessels module, which contains the well-known Arduino functions setup() and loop(). This module constructs four other modules, each with a dedicated task:
1: WebClient: manages the communications with the Aquabots Client
2: Registration: registers the vessel with the Aquabots Client (see day 1)
3: TinyGPS: Manages the GPS Unit connected to Serial1 of the Arduino Mega (see day 2)
4: Vessel. This is the new kid on the block! Currently it does little more than send the latitude and longitude of the vessel to the Aquabots Client. However, in the coming days we will add the servo controller unit, so that our vessel will really come to life!
With all the preparation done, we can finally look forward to getting the propellers turning, but we will reserve that for day 4.