Skip to content

Commit

Permalink
Started documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-palmer committed May 7, 2024
1 parent 0a015a8 commit 088f4ea
Show file tree
Hide file tree
Showing 29 changed files with 19,234 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/documentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:latest

RUN apt-get -q update \
&& apt-get -q -y upgrade \
&& apt-get install sudo \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

ARG USERNAME=node
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
35 changes: 35 additions & 0 deletions .devcontainer/documentation/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Documentation",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "node",
"customizations": {
"vscode": {
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.rulers": [80],
"eslint.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": "always"
}
},
"extensions": [
"Perkovec.emoji",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"unifiedjs.vscode-mdx"
]
}
}
}
35 changes: 35 additions & 0 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check Documentation

on:
push:
branches:
- main
- docs
pull_request:
paths:
- docs/**
workflow_dispatch:

jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: ./docs

- name: Build website
run: npm run build
working-directory: ./docs
47 changes: 47 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
- docs

jobs:
docs:
name: Build and deploy documentation
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: ./docs

- name: Build website
run: npm run build
working-directory: ./docs

- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
31 changes: 31 additions & 0 deletions docs/docs/contributing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sidebar_position: 5
title: Contributing
---

Thank you for considering contributing to Blue! Here we provide a set of
guidelines for contributing to the project.

Contributions include but are not restricted to:

* Contributing to the Blue codebase
* Writing documentation
* Reporting bugs
* Answering [discussion questions](https://github.com/Robotic-Decision-Making-Lab/blue/discussions)

## Workflow

* Send all pull requests to the `main` branch (unless otherwise requested).
* Limit each pull request to resolving a single issue
* It is your responsibility to ensure that your development branch is
up-to-date with the main branch. You may either rebase on main or merge main
into your development branch.
* Always test and document your code.
* Ensure that your changes pass our CI! If you encounter issues with this,
please ask for help.

## Support

If you have questions regarding your contribution, please create a new
discussion post on the [Discussions](https://github.com/Robotic-Decision-Making-Lab/blue/discussions)
board.
72 changes: 72 additions & 0 deletions docs/docs/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
sidebar_position: 3
---

# Installation

Blue is currently supported on Linux and is available for the ROS distributions
Humble and Iron. Blue can be installed from source or using one of
the provided Docker images. If you plan to use Blue for simulation and have
a system with limited compute power, we recommend installing Blue from source.
For all other cases, we recommend installing Blue using Docker.

## Docker installation

Prior to installing Blue using Docker, make sure that Docker is installed on
your system and that you are logged into the GitHub Container Registry. If
Docker is not installed, you may follow the instructions provided
[here](https://docs.docker.com/get-docker/). If you are not already logged into
the GitHub Container Registry, please do so by following the instructions
provided [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).
Once you have successfully installed Docker and logged into the GitHub Container
Registry, you can install Blue by pulling one of the provided [Docker
images](https://github.com/Robotic-Decision-Making-Lab/blue/pkgs/container/blue).
A complete list of the provided images is documented below (where `*` should be
replaced with the desired ROS distribution, e.g., `humble-robot`):

| Supported ROS Versions | Image Tag | Build Architectures | Description |
| ---------------------- | --------- | ------------------- | ----------- |
| Humble, Iron | *-robot | `amd64`, `arm64` | A bare-bones image that includes all dependencies without simulation or visualization features. This can be used to deploy Blue to hardware. |
| Humble, Iron | *-desktop | `amd64` | Image that includes all dependencies, including simulation and visualization features. This can be used for development, testing, and top-side deployment. |
| Humble, Iron | *-desktop-nvidia | `amd64` | Extension of the `*-desktop` image that provides support for NVIDIA GPU drivers. This image is *strongly* recommended for systems that have an NVIDIA GPU, and requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). |

If you plan to use either the `*-desktop` or `*-desktop-nvidia` images, you may
use the provided [Docker Compose scripts](https://github.com/Robotic-Decision-Making-Lab/blue/tree/main/.docker/compose)
to install and run Blue. For instance, to pull and run the `iron-desktop` image,
first run the command:

```bash
wget https://raw.githubusercontent.com/Robotic-Decision-Making-Lab/blue/iron/.docker/compose/nouveau-desktop.yaml && \
docker compose -f nouveau-desktop.yaml up
```

then in a new tab, enter the container by running

```bash
docker exec -it <image-name> /bin/bash
```

where `<image-name>` should be replaced with the name of the container that was
created.

### Development container

We recommend using one of the provided Visual Studio Code
[development containers](https://github.com/Robotic-Decision-Making-Lab/blue/tree/main/.devcontainer)
to implement and test your own packages. These containers use the `*-desktop`
and `*-desktop-nvidia` images as base images. To use the development containers,
first verify that you can run Visual Studio Code inside a Docker container by
following the tutorial provided [here](https://code.visualstudio.com/docs/devcontainers/tutorial).
Once you have successfully verified that you can run Visual Studio Code inside a
Docker container, open the Blue repository in Visual Studio Code and select the option
to reopen the folder inside a container when prompted. This will automatically
build the development container and install all necessary dependencies. Once the
container is built, you can start developing your own packages!

## Source installation

We recommend using the project [Dockerfile](https://github.com/Robotic-Decision-Making-Lab/blue/blob/main/.docker/Dockerfile)
(beginning at the `robot` stage) for complete source installation details. This
installation may be customized according to your specific needs. For example,
if you do not plan to use the simulation environment, you may forego installing
Gazebo and its dependencies.
95 changes: 95 additions & 0 deletions docs/docs/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
sidebar_position: 2
---

import Vehicle from "@site/src/components/Vehicle";
import BlueROV2HeavyReach from "@site/static/img/vehicles/bluerov2_heavy_reach.png";

# Overview

Angler provides a set of tools implemented using ROS 2 that help you test and
deploy software for underwater vehicles. This is accomplished through the
following features:

1. **Simulation using Gazebo**: Vehicle models and configurations have been
created for Gazebo. We have found that Gazebo provides a good representation
of how the vehicle will behave in the real world.
2. **CI/CD pipelines**: Blue implements CI/CD pipelines to help you deploy your
software in the same environment that you performed development and testing
in. Docker images are built for the `amd64` and `arm64` CPU architectures so
that you can easily deploy your software to a variety of hardware platforms.
3. **Development environment**: Blue provides a development environment that
includes all of the tools you need to develop software for underwater
vehicles, such as ROS 2, Gazebo, linters, and formatters. This helps you
avoid spending resources setting up your development environment and focus on
writing your robotics algorithms 😀
4. **Custom control and localization algorithms**: Blue supports custom
controllers implemented using [auv_controllers](https://github.com/Robotic-Decision-Making-Lab/auv_controllers)
and localization algorithms implemented using [marine_localization](https://github.com/Robotic-Decision-Making-Lab/marine_localization).

## Recommended workflow

Blue is designed to be flexible and modular, enabling you to make changes
according to the needs of your project. However, our commitment to flexibility
does not compromise our effort to ensure that the provided system caters to
a wide range of use cases. With this in mind, we recommend the following
workflow for using Blue:

```mermaid
graph TD
A(Making your </br> own changes?) -- Yes --> B(Create a fork of the </br> repository)
A -- No --> C(Install Blue)
B --> D(Update CI/CD pipelines </br> to point to your fork)
D --> E(Install Blue from your fork </br> and add your changes)
E --> F(Test your system </br> in simulation)
C --> F
F --> G(Deploy Blue to hardware!)
```

## Supported vehicles

Several vehicle models have been implemented and tested with Blue in
**simulation** and on **hardware**. These vehicles include:

<div className="vehicles">
<Vehicle name="BlueROV2" img={BlueROV2}>
The BlueROV2 is a popular lightweight underwater vehicle made by [Blue
Robotics](https://bluerobotics.com/) that is used for hobby, research, and
commercial applications.
</Vehicle>
<Vehicle name="BlueROV2 Heavy" img={BlueROV2Heavy}>
The BlueROV2 Heavy is an extension to the BlueROV2 made by [Blue
Robotics](https://bluerobotics.com/) that includes additional thrusters and
a larger frame to improve the vehicle's manueverability.
</Vehicle>
<Vehicle name="BlueROV2 Heavy Reach" img={BlueROV2HeavyReach}>
The BlueROV2 Heavy Reach modifies the BlueROV2 Heavy by moving the thrusters
located on the upper chassis to the lower chassis. This was proposed by
[Reach Robotics](https://reachrobotics.com/) to enable integration of a
small manipulator for intervention tasks.
</Vehicle>
</div>

## Supported manipulators

Several vehicle models have been implemented and tested with Blue in
**simulation** and on **hardware**. These vehicles include:

<div className="vehicles">
<Vehicle name="BlueROV2" img={BlueROV2}>
The BlueROV2 is a popular lightweight underwater vehicle made by [Blue
Robotics](https://bluerobotics.com/) that is used for hobby, research, and
commercial applications.
</Vehicle>
<Vehicle name="BlueROV2 Heavy" img={BlueROV2Heavy}>
The BlueROV2 Heavy is an extension to the BlueROV2 made by [Blue
Robotics](https://bluerobotics.com/) that includes additional thrusters and
a larger frame to improve the vehicle's manueverability.
</Vehicle>
<Vehicle name="BlueROV2 Heavy Reach" img={BlueROV2HeavyReach}>
The BlueROV2 Heavy Reach modifies the BlueROV2 Heavy by moving the thrusters
located on the upper chassis to the lower chassis. This was proposed by
[Reach Robotics](https://reachrobotics.com/) to enable integration of a
small manipulator for intervention tasks.
</Vehicle>
</div>
4 changes: 4 additions & 0 deletions docs/docs/tutorials/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Tutorials",
"position": 4
}
Loading

0 comments on commit 088f4ea

Please sign in to comment.