Skip to main content

QuadricSLAM

QUT Centre for Robotics Open Source Primary language PyPI package License

QuadricSLAM is a system for using quadrics to represent objects in a scene, leveraging common optimisation tools for simultaneous localisation and mapping (SLAM) problems to converge on stable object maps and camera trajectories. This library uses Georgia Tech's Smoothing and Mapping (GTSAM) library for factor graph optimisation, and adds support through our custom GTSAM quadrics extension.

TODO update with a more holistic reflection of the repository in its current state @youtube QuadricSLAM demonstration for RA-L

The key features of this repository are:

  • modular abstractions that allow building QuadricSLAM solutions with custom tools:
    q = QuadricSLAM(data_source=MyDataSource(), detector=MyDetector(), associator=MyDataAssociator())
    q.spin()
    
  • basic Matplotlib visualisation routines
  • a rich set of plug-n-play examples of the QuadricSLAM system:

We expect this repository to be active and continually improved upon. If you have any feature requests or experience any bugs, don't hesitate to let us know. Our code is free to use, and licensed under BSD-3. We simply ask that you cite our work if you use QuadricSLAM in your own research.

Installation and using the library

Pre-build wheels of this library are available on PyPI for most Linux systems, as well as source distributions. Install the library with:

pip install quadricslam

From here basic custom QuadricSLAM systems can be setup by implementing and integrating the following abstract classes:

from quadricslam import DataSource, Detector, Associator, visualise

class MyDataSource(DataSource):
  ...

class MyDetector(Detector):
  ...

class MyAssociator(Associator):
  ...

q = QuadricSlam(data_source=MyDataSource(),
                detector=MyDetector(),
                associator=MyAssociator(),
                on_new_estimate=lambda vals, labels, done: visualise(vals, labels, done)))
                )
q.spin()

The examples described below also provide code showing how to create customisations for a range of different scenarios.

Running the examples from this repository

Note: in the spirit of keeping this package light, some dependencies may not be installed; please install those manually

This repository contains a number of examples to demonstrate how QuadricSLAM systems can be set up in different contexts.

Each example is a file in the quadricslam_examples module, with a standalone run() function. There are two possible ways to run each example:

  1. Directly through the command line:

    python -m quadricslam_examples.EXAMPLE_NAME ARGS ...
    

    e.g for the hello_quadricslam examples:

    python -m quadricslam_examples.hello_quadricslam
    
  2. Or from within Python:

    from quadricslam_examples.EXAMPLE_NAME import run
    run()
    

hello_manual_quadricslam

Shows how to create a QuadricSLAM system from scratch using the primitives exposed by our GTSAM Quadrics library. The scenario is 4 viewpoints in a square around 2 quadrics in the middle of the square:

hello_manual_quadricslam example

hello_quadricslam

Same scenario as the hello_manual_quadricslam example, but uses the abstractions provided by this library. Shows how an entire QuadricSLAM system can be created with only a few lines of code when the appropriate components are available:

hello_quadricslam example

tum_rgbd_dataset

Re-creation of the TUM RGBD dataset experiments used in our initial publication. There is a script included for downloading the dataset.

tum_rgbd_dataset example

Note: the paper used hand-annotated data to avoid the data association problem; as a result the example here requires a custom data associator to be created before it will run

realsense_python

Demonstrates how a system can be run using an RGBD RealSense, the pyrealsense2 library, and a barebones OpenCV visual odometry algorithm.

The example is a simple plug-n-play system, with weak localisation and data association:

realsense_python example

realsense_ros

Demonstrates how a ROS QuadricSLAM system can be put together with an RGBD RealSense, the ROS RealSense library, and Kimera VIO's visual odometry system.

This example includes a script for creating an entire ROS workspace containing all the required packages built from source. Once installed, it runs the same as the realsense_python example but with significantly better localisation:

realsense_ros example

Citing our work

If you are using this library in academic work, please cite the publication:

L. Nicholson, M. Milford and N. Sünderhauf, "QuadricSLAM: Dual Quadrics From Object Detections as Landmarks in Object-Oriented SLAM," in IEEE Robotics and Automation Letters, vol. 4, no. 1, pp. 1-8, Jan. 2019, doi: 10.1109/LRA.2018.2866205. PDF.

@article{nicholson2019,
  title={QuadricSLAM: Dual Quadrics From Object Detections as Landmarks in Object-Oriented SLAM},
  author={Nicholson, Lachlan and Milford, Michael and Sünderhauf, Niko},
  journal={IEEE Robotics and Automation Letters},
  year={2019},
}

Metadata

Release files for quadricslam 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quadricslam 1.0.2
File Size Uploaded Provenance
quadricslam-1.0.2.tar.gz 22.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for quadricslam 1.0.2
File Interpreter ABI Platform
quadricslam-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 49.5 kB

Release files / quadricslam-1.0.2.tar.gz

Download URL quadricslam-1.0.2.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8511320db3dc039c1d6b1fb4b85fb7861aca0845c0f0ed035c5160ada14f63ea
BLAKE2b-256 checksum
How to use checksums
9819259a7ebca6c684c893d757d191a6498eb9b283e27598f4f8e8f35e94c830
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / quadricslam-1.0.2-py3-none-any.whl

Download URL quadricslam-1.0.2-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3bfe45938d22fdc5c533d787b070014c0331ff693ccd86cc5e1afada258c491
BLAKE2b-256 checksum
How to use checksums
878e6f60e94b52e4d84db694d0eea8258ecfaa8e1f37b4512528bb9d3233a7ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for quadricslam 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page