Ardumower Sunray: Unterschied zwischen den Versionen
(→Phone App) |
(→Phone App) |
||
| Zeile 275: | Zeile 275: | ||
=Phone App= | =Phone App= | ||
| + | |||
| + | In this section you will download the App to your phone (Android or iOS) which is used to configure the maps for your mower. | ||
| + | |||
Using the phone app, you can: | Using the phone app, you can: | ||
* manually steer the mower | * manually steer the mower | ||
| Zeile 282: | Zeile 285: | ||
NOTE: all maps will be stored on the phone - however maps can be shared and then imported on other devices. | NOTE: all maps will be stored on the phone - however maps can be shared and then imported on other devices. | ||
| − | |||
| − | |||
1. Download Viewer App: | 1. Download Viewer App: | ||
Version vom 31. März 2020, 20:52 Uhr
'Mows like on rails...' This is an RTK GPS-based mower that you can build yourself. Ardumower RTK doesn't need a perimeter wire as it uses (cm-precise) RTK GPS.
This page describes how to build your own RTK-GPS mower. It requires an Ardumower DIY robotic mower system and a RTK-GPS kit. You can get the RTK mower as a whole kit in the shop too (click here to get the RTK mower or just the RTK kit).
Inhaltsverzeichnis
- 1 Videos (Demos/Tutorials)
- 2 What is RTK and what are the requirements (environment and hardware)
- 3 Assembling the chassis and PCB
- 4 Significant changes compared to Ardumower's initial firmware (Sunray vs. Azurit)
- 5 Installation steps
- 6 Bluetooth BLE UART module
- 7 PCB1.3 GPS pin fix
- 8 PCB1.3 odometry divider
- 9 RTK base
- 10 RTK rover
- 11 Rover configuration (messages)
- 12 Download, Arduino Code, Firmware
- 13 Phone App
- 14 Odometry test
- 15 RTK GPS test (invalid, float, fix) and FIX robustness and correctness
- 16 RTK float-to-fix recovery issues
- 17 XBee RF modules issues
- 18 GPS antenna selection guide
- 19 Bluetooth Low Energy (BLE) external antenna hack
- 20 IMU, sensor fusion
- 21 Recording perimeter polygon and exclusions polygons
- 22 How the waypoints are generated
- 23 How the path finding works
- 24 How the obstacle avoidance works
- 25 Discussion / questions / forum thread
Videos (Demos/Tutorials)
Click below to watch demo and tutorial videos to get an idea what you can do with this RTK system already:
- Intro: Waypoints, Mowing, Docking using cm-precise RTK
- Demo: Path planning and mowing demo video (showing cm-precise RTK mowing)
- Demo: Docking demo video (showing cm-precise RTK in docking station)
- Test: Testing RTK fix robustness (testing RTK fix robustness near walls, buildings)
- Test: Single GPS receiver test using Internet-based NTRIP client (SAPOS service)
- Test: Challenging environment test - measurement & visualization of float solution error
- Tutorial: How to use the app video (German with English subtitles)
- Podcast: Talk between Markus and Alexander about Ardumower RTK (German)
What is RTK and what are the requirements (environment and hardware)
RTK-GPS uses two GPS receivers, one for the reference antenna (base) and one for the robot mower (rover) which both communicate in realtime via radio modules (see image below). The base constantly sends correction data so the rover can compute its cm-precise (relative) position. In the RTK-GPS kit, everything required (receivers, radios, antennas etc.) is included. Also, if you don't want to operate your own RTK base, you can use an external base service via Internet (e.g. like Germany's SAPOS). This will reduce the hardware cost by about a half.
To be able to use RTK-GPS, your robot mower should have a good view to the sky at all locations (see photo below). RTK-GPS will NOT work under extreme limited sky view, under trees, in buildings etc.
Some of the environments where we successfully tested RTK GPS:
Environment 'AG' (mostly open sky)
Environment 'ML' (slightly limited sky view, higher nearby buildings and trees)
These are the hardware requirements to add RTK-GPS to your Ardumower. You can purchase the required hardware from Marotronics
.
- Ardumower chassis kit using Ardumower motors (incl. odometry) and PCB 1.3 (incl. Arduino Due and MC33926 motor drivers)
- RTK kit (it's recommended to purchase the RTK-GPS modules via Marotronics as you get them pre-configured for the Ardumower there)
- Bluetooth 4.0/BLE UART module (CC2540)
- A smartphone (Android/iOS) for configuration of your Ardumower
Assembling the chassis and PCB
Please follow the steps described at the main page for assembling chassis, motors etc. and PCB1.3. After you have assembled the chassis and PCB you can follow the steps below for the RTK functionality.
Significant changes compared to Ardumower's initial firmware (Sunray vs. Azurit)
Ardumower Sunray is an alternative Firmware (experimental) for the Ardumower DIY robotic mower system. It uses RTK GPS to localize cm-precise without a perimeter wire. It requires Ardumower PCB1.3, Arduino Due, Ardumower RTK kit, Bluetooth BLE and a phone (Android/iOS).
- Optimized for PCB 1.3
- Optimized for Arduino Due
- Optimized for RTK
-
Incomplete (Sunray is 'work in progress') - features like docking, GPS signal-loss detection, obstacle detection and avoidance are going to be added soon. -
Experimental: everything you see in the videos is already working but in early prototype phase (never run your Ardumower unattended with this firmware)!
Use Azurit Firmware instead if you need a firmware with more complete features for your Ardumower...
Installation steps
Bluetooth BLE UART module
1. Install Bluetooth 4.0/BLE module on your Ardumower PCB1.3 (replace any installed Bluetooth 2.0 module).
IMPORTANT: Verify the pinout of your BLE module is matching your Ardumower PCB pinout (shown at the PCB1.3 back side)!
2. Set JP10 (Bluetooth signal level) to 3.3V
3. Set JP4 (Bluetooth voltage) to 5V
4. Set JP7 (GPS voltage) to 5V
5. Set JP12 (GPS signal level) to 5V
PCB1.3 GPS pin fix
The pins TX3 and RX3 are incorrectly routed on PCB1.3 - Fix it by swapping the TX3 and RX3 pin headers as shown below.
You can see the fixing process in this video: https://youtu.be/T-EqU5azCAU?t=140
PCB1.3 odometry divider
The PCB1.3 odometry divider for the left and right motors should be configured as follows (NOTE: no need to change the mower divider, you can keep your existing mower divider configuration):
RTK base
Method 1: Your own RTK base
WARNING: Handle your GPS modules with care, it is an expensive piece of hardware. If you have any doubt, or if you are unsure, please ask in the Ardumower forum for help.
1. Make sure you have the simpleRTK2B module marked as 'BASE' in your hands (look at simpleRTK2B PCB label at backside!)
2. Connect Xbee LongRange dipole antenna
3. Connect GPS multifrequency patch antenna. NOTE: antenna cable is very sensitive, never bend the antenna cable! Minimum bend radius: 5cm!
4. Connect a USB 5v power supply to the USB port marked as 'POWER+GPS'
5. Install the GPS base antenna - it should have clear view to the sky in all directions without any obstacles. For best results install GPS antenna on the roof. Alternatively, if you have an open area (without trees and other obstacles), you can install the base antenna on a tripod.
NOTE: The robot mower will get and save all position coordinates relative to the base antenna (East, North) - do not move the base antenna after recording the virtual perimeter with the phone app.
6. Improving position solution robustness: for robust position solutions (FIX), you will need to install a (conductive) ground plane (10x10cm, make it round if possible) for the patch antenna. Install the patch antenna on top of it like shown below. This will get you most robust position results.
Method 2: Using an RTK external base service (Internet-based)
This section describes how to use an external Internet-based correction service (NTRIP, e.g. SAPOS in Germany, SWEPOS in Sweden, ASG-EUPOS in Poland, and others) instead of your own base station. You can reduce cost with this method because you don't need an RTK base PCB. Instead you will require the WiFi NTRIP Master module for your rover PCB from Marotronics. Follow these steps for the rover PCB:
1. Instead of the XBee module install the WiFi NTRIP Master module on your rover PCB as shown in above photo.
2. Use your smartphone or laptop to connect to the WiFi network that the module created, with name “ESP_XBee_XXXXXX” where XXXXXX is a random number.
3. Go to your browser and type the following address “192.168.4.1”, a web interface will appear.
4. Configure your preferred NTRIP service provider (host, port, mountpoint, username, password), and through which WiFi network should it connect to internet. Example NTRIP mount points (Germany SAPOS service generating virtual reference station):
Nordrhein Westfalen (SAPOS HEPS): VRS_3_4G_NW Berlin (SAPOS HEPS): VRS_3_2G_BE
5. Save configuration and reset the system. From now on, every time the WiFi hotspot you configured is in range, the WiFi NTRIP Master will connect autonomously and provide RTK corrections to your rover PCB.
6. Connect the rover PCB via USB to your PC, and make sure NMEA protocol out is activated for UART2 out at 115'200bps (configuration view-> message 'PRT (Ports)'). Also make sure NMEA GGA message is active active on UART2 (configuration view->message 'MSG (Messages)'->F0-00 NMEA GxGGA). Some NTRIP service providers need this NMEA message to compute a virtual base station (VRS) based on the initial estimated GPS fix position.
7. Finally, verify the LED 'XBEE-GPS' is blinking (the rover receives correction data) and the correction age (seconds) shown near the fix solution in the phone app is not increasing.
8. If your NTRIP base antenna position is not constant, you have to switch to position source mode 'absolute' in the App (see section App for more details).
How can I find out if my NTRIP provider (e.g. SAPOS) supports the required correction messages
You can verify the received correction messages (RTCM3) for the individual satellite systems (GPS, GLONASS, etc.) via ublox uCenter. Start the NTRIP client via 'Receiver->NTRIP client...'
...and then display the received RTCM3 messages via 'View->Messages View->UBX->RXM->RTCM':
These are the RTCM3 messages you should see:
1005: Stationary RTK reference station ARP
1074: GPS MSM4
1084: GLONASS MSM4
1094: GALILEO MSM4
1124: Beidou MSM4
1230: GLONASS code-phase
You can verify the satellite frequencies via 'View->Messages View->UBX->NAV->SIG':
These are the frequencies you should see for each satellite system:
GPS G1,G2,G3,... L1C/A
L2CL
L2CM
GLONASS R1,R2,R3,... L1OF
L2OF
GALILEO E1,E2,E3,... E1C
E5BQ
Beidou B1,B2,B3,... B1D1
RTK rover
WARNING: Handle your GPS modules with care, it is an expensive piece of hardware. If you have any doubt, or if you are unsure, please ask in the Ardumower forum for help.
1. Make sure you have the simpleRTK2B module marked as 'ROVER' in your hands (look at simpleRTK2B PCB label at backside!)
2. Connect XBee LongRange dipole antenna
3. Connect GPS multifrequency patch antenna. NOTE: antenna cable is very sensitive, never bend the antenna cable! Minimum bend radius: 5cm!
4. Connect PCB1.3_GPS_GND to simpleRTK2B GND
5. Connect PCB1.3_GPS_5V to simpleRTK2B 5V_IN
6. Connect PCB1.3_GPS_TX to simpleRTK2B TX1
7. Connect PCB1.3_GPS_RX to simpleRTK2B RX1
8. Connect simpleRTK2B IOREF to simpleRTK2B 5V_OUT (to choose signal voltage level 5v)
9. Install XBee antenna and GPS antenna on the Ardumower. The GPS antenna must be mounted at the position of the tire axle and between both tires (also known as 'control point' - see below):
10. Improving position solution robustness: for robust position solutions (FIX), you will need to install a (conductive) ground plane (10x10cm, make it round if possible) for the patch antenna. Place the patch antenna on top of it like shown below. This will get you most robust position results. Note: you do not have to ground the ground plane as the contact to antenna is capacitive.
Rover configuration (messages)
WARNING: Only apply the steps below for the ROVER module - not for the BASE module!!
NOTE: If you purchased your RTK-GPS modules at Marotronics, these modules should be pre-configured and you can skip this section.
1. IMPORTANT: Make sure the Ardumower is turned off!
2. Connect SimpleRTK ROVER module USB port marked as 'POWER+GPS' to your PC.
3. Download ublox u-Center and start it: https://www.u-blox.com/en/product/u-center
4. Choose 'Receiver->Connection' and choose your rover module COM port.
5. In this step we want to turn off all broadcast messages except one. Choose 'View->Configuration View'. Choose configuration message 'MSG (Messages)' and select one message after the other in the list (0A-37 MON-HW3, 0A-09 MON-HW, ..., etc.). For each message, make sure the selected message is turned off for UART1. Do NOT change anything for the ports UART2, USB etc. - only turn off all messages for UART1. Example for message '01-22 NAV-CLOCK' that has been deactivated for UART1:
Repeat this step for all messages in the listbox and turn off all messages for UART1.
6. Finally, activate the following messages for UART1 and USB:
01-12 UBX-NAV-VELNED 01-14 UBX-NAV-HPPOSLLH 01-3C NAV-RELPOSNED 02-32 RXM-RTCM
7. Choose configuration message 'PRT (Ports)', choose 'UART1', and set baudrate to 115200 for UART1:
8. Choose configuration message 'RATE (Rates)' and set measurement period to 200ms (5 Hz):
9. Choose configuration message 'CFG (Configuration)' and click on 'Send' to make the configuration in the rover persistent when the rover module is powered off.
10. Verify that the configuration is actually persistent in the rover module - disconnect the rover module and reconnect. Then go through all previous steps and verify that the configuration is still present.
11. IMPORTANT: Disconnect USB cable from rover module!
Download, Arduino Code, Firmware
In this section you will upload the Arduino code ('Sunray Firmware') to your Ardumower.
1. Download Ardumower Sunray Firmware and unzip it: https://github.com/Ardumower/Sunray/archive/master.zip
2. Open the Arduino sketch 'sunray.ino'.
3. Start Arduino IDE, and upload the sketch to your Arduino Due on the Ardumower PCB1.3.
2. After uploading, start your Ardumower - after a short while you should hear a 'beep'. Ardumower is now ready for your commands!
Phone App
In this section you will download the App to your phone (Android or iOS) which is used to configure the maps for your mower.
Using the phone app, you can:
- manually steer the mower
- record the virtual perimeter and exclusions
- calculate the waypoints for the mower
- start/stop the mower
NOTE: all maps will be stored on the phone - however maps can be shared and then imported on other devices.
1. Download Viewer App:
For Android, download Evothings Viewer: https://play.google.com/store/apps/details?id=com.evothings.evothingsviewer For iOS, download CGTek Viewer: https://apps.apple.com/de/app/cgtek-viewer/id1135118284
2. Start App and enter the connection URL as show below and press 'Connect':
3. The App should start as shown below:
NOTE: The robot mower will get and save all position coordinates relative to the base antenna (East, North) - do not move the base antenna after recording the virtual perimeter.
| invalid | no DGPS solution was found |
| float | DGPS solution was found but it is ambiguous and therefore not precise (average error ~20cm). |
| fix | DGPS solution was found and it is cm-precise - position is tracked in realtime (RTK) |
| age | The age (in seconds) of the DGPS correction data sent from base |
The rover will always use relative coordinates for the map etc. The map origin (0,0) for the maps can be choosen. In the App, you can choose between two position source modes:
relative: the rover coordinates are always relative to the base antenna absolute: the rover coordinates are computed as relative to some specified (arbitrary) world coordinate (see image below)
Odometry test
Both, the robot's motor odometry and GPS-RTK are used to localized the robot. Therefore, it is important to verify that the odometry is working correctly as shown below. Start the phone app and follow the steps below to verify that your mower odometry is configured correctly. For this test, make sure that your RTK is turned off (e.g. RTK base module is turned OFF)!
RTK GPS test (invalid, float, fix) and FIX robustness and correctness
The base and rover LEDs can be used for trouble-shooting. Verify that the LEDs are acting as described below.
The base and rover LEDs should be as follows:
| GPS>XBEE | should blink - your base module is sending satellite reference data to your rover module (via the XBee module) |
| XBEE>GPS | should be OFF - your base module should not receive any XBee/reference signal |
| GPS FIX | should be ON - your base module has found a valid GPS signal |
| NO RTK | should be ON - your base module is not performing RTK (real time kinematic) |
| GPS>XBEE | should be OFF - your rover module should not send any XBee signal |
| XBEE>GPS | should blink - your rover module is receiving satellite reference data from your base module (via the XBee module) |
| GPS FIX | should be ON - your rover module has found a valid GPS signal |
| NO RTK | should be OFF - your rover module has found a RTK FLOAT or FIX (is performing real-time kinematic) |
Fix robustness
Depending on the robot's location (e.g. near trees), it may take some time to get a RTK FIX solution. Also, it appears this RTK FIX can get lost quickly in the first minutes (e.g. near trees). However, after several minutes running time, the RTK FIX is more robust (even near trees). So, for best position results, let the GPS 'warm-up' some minutes at a location with good sky view.
Fix correctness
NOTE: If you power-on the receiver (mower) at limited sky view, the receiver may get a RTK FIX solution but this FIX may be incorrect (and all following data is offset by this incorrect start position!). Therefore it is recommended to always power-on the receiver (mower) at a position with good sky view and to always power-on at the same position!
RTK float-to-fix recovery issues
If you experience RTK float-to-fix recovery issues (no fix after timeout), the problem might be satellite reflections in the navigation solution:
The solution to this problem is to configure a signal strength filter (dB) like below (to filter out satellite reflections). It is assumed that reflective signals have a significant lower signal strength than direct satellite signals.
These parameters were discovered experimentally using a GPS trajectory test with limited sky view and reflections:
XBee RF modules issues
We experienced that the XBee mid-range modules have a very limited bandwidth, activating the RTCM3 messages at highest rate (1 Hz) at the base will not work stable and data corruption occurs at the rover and the rover is not getting a stable RTK FIX. You can verify this by looking at the rover's MON-COMMS message using u-center:
If the skipped bytes increase all the time, your base XBee is sending too much data and you have to reduce the bandwidth at the base by reducing the message rates.
For the XBee mid-range modules the following rates have shown to reduce bandwidth and we were able to get a robust RTK FIX all the time:
---- base RTCM3 message rates --------------- rate 10 1005: Stationary RTK reference station ARP 1 1074: GPS MSM4 2 1084: GLONASS MSM4 3 1094: GALILEO MSM4 0 1124: Beidou MSM4 2 1230: GLONASS code-phase
You can change the message rates at the base via the configuration of the CFG-MSG message, choosing the above RTCM3 messages and setting zero (0) to turn a a RTCM3 message off or a non-zero rate value for the message rate. For example setting the rate to 1 means every second, 2 means every two seconds etc. Do not forget to send and save the base configuration.
GPS antenna selection guide
We are currently experimenting with different GPS antennas for the rover.
gain of different multi-band antennas:
Survey GNSS Multiband antenna: 40 dB Helical antenna for multiband GNSS: 33 dB Patch antenna for multiband GNSS: 28 dB
Bluetooth Low Energy (BLE) external antenna hack
This might be the right hack for you :-) This is how I added an external SMA antenna to the Bluetooth 4.0/BLE UART module (CC2540). Happy hacking :-)
WARNING! Modifications to RF antennas, RF signal pathes on PCB's etc. are risky and you will loose general permission to operate the device - you may radiate additional unknown signals due to your modifications. Be warned of that!
IMU, sensor fusion
Optional: You can install an IMU (MPU9250) like shown below to improve short-term direction measurements (in addition to wheel odometry). NOTE: IMU support has not been tested thoroughly (for a longer duration) yet.
Remember: Set PCB1.3 jumper JC2 (I2C pullup level) to 3.3V for IMU connector (if not set correctly you may experience I2C issues)
The following image shows how the sensor fusion of all data (RTK GPS, odometry, IMU) happens:
Recording perimeter polygon and exclusions polygons
When recording perimeter and exclusions make sure that your perimeter polygon and each of your exclusion polygons do not overlap itself and other polygons.
Example of one polygon overlapping itself and one polygon overlapping another polygon (not allowed):
Also, when recording your exclusions, make sure there is enough space around obstacles for entry and exit points where the mower needs to rotate!
How the waypoints are generated
This section describes how the waypoints are calculated based on the recorded perimeter polygon and the recorded exclusion polygons.
Example maps:
How the path finding works
This section describes the algorithm that computes the path finding from one source point to some destination point considering obstacles (perimeter and exclusion polygons). Among other things, the path finding is used to compute the path from one ring to another.
How the obstacle avoidance works
NOTE: This is not implemented yet... This is how the robot may react on unplanned obstacles.
Discussion / questions / forum thread
If you have any doubt, or if you are unsure, please ask in the Ardumower forum for help:
Link to forum: https://forum.ardumower.de/threads/sunray-firmware-goes-rtk.23690/