This project exposes a gRPC API to control a drone.
- It uses Protobuf to define the API and Go language to implement it.
- It uses the MAVLink Protocol to control the drone.
- MAVLink Protocol Specification: Used to control the drone.
- MAVLINK Common Message Set: Part of the above specification that contains a set of common messages and commands that should be implemented by MAVLink-compatible systems.
- MAVLINK Common Message Set in XML format: The common message set in a structured XML format. This is easier for programmatic understanding. Note that this set includes standard.xml, which itself includes minimal.xml. For a pull understanding of the protocol, it's important to understand all three.
- PX4 implementation of MAVLink Specs: This page from the PX4 Guide describes how PX4 implements the MAVLink protocol. Specifically look at Other MAVLink Mode-changing Commands for a list of specific commands to change modes. These can be more convenient that just starting the mode, in particular when the message allows additional settings to be configured.
- gomavlib: The Go library used to send MAVLink commands to the drone and receive MAVLink messages. Especially, look at the examples directory to understand MAVLink workflows to achieve specific goals.
- Protobuf Style Guide
- Use Go for all new files
- Follow the project structure defined in README.md
- When writing comments for functions, use the following format:
// FunctionName
// Describes what the function does, starting with a verb (e.g., "Converts", "Processes", "Validates").
// Additional sentences provide more details.
func FunctionName(param Type) ReturnType {
// ...
}Example:
// HeartbeatMessageToMap
// Converts a HEARTBEAT message to a map with decoded fields for better readability.
// For example, the PX4 CustomMode is decoded into a human-readable format.
func HeartbeatMessageToMap(msg *common.MessageHeartbeat) (map[string]interface{}, error) {
// ...
}