Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Docs transfer #32

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@
path = content/software/onboard/BlueOS-1.0
url = https://github.com/bluerobotics/ardusub-zola.git
branch = BlueOS-1.0
[submodule "ArduSub-4.0"]
path = content/software/flight-controller/ArduSub-4.0
url = https://github.com/bluerobotics/ardusub-zola
branch = ArduSub-4.0
[submodule "QGroundControl-4.0"]
path = content/software/topside/QGroundControl-4.0
url = https://github.com/bluerobotics/ardusub-zola
branch = QGroundControl-4.0
8 changes: 8 additions & 0 deletions content/developers/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "Developers"
description = "Developer documentation."
date = 2022-09-13T23:30:00+00:00
sort_by = "weight"
weight = 1
template = "docs/section.html"
+++
37 changes: 37 additions & 0 deletions content/developers/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
+++
title = "Contributing"
description = "Contribution Guidelines."
date = 2022-09-13T22:27:00+10:00
template = "docs/page.html"
sort_by = "weight"
weight = 0
draft = false
[extra]
lead = 'Our software and documentation are open for contributions - join us in developing the future!'
toc = true
top = false
+++

## Contribution Pathways

- [Blue Robotics](https://github.com/bluerobotics/software-guidelines)
- [ArduPilot](https://ardupilot.org/dev/docs/contributing.html)
- [Top Contributors](https://github.com/ardupilot/ardupilot#top-contributors)
- [How to Get Involved](https://github.com/ardupilot/ardupilot#how-to-get-involved)
- [QGroundControl](https://dev.qgroundcontrol.com/master/en/contribute/)
- [MAVLink](https://mavlink.io/en/contributing/contributing.html)

## This Documentation

Add a new section / version via a repository/branch as a submodule
```
git submodule add -b <branch-name> --name <section-name> <repository url> <path/to/desired/location>
```

### In General
1. Fork the repo
1. make a new branch for development
1. submit a pull request to the original repo
1. make changes as relevant
1. clean up commits with an interactive rebase and force push
1. sync your repo branch with the upstream branch once the PR is merged
1 change: 1 addition & 0 deletions content/software/flight-controller/ArduSub-4.0
Submodule ArduSub-4.0 added at e378e6
9 changes: 9 additions & 0 deletions content/software/flight-controller/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "Flight Controller"
description = "Versioned documentation for the different flight controller firmwares."
date = 2022-04-21T16:53:00+00:00
template = "docs/section.html"
sort_by = "weight"
weight = 0
draft = false
+++
9 changes: 9 additions & 0 deletions content/software/programmatic-control/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "Programmatic Control"
description = "Documentation for controlling ArduSub with a program."
date = 2022-06-09T19:45:00+10:00
template = "docs/section.html"
sort_by = "weight"
weight = 10
draft = false
+++
14 changes: 14 additions & 0 deletions content/software/programmatic-control/lua-scripts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
+++
title = "Lua Scripts"
description = "Documentation for lua scripting with ArduSub."
date = 2022-11-21T18:40:00+11:00
template = "docs/page.html"
sort_by = "weight"
weight = 0
draft = false
[extra]
lead = 'Lua scripts can be used to dynamically alter autopilot behaviour and parameters from within the flight controller.'
toc = true
top = false
+++
++
82 changes: 82 additions & 0 deletions content/software/programmatic-control/pymavlink/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
+++
title = "Pymavlink"
description = "Examples of using Pymavlink for programmatic control."
date = 2022-06-13T14:50:00+10:00
template = "docs/page.html"
sort_by = "weight"
weight = 0
draft = false
[extra]
lead = 'Pymavlink is a Python implementation of the MAVLink protocol. It can be used to read sensor data and send commands to an ArduSub vehicle.'
toc = true
top = false
+++

# Safety
- pilot input (`FS_PILOT_INPUT`)
- leak
- heartbeat
- rc timeout (`RC_OVERRIDE_TIMEOUT`)

# Installation
...

# Examples

Pymavlink has 3 types of messages:
* `command_long_send`: To create a raw package
* `<message_name>_send`: To send simple mavlink messages
* `mavutil`: Functions to abstract some MAVLink messages

## Connecting

### Serial Connection
### Onboard Computer
### Topside Computer

## High Level
### Periodic Events
### Command Protocol

## Controlling the Vehicle
### Send RC
- ArduPilot based around radio-style control
- Inputs are set as PWM channel values
- Ignore a channel via int16_max (65535), but warn that previous value persists
### Send Manual Control (Joystick)
- Abstraction over control aspect
- Can pretend to be a pilot
- Link to joystick functions
- Underlying functionalities generally have explicit messages (link to(/implement?) command protocol)
- All axes must be specified (link to issue of ArduSub not supporting the "ignore" value)
### Arm/disarm
- Vehicle cannot move without arming
### Change flight mode
- Link to flight mode docs
### Set Target Depth/Attitude
- In depth hold/stabilise modes, ArduSub will use control algorithms
- Mention caveats (maximum depth delta, target ignored/reset if vehicle control is actively commanding)
### Control Camera Gimbal
- Via mount commands
- Via servo PWM
- Via RC input (goes to full extent, value specifies speed)
### Set Servo PWM
- Only works for servos that aren't assigned as motors (possibly no function specified?? - confirm)
### Advanced Servo/Gripper Example

## Accessing Parameters
### Read all parameters
### Read and write parameters

## Receiving Data
### Request message interval
- Required for many messages
- TODO: investigate how to receive for `NAMED_VALUE_FLOAT` (request stream?)
- QGC requests a bunch by default, so if it's open then you'll already be receiving several messages (and may not be able to specify rates)
### Receive data and filter by message type
### Advanced Receiving (Message Hooks)

## Sending Data
### Send Message to Ground Control Station
### Send GPS position
### Send rangefinder / computer vision distance measurement to autopilot
15 changes: 15 additions & 0 deletions content/software/simulation/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
+++
title = "Simulation"
description = "Documentation for simulating an ArduSub vehicle."
date = 2022-11-21T18:40:00+11:00
template = "docs/section.html"
sort_by = "weight"
weight = 50
draft = false
+++

- SITL simulates the autopilot, and some very basic physics
- SITL should run on BlueOS, although it currently doesn't have the right parameters
- Gazebo and BlueSim are more advanced physics and operations simulators and the first person interface, but don't simulate the autopilot
- QGroundControl allows user input to the running simulation, and provides a map/missions interface
- MAVLink inputs can be from a program (see programatic-control)
1 change: 1 addition & 0 deletions content/software/topside/QGroundControl-4.0
Submodule QGroundControl-4.0 added at e378e6
9 changes: 9 additions & 0 deletions content/software/topside/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "Topside Computer"
description = "Versioned documentation for the different topside computer softwares."
date = 2022-06-09T18:45:00+10:00
template = "docs/section.html"
sort_by = "weight"
weight = 2
draft = false
+++
9 changes: 9 additions & 0 deletions content/software/video-processing/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "Video Processing"
description = "Documentation for video processing approaches."
date = 2022-06-09T18:50:00+10:00
template = "docs/section.html"
sort_by = "weight"
weight = 20
draft = false
+++