Skip to content

Commit ab1cc45

Browse files
authored
Add objectron app that logs objectron dataset (#5)
* Add objectron app that logs objectron dataset * Improve tick marks for sequences (e.g. frames) * Add web version of objectron app * cleanup * Try a different way of running cargo deny och CI * Remove old cargo deny check
1 parent 99a4ab3 commit ab1cc45

22 files changed

+2777
-114
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,27 @@ jobs:
110110
args: --all-features -- -D warnings
111111

112112
cargo-deny:
113-
runs-on: ubuntu-20.04
113+
name: cargo deny
114+
runs-on: ubuntu-latest
114115
steps:
115116
- uses: actions/checkout@v2
116-
- uses: EmbarkStudios/cargo-deny-action@v1
117+
- uses: actions-rs/toolchain@v1
118+
with:
119+
profile: minimal
120+
toolchain: 1.60.0
121+
override: true
122+
- run: cargo install cargo-deny
123+
- run: cargo deny check
124+
125+
# For some reason this causes weird problems:
126+
# https://github.com/rerun-io/rerun/runs/6271778805?check_suite_focus=true
127+
# Error: -03 10:39:38 [ERROR] `cargo metadata` exited with an error: info: syncing channel updates for '1.60.0-x86_64-unknown-linux-musl'
128+
# failed to read `/github/rerun/web_server/Cargo.toml`
129+
# cargo-deny:
130+
# runs-on: ubuntu-20.04
131+
# steps:
132+
# - uses: actions/checkout@v2
133+
# - uses: EmbarkStudios/cargo-deny-action@v1
117134

118135
wasm_bindgen:
119136
name: wasm-bindgen

.vscode/launch.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "Debug 'viewer'",
8+
"name": "Debug 'viewer' recording.rrd",
99
"type": "lldb",
1010
"request": "launch",
1111
"cargo": {
@@ -23,5 +23,24 @@
2323
],
2424
"cwd": "${workspaceFolder}"
2525
},
26+
{
27+
"name": "Debug 'objectron'",
28+
"type": "lldb",
29+
"request": "launch",
30+
"cargo": {
31+
"args": [
32+
"build",
33+
"--package=objectron"
34+
],
35+
"filter": {
36+
"name": "objectron",
37+
"kind": "bin"
38+
}
39+
},
40+
"args": [
41+
"objectron/dataset/bike/batch-11/48"
42+
],
43+
"cwd": "${workspaceFolder}"
44+
},
2645
]
2746
}

Cargo.lock

Lines changed: 165 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
[workspace]
22
resolver = "2"
3-
members = ["comms", "log_types", "viewer", "web_server"]
3+
members = [
4+
"comms",
5+
"log_types",
6+
"objectron",
7+
"viewer",
8+
"web_server",
9+
]
410

511

612
[profile.dev]

check.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ cargo doc --document-private-items --no-deps --all-features
1717

1818
(cd comms && cargo check --no-default-features)
1919
(cd log_types && cargo check --no-default-features)
20+
(cd objectron && cargo check --no-default-features)
2021
(cd viewer && cargo check --no-default-features)
2122
(cd web_server && cargo check --no-default-features)
2223

2324
(cd comms && cargo check --all-features)
2425
(cd log_types && cargo check --all-features)
26+
(cd objectron && cargo check --all-features)
2527
(cd viewer && cargo check --all-features)
2628
(cd web_server && cargo check --all-features)
2729

objectron/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dataset/

objectron/Cargo.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[package]
2+
name = "objectron"
3+
version = "0.1.0"
4+
edition = "2021"
5+
rust-version = "1.60"
6+
license = "MIT OR Apache-2.0"
7+
publish = false
8+
9+
10+
[features]
11+
default = []
12+
web = ["comms", "web_server", "tokio", "webbrowser"]
13+
14+
15+
[dependencies]
16+
log_types = { path = "../log_types" }
17+
viewer = { path = "../viewer" }
18+
19+
anyhow = "1"
20+
clap = "3.1"
21+
glam = "0.20" # to convert rotation matrices to quaternions
22+
image = { version = "0.23", default-features = false, features = ["jpeg"] }
23+
itertools = "0.10"
24+
prost = "0.10"
25+
tracing = "0.1"
26+
tracing-subscriber = "0.3"
27+
28+
# Optional:
29+
comms = { path = "../comms", optional = true, features = ["server"] }
30+
web_server = { path = "../../rerun/web_server", optional = true }
31+
tokio = { version = "1.0.0", optional = true, default-features = false, features = [
32+
"io-std",
33+
"macros",
34+
"net",
35+
"rt-multi-thread",
36+
"sync",
37+
"time",
38+
] }
39+
webbrowser = {version = "0.7", optional = true }
40+
41+
42+
[build-dependencies]
43+
prost-build = "0.10"

objectron/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```sh
2+
./download_dataset.py
3+
cargo run --release -p objectron -- objectron/dataset/camera/batch-5/31
4+
```
5+
6+
To test the web viewer:
7+
```
8+
./viewer/build_web.sh
9+
cargo run --release -p objectron --features web -- objectron/dataset/camera/batch-5/31 --web --open
10+
```

objectron/build.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
fn main() -> std::io::Result<()> {
2+
// for filename in [
3+
// // "a_r_capture_metadata.proto",
4+
// "annotation_data.proto",
5+
// // "object.proto",
6+
// ] {
7+
// println!("cargo:rerun-if-changed=src/protos/{filename}");
8+
// prost_build::Config::new()
9+
// .out_dir("src/generated/")
10+
// .compile_protos(&[&format!("src/protos/{filename}")], &["src/protos/"])?;
11+
// }
12+
13+
Ok(())
14+
}

0 commit comments

Comments
 (0)