Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [ main, develop, setup-ci]
pull_request:
branches: [ main, develop ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
chmod +x scripts/install_dependencies.sh
./scripts/install_dependencies.sh

- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --config Release

- name: Run tests
run: |
cd build
ctest --output-on-failure --verbose
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Robotic Navigation in Ceres
![CI](https://github.com/mitchellcohen3/ceres_nav/workflows/CI/badge.svg)

This repo contains a set of tools to help implement batch estimators and sliding-window filters for robotic state estimation using Ceres. It contains a set of common factors (such as odometry, vision, and preintegrated IMU factors) used in state estimation, along with common Lie group state definitions such as poses and extended poses. Additionally, both "left" and "right" state definitions are provided for Lie group states, allowing for the user to pick the error definition for Lie group states that best suits the problem at hand.

## Prerequisites
Expand Down Expand Up @@ -28,9 +30,15 @@ This repo has been tested on Ubuntu 20.04 and has the following requirements:
$ cmake -B build -S . -DBUILD_TESTING=OFF
$ sudo cmake --build build/ --target install
```
- **Boost** - for filesystem and program options. Can be installed using
```bash
$ sudo apt install libboost-all-dev
```

The dependencies can be also installed using the provided `scripts/install_dependencies.sh` script.

## Build
After installing the dependancies, the `ceres_nav` library, tests, and examples can be built using
After installing the dependencies, the `ceres_nav` library, tests, and examples can be built using
```
git clone https://github.com/mitchellcohen3/ceres_nav/
cd ceres_nav
Expand Down Expand Up @@ -85,7 +93,7 @@ $ cd navlie
$ pip install -e .
```

In this example, the state to be estimated is the IMU state, consisting of orientation $\mathbf{C}_{ab} \in SO(3)$, velocity $\mathbf{v}_a$, position $\mathbf{r}_a, gyroscope bias, and accelerometer bias. This example showcases how the library allows for easily changing the state representation. For example, the user can either represent the state as an element of
In this example, the state to be estimated is the IMU state, consisting of orientation $\mathbf{C}_{ab} \in SO(3)$, velocity $\mathbf{v}_a$, position $\mathbf{r}_a$, gyroscope bias, and accelerometer bias. This example showcases how the library allows for easily changing the state representation. For example, the user can either represent the state as an element of

## Acknowledgements
This repo is inspired partially by [libRSF](https://github.com/TUC-ProAut/libRSF), another great library for robust estimation using Ceres. `libRSF` only supports autodiff cost functions, while this repo supports traditional Ceres cost functions with analytic differentiation and provides tools to additionally check Jacobians numerically. The use of analytical derivatives becomes important when implementing sliding window filters for specific problems, such as visual-inertial odometry where the evaluation point of the Jacobians must be artificially modified to ensure consistency.
Expand Down
32 changes: 32 additions & 0 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
echo "Installing system dependencies..."
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
libeigen3-dev \
libgoogle-glog-dev \
libboost-all-dev

if [ ! -d "/usr/local/include/ceres" ]; then
echo "Installing Ceres..."
git clone https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver
git checkout 2.0.0
mkdir build && cd build
cmake ..
make
sudo make install
cd ../..
else
echo "Ceres Solver already installed"
fi

if [ ! -d "/usr/local/include/catch2" ]; then
git clone https://github.com/catchorg/Catch2.git
cd Catch2
cmake -B build -S . -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
else
echo "Catch2 already installed"
fi