Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Ignore results directory
results/*

# Ignore C++ build directory
build/*

Expand Down
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,69 @@
# Distributed Certifiably Correct Range-Aided SLAM (DCORA)

## Building
## Installation

Install the required system dependencies:

Install dependencies
```bash
sudo apt-get install build-essential cmake-gui libsuitesparse-dev libboost-all-dev libeigen3-dev libgoogle-glog-dev
```
sudo apt-get update
sudo apt-get install build-essential cmake-gui libsuitesparse-dev \
libboost-all-dev libeigen3-dev libgoogle-glog-dev

Clone the repository and build:

Inside the C++ directory, execute the following commands
```bash
mkdir build
cd build
cmake ../
make
cd ~ && git clone https://github.com/adthoms/dcora.git
cd ~/dcora/
mkdir build && cd build
cmake ..
make -j$(nproc)
```

The compiled executables will be placed in `build/bin`.

## Usage

The built executables are located in directory build/bin. For a minimal demo of DC2-PGO on one of the benchmark g2o datasets, inside the build directory run:
### Multi-Robot Demo (DC2-PGO)

Run distributed certifiably correct pose-graph optimization on a benchmark `.g2o` dataset:

```bash
cd build
./bin/multi-robot-example 5 ../data/smallGrid3D.g2o
```
For a minimal demo of CORA on one of the benchmark pyfg datasets, inside the build directory run:

Here, 5 specifies the number of robots.

### Single-Robot Demo (CORA)

Run certifiably correct range-aided SLAM on a benchmark `.pyfg` dataset:

```bash
cd build
./bin/single-robot-example-ra-slam ../data/tiers.pyfg
```

## Testing

To run the unit tests:

```bash
cd build
./bin/testDCORA
```

All tests must pass before submitting contributions.

## Contributing

Any contributions should pass all checks in our `.pre-commit-config.yaml` file. To install the pre-commit hooks, run `pre-commit install` in the root directory of this repository. You may need to install some dependencies to get the pre-commit hooks to work.
```bash
pip install pre-commit
sudo apt-get install cppcheck
cd /path/to/dcora
cd ~/dcora
pre-commit install
```

## Testing

Run the unit tests via
```bash
./bin/testDCORA
```

## References

If you use this code in your research, please cite the following paper:
Expand All @@ -55,3 +76,7 @@ If you use this code in your research, please cite the following paper:
year={2025}
}
```

## License

This project is licensed under the MIT License
3 changes: 1 addition & 2 deletions examples/MultiRobotExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ int main(int argc, char **argv) {
bool acceleration = true;
bool verbose = false;
unsigned numIters = 1000;
std::string logDirectory = "/home/alex/data/dcora_dpgo_examples/"
"dcora_examples/multi_robot_example_pgo/";
std::string logDirectory = std::string(getenv("HOME")) + "/dcora/results/multi_robot_example_pgo/";
std::string debug_filename;
bool logData = true;
unsigned int r_min = 5;
Expand Down
3 changes: 1 addition & 2 deletions examples/MultiRobotExample_RASLAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ int main(int argc, char **argv) {

// Logging
bool logData = true;
std::string logDirectory = "/home/alex/data/dcora_dpgo_examples/"
"dcora_examples/multi_robot_example_ra_slam/";
std::string logDirectory = std::string(getenv("HOME")) + "/dcora/results/multi_robot_example_ra_slam/";
DCORA::Logger logger(logDirectory);
bool rbcd_only = false;

Expand Down
3 changes: 1 addition & 2 deletions examples/SingleRobotExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ int main(int argc, char **argv) {
unsigned int r = d;
DCORA::AgentParameters options(d, r);
options.verbose = true;
options.logDirectory = "/home/alex/data/dcora_dpgo_examples/"
"dcora_examples/single_robot_example_pgo/";
options.logDirectory = std::string(getenv("HOME")) + "/dcora/results/single_robot_example_pgo/";
options.logData = true;

std::vector<DCORA::RelativePosePoseMeasurement> odometry;
Expand Down
3 changes: 1 addition & 2 deletions examples/SingleRobotExample_RASLAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ int main(int argc, char **argv) {

// Logging
bool logData = true;
std::string logDirectory = "/home/alex/data/dcora_dpgo_examples/"
"dcora_examples/single_robot_example_ra_slam/";
std::string logDirectory = std::string(getenv("HOME")) + "/dcora/results/single_robot_example_ra_slam/";
DCORA::Logger logger(logDirectory);

// Initialization method
Expand Down