-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
3,081 additions
and
2,643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: clippy | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Run sccache stat for check before | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- name: cargo | ||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
run: | | ||
cargo clippy --all-targets --all-features | ||
- name: Run sccache stat for check after | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: docs | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Run sccache stat for check before | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- name: cargo | ||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
run: | | ||
cargo doc --no-deps --all-features | ||
- name: Run sccache stat for check after | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: format | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pre-commit-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout workspace | ||
uses: actions/checkout@v3 | ||
- name: Install pre-commit and install | ||
run: | | ||
pip install pre-commit | ||
pre-commit install | ||
- name: Run pre-commit checks | ||
run: pre-commit run --all-files | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- name: cargo doc | ||
run: | | ||
cargo fmt --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: nightly | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Run sccache stat for check before | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- name: cargo | ||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y nasm | ||
cargo build --release --all-targets --all-features | ||
cargo test --release --all-features | ||
- name: Run sccache stat for check after | ||
shell: bash | ||
run: ${SCCACHE_PATH} --show-stats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude: (thirdparty/.*)|(SOPHUS_VERSION)|(.txt)$ | ||
- id: check-yaml | ||
args: ["--unsafe"] | ||
- id: check-json | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list | ||
- "te,tring,crate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
# sophus-rs | ||
|
||
This library is in an early development stage - hence API is highly unstable. | ||
sophus-rs is a Rust library for 2d and 3d geometry for Computer Vision and Robotics applications. | ||
It is a spin-off of the [Sophus](https://github.com/strasdat/Sophus) C++ library which | ||
focuses on **Lie groups** (e.g. rotations and transformations in 2d and 3d). | ||
|
||
Sophus-rs currently requires rust nightly. The only nightly feature it uses is `portable-simd`. | ||
It is the intention to move to rust stable once `portable-simd` is stabilized. There is no current | ||
plan to depend on other nightly features. | ||
In addition to Lie groups, sophus-rs also includes other geometric/maths concepts such unit vector, | ||
splines, image classes, camera models as well as a other utilities such as a non-linear least | ||
squares optimization. | ||
|
||
## Status | ||
|
||
This library is in an early development stage - hence API is highly unstable. It is likely that | ||
existing features will be removed or changed in the future. | ||
|
||
However, the intend is to stride for correctness, facilitated using a comprehensive test suite. | ||
|
||
## Building | ||
|
||
sophus-rs builds on stable. | ||
|
||
```toml | ||
[dependencies] | ||
sophus = "0.7.0" | ||
``` | ||
|
||
To allow for batch types, such as BatchScalarF64, the 'simd' feature is required. This feature | ||
depends on [`portable-simd`](https://doc.rust-lang.org/std/simd/index.html), which is currently | ||
only available on [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html). There | ||
are plans to use any other nightly features. | ||
|
||
```toml | ||
[dependencies] | ||
sophus = { version = "0.7.0", features = ["simd"] } | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
/// DualScalar matrix. | ||
/// Dual matrix. | ||
pub mod dual_matrix; | ||
pub use crate::calculus::dual::dual_matrix::DualBatchMatrix; | ||
pub use crate::calculus::dual::dual_matrix::DualMatrix; | ||
|
||
/// DualScalar scalar. | ||
#[cfg(feature = "simd")] | ||
/// Dual batch matrix. | ||
pub mod dual_batch_matrix; | ||
#[cfg(feature = "simd")] | ||
pub use crate::calculus::dual::dual_batch_matrix::DualBatchMatrix; | ||
|
||
/// Dual scalar. | ||
pub mod dual_scalar; | ||
pub use crate::calculus::dual::dual_scalar::DualBatchScalar; | ||
pub use crate::calculus::dual::dual_scalar::DualScalar; | ||
|
||
/// DualScalar vector. | ||
#[cfg(feature = "simd")] | ||
/// Dual batch scalar. | ||
pub mod dual_batch_scalar; | ||
#[cfg(feature = "simd")] | ||
pub use crate::calculus::dual::dual_batch_scalar::DualBatchScalar; | ||
|
||
/// Dual vector. | ||
pub mod dual_vector; | ||
pub use crate::calculus::dual::dual_vector::DualBatchVector; | ||
pub use crate::calculus::dual::dual_vector::DualVector; | ||
|
||
#[cfg(feature = "simd")] | ||
/// Dual batch vector. | ||
pub mod dual_batch_vector; | ||
#[cfg(feature = "simd")] | ||
pub use crate::calculus::dual::dual_batch_vector::DualBatchVector; |
Oops, something went wrong.