Skip to content

Commit

Permalink
Add doxygen deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
JHartzer committed Sep 18, 2023
1 parent 22e8344 commit 4015164
Show file tree
Hide file tree
Showing 23 changed files with 375 additions and 226 deletions.
21 changes: 4 additions & 17 deletions .doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,6 @@ TAB_SIZE = 4

ALIASES =

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.

TCL_SUBST =

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
Expand Down Expand Up @@ -829,7 +823,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = include/ src/ docs/
INPUT = src/ docs/ README.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -917,7 +911,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = docs/doxygen/doxygen-awesome-css

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1026,7 +1020,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE =
USE_MDFILE_AS_MAINPAGE = README.md

#---------------------------------------------------------------------------
# Configuration options related to source browsing
Expand Down Expand Up @@ -1154,13 +1148,6 @@ CLANG_DATABASE_PATH =

ALPHABETICAL_INDEX = YES

# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

COLS_IN_ALPHA_INDEX = 5

# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
Expand Down Expand Up @@ -1246,7 +1233,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = docs/doxygen/doxygen-awesome-css/doxygen-awesome.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Documentation

on:
push:
branches:
- main

jobs:
build-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Count Lines of Code
uses: JHartzer/[email protected]
with:
options: --exclude-lang=CSS,CSV,HTML,JavaScript,make,SVG,TeX --md --report-file=cloc.md
- name: Format and move cloc.md
run: |
echo -e 'Count Lines of Code {#cloc}\n============\n' > docs/software/cloc.md
cat cloc.md | tail -n +4 >> docs/software/cloc.md
sed -i 's/--------|--------|--------|--------|--------/| | | | | |/' docs/software/cloc.md
rm cloc.md
- name: Run Doxygen
uses: mattnotmitt/[email protected]
with:
doxyfile-path: .doxyfile
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/doxygen/html
deploy-documentation:
needs: build-documentation
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*/__pycache__/

