MCPcopy Index your code
hub / github.com/KavrakiLab/capt

github.com/KavrakiLab/capt @v3.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.0 ↗ · + Follow
112 symbols 241 edges 16 files 39 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Collision-Affording Point Trees: SIMD-Amenable Nearest Neighbors for Fast Collision Checking

arXiv CAPT Crates.io page docs.rs

Demo video

For a full demonstration of CAPTs running in real-time, see this video.

This is a Rust implementation of the collision-affording point tree (CAPT), a data structure for SIMD-parallel collision-checking against point clouds. The CAPT supports extremely high-throughput collision checking, supporting online, real-time motion planning.

You may also want to look at the following other sources:

If you use this in an academic work, please cite it as follows:

@InProceedings{capt,
  title = {Collision-Affording Point Trees: {SIMD}-Amenable Nearest Neighbors for Fast Collision Checking},
  author = {Ramsey, Clayton W. and Kingston, Zachary and Thomason, Wil and Kavraki, Lydia E.},
  booktitle = {Robotics: Science and Systems},
  date = {2024},
  url = {https://www.roboticsproceedings.org/rss20/p038.pdf},
}

Usage

The core data structure in this library is the Capt, which is a search tree used for collision checking.

use capt::Capt;

// list of points in tree
let points = [[1.0, 1.0], [2.0, 1.0], [3.0, -1.0]];

// range of legal radii for collision-checking
let radius_range = (0.0, 100.0);

let captree = Capt::new(&points, radius_range);

// sphere centered at (1.5, 1.5) with radius 0.01 does not collide
assert!(!captree.collides(&[1.5, 1.5], 0.01));

// sphere centered at (1.5, 1.5) with radius 1.0 does collide
assert!(captree.collides(&[1.5, 1.5], 0.01));

Installation

capt is available as a package on crates.io. This means that adding capt to your Rust project is as simple as asking Cargo to add it as a dependency.

cargo add capt

To use the SIMD-parallel features of CAPTs, make sure to include it as a feature.

cargo add capt --features simd

License

This work is licensed to you under the Apache 2.0 license. For further details, refer to LICENSE.md.

Extension points exported contracts — how you extend this code

Axis (Interface)
A generic trait representing values which may be used as an "axis;" that is, elements of a vector representing a point.
capt/src/lib.rs
AxisSimdElement (Interface)
A trait used for SIMD elements.
capt/src/lib.rs
AxisSimd (Interface)
A trait used for masks over SIMD vectors, used for parallel querying on [`Capt`]s. The interface for this trait should
capt/src/lib.rs
Index (Interface)
An index type used for lookups into and out of arrays. This is implemented so that [`Capt`]s can use smaller index size
capt/src/lib.rs
IndexSimd (Interface)
A SIMD parallel version of [`Index`]. This is used for implementing SIMD lookups in a [`Capt`]. The interface for this
capt/src/lib.rs

Core symbols most depended-on inside this repo

stopwatch
called by 20
bench/src/lib.rs
bench_forest
called by 10
bench/src/bin/perf_plots.rs
next
called by 7
capt/src/lib.rs
morton_filter
called by 5
morton_filter/src/lib.rs
distsq
called by 4
capt/src/lib.rs
parse_pointcloud_csv
called by 4
bench/src/lib.rs
distsq
called by 4
bench/src/lib.rs
xorshift
called by 4
bench/src/forest.rs

Shape

Function 60
Method 36
Class 10
Interface 5
Enum 1

Languages

Rust88%
Python12%

Modules by API surface

capt/src/lib.rs39 symbols
bench/src/kdt.rs15 symbols
bench/src/lib.rs13 symbols
bench/src/forest.rs12 symbols
bench/scripts/generate_pointcloud_data.py10 symbols
morton_filter/src/lib.rs9 symbols
bench/src/bin/perf_plots.rs4 symbols
bench/scripts/plot_times_for_blog.py3 symbols
bench/src/bin/forest_error.rs2 symbols
bench/src/bin/error.rs2 symbols
bench/src/bin/filter_strength.rs1 symbols
bench/src/bin/correctness.rs1 symbols

For agents

$ claude mcp add capt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page