I currently have an APM 2.6 that is set up with Windows Mission Planner. From this I am able to use a python script that can print
status variables from the telemetry data sent by the APM that is displayed in Mission Planner.
However, I am also trying to implement a flood-fill algorithm using python. Basically, from the appropriate GPS data, I
want the script to be able to realize which GPS coordinates my rover has visited and set waypoints to coordinates not yet visited.
To not get bogged down in the details of my situation - I will need additional sensors connected to the APM to accomplish flood fill, but because it will probably overload the processing power of the APM, these sensors are hooked up to an Arduino, which sends serial data to a Raspberry Pi. My question from this is, am I able to send these serial data from the Pi to the APM, which can then be transmitted together with the telemetry data that is displayed on Mission Planner? I am serving as a programmer for my college robotics team, so I do not have much understanding of the electronics side of things, so it will help if explanations are in simple electronics terms. Other than that, thank you all for who will be trying to help!
Below is additional details on what our team is working on if it applies to answering this question:
We are participating in a rescue robotics competition whose goal is to have a rover that can read QR codes from buckets in a grass field. As of now, our problem is with trying to implement flood-fill that can automate our rover completely. The idea is that we place the rover in the zone of operation, and with the algorithm, visit areas that are not yet marked as visited. These areas will be divided by GPS coordinate grids, and each coordinate grid might or might not have several QR buckets that need reading. The APM has GPS coordinates which the python script can use to implement part of the flood-fill, but to truly know if a 'grid' has been visited to be marked as 'filled', we need to know if all the QR buckets that have been detected in the grid have been read. We have additional sensors that have been programmed to detect QR buckets and read them. However, this is not in sync with the APM. Essentially, this means that even if all the QR buckets have been read in a GPS 'grid', APM and (hence,) Mission Planner's python script doesn't know that a grid has been 'filled' and the python script would not know when to mark a grid as visited. This is where the Raspberry Pi needs to be able to send serial data to APM, and the APM needs to be able to send this data to the Mission Planner.