Code Monkey home page Code Monkey logo

kollagen's Introduction

kollagen

A Collaborative SLAM Pose Graph Generator

This is a header-only data generator library which generates multi-agent, M3500esque pose-graphs with both intra-agent and inter-agent loop-closures. It's primary use is within the Collaborative SLAM activity.

The package can be used either by interacting directly with the C++ API (see example.cpp and iSAM2example.cpp) or by JSON files โ€“ using either the python pip package, or the generate binary made available after building.

Overview of the generation procedure

In the generated multi-agent pose graphs, inspired by the popular M3500 dataset, introduced by Olson et al. in 2006, the agents move on a planar grid world. The pose graph consists of nodes and edges, where the nodes represent the poses of the agents and the edges represent a relative transformation from one pose to the other.

The pose graph generation has three major components:

  1. Ground truth generation:
    To generate the ground truth of each agent, we first let each agent turn randomly by -180, -90, 0, or 90 degrees. Then the agent moves a pre-defined amount of steps in that direction. This is repeated for a user-specified amount of times.

  2. Noisy odometry generation:
    The ground truth of two consecutive poses is used to obtain a true distance and relative angle between the poses. The distance and relative angle are each modified by adding a zero-mean normally distributed noise terms with a user-specified standard deviations. In this way, kollagen generates noisy odometry for all consecutive poses. The noisy odometry is encoded in the edge between the two consecutive nodes in the form of a noisy relative transformation.

  3. Loop closure generation:
    Loop closures are edges between two (possibly non-consecutive) nodes. The idea behind loop closures is that an agent recognizes a pose and creates an edge, encoding a noisy relative transformation between the poses, in the pose graph between its current pose and the recognized pose. The noisy relative transformation encoded by the edge is obtained similarly to the noisy odometry, i.e., adding a zero-mean normally distributed noise to the true distance and relative angle between the poses, which is then used to obtain the noisy relative transformation. There are two types of loop closures in kollagen:

    • Intra-agent loop closures are edges between (possibly non-consecutive) nodes of the same agent. To produce intra-agent loop closures, we iterate through all poses, i.e., nodes, of an agent's pose graph and create a loop closure between the current and a previous poses within a certain distance based on a probability proportional to the distance between the poses.

    • Inter-agent loop closures are edges between nodes of different agents. To produce inter-agent loop closures, we iterate through all poses, i.e., nodes, of one agents and create a loop closure between the current pose of that agent and the pose of another agent within a certain distance based on a probability proportional to the distance between the poses.

pip package

If only interested in generating datasets (be it multig2o or singleg2o) from JSON, the provided pip package could be what you are after.

To install, enter the project root, and issue

pip3 install .

After this, the CLI command kollagenr8 should become available. Issue

kollagenr8 --help

for instructions on how to use.

For Windows builds, make sure to have up-to-date versions of MSVC and the Windows SDK. See further below for tested versions.

Troubleshooting

Make sure you have a modern, C++20 compliant, compiler (tested with clang 14)

Building

Linux

The building has been tested on Ubuntu 22.04 (Jammy) with Clang 14.

# Clone the repository
git clone https://github.com/EricssonResearch/kollagen.git

# Update aptitude repositories and install debian-package dependencies
sudo apt update
sudo apt install cmake clang

# OPTIONAL: Create python virtual environment and install python dependencies for
# plotting
sudo apt install python3-pip
pip3 install virtualenv
virtualenv -p python3 env
source env/bin/activate
pip3 install matplotlib numpy

# Create build folder
mkdir build && cd build

# Configure make-files, setting Clang 14 as compiler
export CC=clang
export CXX=clang++
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DKOLLAGEN_ENABLE_TESTS=OFF -DKOLLAGEN_ENABLE_GTSAM=OFF -DKOLLAGEN_BUILD_EXAMPLES=ON

# Compile
make -j$(nproc --all)

Windows

Building has been tested with MSVC v143 with Windows 10 SDK 10.0.20348.

macOS

Python installation with pip has been testen on macOS Monterey 12.6.2 with clang 14.0.0

kollagen's People

Contributors

robertocsundin avatar davidumsonstatericsson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.