This thread was precipitated by my experience building prototype prototype hardware and software to perform manual control via a UAVTalk interface, and a related discussion of manual control via a telemetry modem. The UAVTalk and UAVObjects libraries are very good, and provide a very easy to use paradigm for communication both between modules within the flight computer and between the CC and the GCS vial telemetry, but I think a few enhancements would make them easier to expand as we add more hardware pieces to the system in the (near?) future.
So, why do I think we need to change UAVTalk, and what do I think needs changed?
- There is no general way to route messages through the system.
- Routing works well within a board, and the telemetry module supports routing between the main flight computer and the GCS, but there is currently no easy way to extend this.
- For example, my transmitter module sits between the GCS and the CC. Currently is simply relays all packets between the two, and injects GCSReceiver messages into the CC stream at set intervals.
- There is no way to e.g. add configuration UAVObjects into the transmitter, etc. One could siphon off packets for UAVObjects that it finds instantiated on the transmitter CPU, but that's still somewhat of a hack.
- ACKs and NACKs are simply relayed across the transmitter link, which may or may not be ideal. Bandwidth is decreased due to additional latency buffering the message in the transmitter box.
- I would like to have a mechanism where each link in the communication chain knows where each UAVObject is (ideally via automatic discovery), and is able to route packets accordingly
- Routing works well within a board, and the telemetry module supports routing between the main flight computer and the GCS, but there is currently no easy way to extend this.
- Currently there can only be a single (UAVTalk) packet in transit at a time, and only a single transaction (object transmit with ACK or object request) at a time. Also the receive thread transmits ACKs, NACKs, and objects after a request, which limits synchronous transfers.
- I implemented a mechanism in my transmitter branch that passes messages between receive and transmit threads that could probably be used to offload the transmission at least of object requests to the transmit thread, and would allow synchronous receives in this case, but it would require supporting multiple transactions (recording that an ACK or OBJ_REQ is outstanding).
- It would be nice to support additional functionality of the communications hardware if the hardware supports it (e.g. Xbee API mode, etc). This could allow multi-point networks, so the flight computer could talk to both the GCS and a transmitter directly, rather than having a pass-though box like I have now. It could also allow for re-transmission of just a single communication packet rather than the whole object in the case of a failed transmission, etc. Even more could be done one custom hardware/firmware, like the PipX.
- I think most of these requirements could be solved by adding a distinct network layer to UAVTalk that would handle the routing and transmission of packets.
Most importantly, we don't want to break what we already have, so we need to:
- Have minimal affect to the flight software performance (memory / CPU / flash usage) and telemetry link usage.
- Minimize code changes, especially to external interfaces.
- Minimize complexity
- Get core team buy-in (especially James
)
- UAVTalk essentially implements a distributed database of UAVObjects, where UAVObjects are stored within both the GCS and the flight software.
- UAVObjects are defined in XML, with code generated for both the flight software and GCS (and other languages).
- UAVObjects also contain metadata that defines how and how often the data is synchronized across the telemetry link.
- UAVObjects are also used to communicate between module in the flight software.
- UAVObject updates are in the flight software via event queues.
- UAVObjects are updated across the telemetry link via the telemetry module using the UAVObject metadata.
- Each UAVObject can have one or more instances.
- What UAVObjects require more than one instance?
- Is there always a single module that writes to each UAVObject (single writer, multiple reader)?
One thing that would be really helpful would be to come up with one or more "worst case" network diagram of what we might have in the future as far as interconnected hardware (GCS, Revo, Sensor board, OSD, ESCs, transmitter, ...). I think this would facilitate defining design requirements.



United States
Austria