# Generated Docs
docs/doxygen/
docs/doxygen/html
docs/doxygen/latex
docs/software/cloc.md
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "docs/doxygen/html/doxygen-awesome-css"]
path = docs/doxygen/html/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "docs/doxygen/doxygen-awesome-css"]
path = docs/doxygen/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"label": "cloc",
"detail": "Count Lines of Code",
"type": "shell",
"command": "echo 'Count Lines of Code {#cloc}\n============\n\n' > docs/cloc.md && cloc . --exclude-lang=CSS,CSV,HTML,JavaScript,make,SVG,TeX --md | tail -n +5 >> docs/cloc.md && sed -i 's/--------|--------|--------|--------|--------/| | | | | |/' docs/cloc.md",
"command": "echo 'Count Lines of Code {#cloc}\n============' > docs/software/cloc.md && cloc . --exclude-lang=CSS,CSV,HTML,JavaScript,make,SVG,TeX --md | tail -n +4 >> docs/software/cloc.md && sed -i 's/--------|--------|--------|--------|--------/| | | | | |/' docs/software/cloc.md",
"options": {
"cwd": "${workspaceFolder}"
},
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ title: "EKF-CAL"
version: 0.2.0
# doi:
# date-released:
url: "https://github.com/JHartzer/ekf-cal"
url: "https://github.com/unmannedlab/ekf-cal"
99 changes: 12 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,19 @@
# EKF_CAL
[![Documentation](https://github.com/unmannedlab/ekf-cal/actions/workflows/documentation.yaml/badge.svg)](https://github.com/unmannedlab/ekf-cal/actions/workflows/documentation.yaml)

Extended Kalman Filter - Calibration and Localization
Extended Kalman Filter Calibration and Localization: EKF-CAL is a package focused on the simulation
and development of a multi-sensor online calibration kalman filter. It combines the architecture of
a Multi-State Constraint Kalman Filter (MSCKF) with a multi-IMU calibration filter to provide
estimates of intrinsic and extrinsic sensor calibration parameters.

## Dependencies
The EKF_CAL package has the following hard dependencies that are required for all compilations:
- [OpenCV](https://opencv.org/)
- [Eigen 3](https://eigen.tuxfamily.org/index.php?title=Main_Page)

The following dependencies are for building the ROS node and simulation, respectively
- [ROS2](https://docs.ros.org/en/rolling/index.html)
- [yaml-cpp](https://github.com/jbeder/yaml-cpp)

The following soft dependencies useful for development and documentation
- [Doxygen](https://www.doxygen.nl/index.html)
- [Google Test](https://google.github.io/googletest/)

These can be installed by running `rosdep` in the base directory of this repo
```
rosdep install --from-paths src -y --ignore-src
```

## Build
Building can be done simply with the following command:

```
colcon build --symlink-install --packages-select ekf_cal
```

For full CMake support, the following environment variables are expected:
- PLANTUML_INSTALL_DIR
- ROS_DISTRO

## Testing & Static Analysis
Once the package has been built, unit tests and static analysis can be run with the following commands
```
colcon test --packages-select ekf_cal --event-handlers console_direct+
```

A test code coverage report can be generated using the following commands
```
colcon build --symlink-install --packages-select ekf_cal \
--event-handlers console_cohesion+ \
--cmake-args -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'
colcon test --packages-select ekf_cal --pytest-with-coverage \
--pytest-args --cov-report=term --event-handlers console_direct+
colcon lcov-result --packages-select ekf_cal --filter '*_test.cpp' '*_main.cpp'
```

## Documentation
Documentation can be generated using the following command:
```
doxygen .doxyfile
```

A single pdf can be generated of the documentation using the following command
```
doxygen .doxyfile && cd docs/doxygen/latex && make
```

## Launch
For an example of a filter node launch file, see [example.launch.py](launch/example.launch.py)

In particular, note the configuration file [example.yaml](config/example.yaml).

The configuration file specifies which sensor topics should to use and the initialization values.

## Simulations
Simulations can be run using a YAML configuration file that extends the base configuration file
with additional parameters. See the example [example.yaml](config/example.yaml).

Multiple simulations can be run in parallel using the [run.py](eval/run.py). An example
using a single input is given below

```
python3 eval/run.py config/example.yaml
```

The results of a run can be plotted using [plot.py](eval/plot.py)
```
python3 eval/plot.py config/example.yaml
```

To run and plot in sequence, utilize [evaluate.py](eval/evaluate.py)
```
python3 eval/evaluate.py config/example.yaml
```
For full documentation, please see below:
- [Github Repository](https://github.com/unmannedlab/ekf-cal/)
- [Documentation](https://unmannedlab.org/ekf-cal/)
- [Getting Started](https://unmannedlab.org/ekf-cal/tutorial.html)

## References
1. J. Hartzer and S. Saripalli, "
Online Multi Camera-IMU Calibration",
IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), 2022
IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), 2022.
[IEEE](https://doi.org/10.1109/SSRR56537.2022.10018692),
[arXiv](https://arxiv.org/abs/2209.13821)
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Package Features:
- Condition and distance thresholds
- Check covariance matrix condition
- Perfect prediction flag
- Add colcon build/test action to github

GPS Updater:
- LLA to NED calibration
Expand Down
4 changes: 2 additions & 2 deletions config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
AngFrequency: [0.2, 0.3, 0.4]
PosOffset: [0.0, 0.0, 0.0]
NoErrors: False
NumberOfRuns: 10
NumberOfRuns: 100
RunNumber: 0

IMU_list:
Expand Down Expand Up @@ -51,7 +51,7 @@
vn100:
UseForPrediction: False
BaseSensor: False
Intrinsic: True
Intrinsic: False
Rate: 100.0
Topic: "/vn100/imu_uncompensated"
VarInit: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
Expand Down
1 change: 1 addition & 0 deletions docs/doxygen/doxygen-awesome-css
Submodule doxygen-awesome-css added at df83fb
33 changes: 15 additions & 18 deletions docs/filter/multi-imu.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
Multi-IMU Filtering {#multi-imu}
============


\begin{equation} \label{eq:pred_measurement}
\begin{split}
&\boldsymbol{h}(\boldsymbol{x}_{b}) = \\
&\begin{bmatrix}
\mathcal{C}(\prescript{B}{I_i}{q})^T
\left(
\mathcal{C}(\prescript{G}{B}{q})^T \boldsymbol{a} +
\boldsymbol{\alpha} \times \prescript{B}{}{\boldsymbol{p}}_{I_i} +
\boldsymbol{\omega} \times \boldsymbol{\omega} \times \prescript{B}{}{\boldsymbol{p}}_{I_i}
\right)
\\
\mathcal{C}(\prescript{B}{I_i}{q})^T
\mathcal{C}(\prescript{G}{B}{q})^T
\boldsymbol{\omega}
\end{bmatrix}
\end{split}
\end{equation}
\f{align}{
\boldsymbol{h}(\boldsymbol{x}_{b}) =
\begin{bmatrix}
\mathcal{C}(\prescript{B}{I_i}{q})^T
\left(
\mathcal{C}(\prescript{G}{B}{q})^T \boldsymbol{a} +
\boldsymbol{\alpha} \times \prescript{B}{}{\boldsymbol{p}}_{I_i} +
\boldsymbol{\omega} \times \boldsymbol{\omega} \times \prescript{B}{}{\boldsymbol{p}}_{I_i}
\right)
\\
\mathcal{C}(\prescript{B}{I_i}{q})^T
\mathcal{C}(\prescript{G}{B}{q})^T
\boldsymbol{\omega}
\end{bmatrix}
\f}
Binary file added docs/images/example/body_acceleration_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/example/body_position_covariance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/example/imu_2_position.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/example/imu_2_residuals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4015164

Please sign in to comment.