Emil Ernerfeldt commited on
Commit
1602469
1 Parent(s): 6ae6e49

Add code to download dataset and visualize with Rerun

Browse files
.clang-format DELETED
@@ -1,34 +0,0 @@
1
- BasedOnStyle: Google
2
-
3
- # Make it slightly more similar to Rust.
4
- # Based loosely on https://gist.github.com/YodaEmbedding/c2c77dc693d11f3734d78489f9a6eea4
5
- AccessModifierOffset: -2
6
- AlignAfterOpenBracket: BlockIndent
7
- AllowAllArgumentsOnNextLine: false
8
- AllowShortBlocksOnASingleLine: false
9
- AllowShortCaseLabelsOnASingleLine: false
10
- AllowShortFunctionsOnASingleLine: Empty
11
- AllowShortIfStatementsOnASingleLine: Never
12
- AlwaysBreakAfterReturnType: None
13
- AlwaysBreakBeforeMultilineStrings: true
14
- BinPackArguments: false
15
- BreakStringLiterals: false
16
- ColumnLimit: 100
17
- ContinuationIndentWidth: 4
18
- DerivePointerAlignment: false
19
- EmptyLineBeforeAccessModifier: LogicalBlock
20
- IndentWidth: 4
21
- IndentWrappedFunctionNames: true
22
- InsertBraces: true
23
- InsertTrailingCommas: Wrapped
24
- MaxEmptyLinesToKeep: 1
25
- NamespaceIndentation: All
26
- PointerAlignment: Left
27
- ReflowComments: false
28
- SeparateDefinitionBlocks: Always
29
- SpacesBeforeTrailingComments: 1
30
-
31
- # Don't change include blocks, we want to control this manually.
32
- # Sorting headers however is allowed as all our headers should be standalone.
33
- IncludeBlocks: Preserve
34
- SortIncludes: CaseInsensitive
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.github/workflows/cpp.yml DELETED
@@ -1,20 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
- on: [push, pull_request]
3
-
4
- name: C++
5
-
6
- jobs:
7
- cpp-check:
8
- name: C++
9
- runs-on: ubuntu-22.04
10
- steps:
11
- - uses: actions/checkout@v4
12
-
13
- - uses: prefix-dev/setup-pixi@v0.5.2
14
- with:
15
- pixi-version: v0.19.0
16
- cache: true
17
-
18
- - run: pixi run build
19
-
20
- - run: pixi run cpp-fmt-check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.github/workflows/rust.yml DELETED
@@ -1,145 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
- on: [push, pull_request]
3
-
4
- name: Rust
5
-
6
- env:
7
- RUSTFLAGS: -D warnings
8
- RUSTDOCFLAGS: -D warnings
9
-
10
- jobs:
11
- rust-check:
12
- name: Rust
13
- runs-on: ubuntu-22.04
14
- steps:
15
- - uses: actions/checkout@v4
16
-
17
- - uses: actions-rs/toolchain@v1
18
- with:
19
- profile: default
20
- toolchain: 1.76.0
21
- override: true
22
-
23
- - name: Install packages (Linux)
24
- if: runner.os == 'Linux' && false # TODO: enable if eframe is part of the project, otherwise remove
25
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
26
- with:
27
- # some deps used by eframe, if that is part of the project
28
- packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev # libgtk-3-dev is used by rfd
29
- version: 1.0
30
- execute_install_scripts: true
31
-
32
- - name: Set up cargo cache
33
- uses: Swatinem/rust-cache@v2
34
-
35
- - name: Rustfmt
36
- uses: actions-rs/cargo@v1
37
- with:
38
- command: fmt
39
- args: --all -- --check
40
-
41
- - name: Install cargo-cranky
42
- uses: baptiste0928/cargo-install@v1
43
- with:
44
- crate: cargo-cranky
45
-
46
- - name: check --all-features
47
- uses: actions-rs/cargo@v1
48
- with:
49
- command: check
50
- args: --all-features --all-targets
51
-
52
- - name: check default features
53
- uses: actions-rs/cargo@v1
54
- with:
55
- command: check
56
- args: --all-targets
57
-
58
- - name: check --no-default-features
59
- uses: actions-rs/cargo@v1
60
- with:
61
- command: check
62
- args: --no-default-features --lib --all-targets
63
-
64
- - name: Test doc-tests
65
- uses: actions-rs/cargo@v1
66
- with:
67
- command: test
68
- args: --doc --all-features
69
-
70
- - name: cargo doc --lib
71
- uses: actions-rs/cargo@v1
72
- with:
73
- command: doc
74
- args: --lib --no-deps --all-features
75
-
76
- - name: cargo doc --document-private-items
77
- uses: actions-rs/cargo@v1
78
- with:
79
- command: doc
80
- args: --document-private-items --no-deps --all-features
81
-
82
- - name: Build tests
83
- uses: actions-rs/cargo@v1
84
- with:
85
- command: test
86
- args: --all-features --no-run
87
-
88
- - name: Run test
89
- uses: actions-rs/cargo@v1
90
- with:
91
- command: test
92
- args: --all-features
93
-
94
- - name: Cranky
95
- uses: actions-rs/cargo@v1
96
- with:
97
- command: cranky
98
- args: --all-targets --all-features -- -D warnings
99
-
100
- # ---------------------------------------------------------------------------
101
-
102
- check_wasm:
103
- name: Check wasm32
104
- runs-on: ubuntu-22.04
105
- steps:
106
- - uses: actions/checkout@v4
107
- - uses: actions-rs/toolchain@v1
108
- with:
109
- profile: minimal
110
- toolchain: 1.76.0
111
- target: wasm32-unknown-unknown
112
- override: true
113
-
114
- - run: sudo apt-get update && sudo apt-get install libgtk-3-dev
115
-
116
- - name: Set up cargo cache
117
- uses: Swatinem/rust-cache@v2
118
-
119
- - name: Install cargo-cranky
120
- uses: baptiste0928/cargo-install@v1
121
- with:
122
- crate: cargo-cranky
123
-
124
- - name: Check wasm32
125
- uses: actions-rs/cargo@v1
126
- with:
127
- command: check
128
- args: --target wasm32-unknown-unknown
129
-
130
- - name: Cranky wasm32
131
- env:
132
- CLIPPY_CONF_DIR: "scripts/clippy_wasm" # Use scripts/clippy_wasm/clippy.toml
133
- run: cargo cranky --target wasm32-unknown-unknown -- -D warnings
134
-
135
- # ---------------------------------------------------------------------------
136
-
137
- cargo-deny:
138
- runs-on: ubuntu-22.04
139
- steps:
140
- - uses: actions/checkout@v3
141
- - uses: EmbarkStudios/cargo-deny-action@v1
142
- with:
143
- rust-version: "1.76.0"
144
- log-level: warn
145
- command: check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.vscode/launch.json CHANGED
@@ -14,7 +14,7 @@
14
  },
15
  // Rust:
16
  {
17
- "name": "Debug 'rerun_template'",
18
  "type": "lldb",
19
  "request": "launch",
20
  "cargo": {
@@ -22,7 +22,7 @@
22
  "build"
23
  ],
24
  "filter": {
25
- "name": "rerun_template",
26
  "kind": "bin"
27
  }
28
  },
 
14
  },
15
  // Rust:
16
  {
17
+ "name": "Debug 'rerun_example_lerobot'",
18
  "type": "lldb",
19
  "request": "launch",
20
  "cargo": {
 
22
  "build"
23
  ],
24
  "filter": {
25
+ "name": "rerun_example_lerobot",
26
  "kind": "bin"
27
  }
28
  },
CHANGELOG.md DELETED
@@ -1 +0,0 @@
1
- # Changelog
 
 
CMakeLists.txt DELETED
@@ -1,18 +0,0 @@
1
- cmake_minimum_required(VERSION 3.16...3.27)
2
-
3
- project(rerun_template LANGUAGES CXX) # TODO
4
-
5
- set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6
-
7
- if(NOT DEFINED CMAKE_CXX_STANDARD)
8
- set(CMAKE_CXX_STANDARD 17)
9
- endif()
10
-
11
- # Rerun:
12
- include(FetchContent)
13
- FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.15.1/rerun_cpp_sdk.zip)
14
- FetchContent_MakeAvailable(rerun_sdk)
15
-
16
- add_executable(rerun_template src/main.cpp) # TODO
17
- target_link_libraries(rerun_template rerun_sdk) # TODO
18
- target_include_directories(rerun_template PRIVATE src) # TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cargo.lock DELETED
@@ -1,7 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 3
4
-
5
- [[package]]
6
- name = "rerun_template"
7
- version = "0.1.0"
 
 
 
 
 
 
 
 
Cargo.toml DELETED
@@ -1,30 +0,0 @@
1
- [package]
2
- authors = ["rerun.io <opensource@rerun.io>"]
3
- categories = [] # TODO
4
- description = "" # TODO
5
- edition = "2021"
6
- homepage = "https://github.com/rerun-io/rerun_template" # TODO
7
- include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"]
8
- keywords = [] # TODO
9
- license = "MIT OR Apache-2.0"
10
- name = "rerun_template" # TODO
11
- readme = "README.md"
12
- repository = "https://github.com/rerun-io/rerun_template" # TODO
13
- rust-version = "1.76"
14
- version = "0.1.0"
15
-
16
- [package.metadata.docs.rs]
17
- all-features = true
18
-
19
-
20
- [features]
21
- default = []
22
-
23
-
24
- [dependencies]
25
-
26
-
27
- [dev-dependencies]
28
-
29
-
30
- [patch.crates-io]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cranky.toml DELETED
@@ -1,166 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
- #
3
- # https://github.com/ericseppanen/cargo-cranky
4
- # cargo install cargo-cranky && cargo cranky
5
- # See also clippy.toml
6
-
7
- deny = [
8
- "unsafe_code",
9
- #"clippy::self_named_module_files", # Disabled waiting on https://github.com/rust-lang/rust-clippy/issues/9602
10
- ]
11
-
12
- warn = [
13
- "clippy::all",
14
- "clippy::as_ptr_cast_mut",
15
- "clippy::await_holding_lock",
16
- "clippy::bool_to_int_with_if",
17
- "clippy::char_lit_as_u8",
18
- "clippy::checked_conversions",
19
- "clippy::clear_with_drain",
20
- "clippy::cloned_instead_of_copied",
21
- "clippy::cloned_instead_of_copied",
22
- "clippy::dbg_macro",
23
- "clippy::debug_assert_with_mut_call",
24
- "clippy::derive_partial_eq_without_eq",
25
- "clippy::disallowed_macros", # See clippy.toml
26
- "clippy::disallowed_methods", # See clippy.toml
27
- "clippy::disallowed_names", # See clippy.toml
28
- "clippy::disallowed_script_idents", # See clippy.toml
29
- "clippy::disallowed_types", # See clippy.toml
30
- "clippy::doc_link_with_quotes",
31
- "clippy::doc_markdown",
32
- "clippy::empty_enum",
33
- "clippy::enum_glob_use",
34
- "clippy::equatable_if_let",
35
- "clippy::exit",
36
- "clippy::expl_impl_clone_on_copy",
37
- "clippy::explicit_deref_methods",
38
- "clippy::explicit_into_iter_loop",
39
- "clippy::explicit_iter_loop",
40
- "clippy::fallible_impl_from",
41
- "clippy::filter_map_next",
42
- "clippy::flat_map_option",
43
- "clippy::float_cmp_const",
44
- "clippy::fn_params_excessive_bools",
45
- "clippy::fn_to_numeric_cast_any",
46
- "clippy::from_iter_instead_of_collect",
47
- "clippy::get_unwrap",
48
- "clippy::if_let_mutex",
49
- "clippy::implicit_clone",
50
- "clippy::imprecise_flops",
51
- "clippy::index_refutable_slice",
52
- "clippy::inefficient_to_string",
53
- "clippy::infinite_loop",
54
- "clippy::into_iter_without_iter",
55
- "clippy::invalid_upcast_comparisons",
56
- "clippy::iter_not_returning_iterator",
57
- "clippy::iter_on_empty_collections",
58
- "clippy::iter_on_single_items",
59
- "clippy::iter_over_hash_type",
60
- "clippy::iter_without_into_iter",
61
- "clippy::large_digit_groups",
62
- "clippy::large_include_file",
63
- "clippy::large_stack_arrays",
64
- "clippy::large_stack_frames",
65
- "clippy::large_types_passed_by_value",
66
- "clippy::let_underscore_untyped",
67
- "clippy::let_unit_value",
68
- "clippy::linkedlist",
69
- "clippy::lossy_float_literal",
70
- "clippy::macro_use_imports",
71
- "clippy::manual_assert",
72
- "clippy::manual_clamp",
73
- "clippy::manual_instant_elapsed",
74
- "clippy::manual_let_else",
75
- "clippy::manual_ok_or",
76
- "clippy::manual_string_new",
77
- "clippy::map_err_ignore",
78
- "clippy::map_flatten",
79
- "clippy::map_unwrap_or",
80
- "clippy::match_on_vec_items",
81
- "clippy::match_same_arms",
82
- "clippy::match_wild_err_arm",
83
- "clippy::match_wildcard_for_single_variants",
84
- "clippy::mem_forget",
85
- "clippy::mismatched_target_os",
86
- "clippy::mismatching_type_param_order",
87
- "clippy::missing_assert_message",
88
- "clippy::missing_enforced_import_renames",
89
- "clippy::missing_errors_doc",
90
- "clippy::missing_safety_doc",
91
- "clippy::mut_mut",
92
- "clippy::mutex_integer",
93
- "clippy::needless_borrow",
94
- "clippy::needless_continue",
95
- "clippy::needless_for_each",
96
- "clippy::needless_pass_by_ref_mut",
97
- "clippy::needless_pass_by_value",
98
- "clippy::negative_feature_names",
99
- "clippy::nonstandard_macro_braces",
100
- "clippy::option_option",
101
- "clippy::path_buf_push_overwrite",
102
- "clippy::ptr_as_ptr",
103
- "clippy::ptr_cast_constness",
104
- "clippy::pub_without_shorthand",
105
- "clippy::rc_mutex",
106
- "clippy::readonly_write_lock",
107
- "clippy::redundant_type_annotations",
108
- "clippy::ref_option_ref",
109
- "clippy::ref_patterns",
110
- "clippy::rest_pat_in_fully_bound_structs",
111
- "clippy::same_functions_in_if_condition",
112
- "clippy::semicolon_if_nothing_returned",
113
- "clippy::should_panic_without_expect",
114
- "clippy::significant_drop_tightening",
115
- "clippy::single_match_else",
116
- "clippy::str_to_string",
117
- "clippy::string_add_assign",
118
- "clippy::string_add",
119
- "clippy::string_lit_as_bytes",
120
- "clippy::string_lit_chars_any",
121
- "clippy::string_to_string",
122
- "clippy::suspicious_command_arg_space",
123
- "clippy::suspicious_xor_used_as_pow",
124
- "clippy::todo",
125
- "clippy::too_many_lines",
126
- "clippy::trailing_empty_array",
127
- "clippy::trait_duplication_in_bounds",
128
- "clippy::tuple_array_conversions",
129
- "clippy::unchecked_duration_subtraction",
130
- "clippy::undocumented_unsafe_blocks",
131
- "clippy::unimplemented",
132
- "clippy::uninhabited_references",
133
- "clippy::uninlined_format_args",
134
- "clippy::unnecessary_box_returns",
135
- "clippy::unnecessary_safety_doc",
136
- "clippy::unnecessary_struct_initialization",
137
- "clippy::unnecessary_wraps",
138
- "clippy::unnested_or_patterns",
139
- "clippy::unused_peekable",
140
- "clippy::unused_rounding",
141
- "clippy::unused_self",
142
- "clippy::unwrap_used",
143
- "clippy::useless_transmute",
144
- "clippy::verbose_file_reads",
145
- "clippy::wildcard_dependencies",
146
- "clippy::wildcard_imports",
147
- "clippy::zero_sized_map_values",
148
- "elided_lifetimes_in_paths",
149
- "future_incompatible",
150
- "nonstandard_style",
151
- "rust_2018_idioms",
152
- "rust_2021_prelude_collisions",
153
- "rustdoc::missing_crate_level_docs",
154
- "semicolon_in_expressions_from_macros",
155
- "trivial_casts",
156
- "trivial_numeric_casts",
157
- "unsafe_op_in_unsafe_fn", # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
158
- "unused_extern_crates",
159
- "unused_import_braces",
160
- "unused_lifetimes",
161
- "unused_qualifications",
162
- ]
163
-
164
- allow = [
165
- "clippy::manual_range_contains", # this one is just worse imho
166
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,36 +1,16 @@
1
- # Rerun template repository
2
- Template for our private and public repos, containing CI, CoC, etc
 
3
 
4
- When creating a new Rerun repository, use this as a template, then modify it as it makes sense.
5
 
6
- This template should be the default for any repository of any kind, including:
7
- * Rust projects
8
- * C++ projects
9
- * Python projects
10
- * Other stuff
11
 
12
- This template includes
13
- * License files
14
- * Code of Conduct
15
- * Helpers for checking and linting Rust code
16
- - `cargo-cranky`
17
- - `cargo-deny`
18
- - `rust-toolchain`
19
- * CI for:
20
- - Spell checking
21
- - Link checking
22
- - Rust checks
23
 
24
-
25
- ## How to use
26
- Start by clicking "Use this template" at https://github.com/rerun-io/rerun_template/ or follow [these instructions](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template).
27
-
28
- Then follow these steps:
29
- * Search and replace `rerun_template` with the name of the repository
30
- * Run `scripts/template_update.py init --languages cpp,rust,python` to delete files you don't need (give the languages you need support for)
31
- * Search for `TODO` and fill in all those places
32
- * Replace this `README.md` with something better
33
- * Commit!
34
-
35
- In the future you can always update this repository with the latest changes from the template by running:
36
- * `scripts/template_update.py update --languages cpp,rust,python`
 
1
+ # Rerun visualization for LeRobot
2
+ * https://huggingface.co/lerobot
3
+ * https://huggingface.co/datasets/lerobot/pusht
4
 
5
+ https://github.com/rerun-io/python-example-lerobot/assets/1148717/7e1bd3ea-376a-492d-814d-7384dfbe0128
6
 
7
+ ## Getting started
8
+ Requires Python 3.10 or higher.
 
 
 
9
 
10
+ ```sh
11
+ pip install -r requirements.txt
12
+ python main.py
13
+ ```
 
 
 
 
 
 
 
14
 
15
+ ## Note for the maintainer
16
+ You can update this repository with the latest changes from https://github.com/rerun-io/rerun_template by running `scripts/template_update.py update --languages python`.
 
 
 
 
 
 
 
 
 
 
 
bacon.toml DELETED
@@ -1,70 +0,0 @@
1
- # This is a configuration file for the bacon tool
2
- # More info at https://github.com/Canop/bacon
3
-
4
- default_job = "cranky"
5
-
6
- [jobs]
7
-
8
- [jobs.cranky]
9
- command = [
10
- "cargo",
11
- "cranky",
12
- "--all-targets",
13
- "--all-features",
14
- "--color=always",
15
- ]
16
- need_stdout = false
17
- watch = ["tests", "benches", "examples"]
18
-
19
- [jobs.check]
20
- command = [
21
- "cargo",
22
- "check",
23
- "--all-targets",
24
- "--all-features",
25
- "--color=always",
26
- ]
27
- need_stdout = false
28
- watch = ["tests", "benches", "examples"]
29
-
30
- [jobs.test]
31
- command = ["cargo", "test", "--color=always"]
32
- need_stdout = true
33
- watch = ["tests"]
34
-
35
- [jobs.doc]
36
- command = ["cargo", "doc", "--color=always", "--all-features", "--no-deps"]
37
- need_stdout = false
38
-
39
- # if the doc compiles, then it opens in your browser and bacon switches
40
- # to the previous job
41
- [jobs.doc-open]
42
- command = [
43
- "cargo",
44
- "doc",
45
- "--color=always",
46
- "--all-features",
47
- "--no-deps",
48
- "--open",
49
- ]
50
- need_stdout = false
51
- on_success = "back" # so that we don't open the browser at each change
52
-
53
- # You can run your application and have the result displayed in bacon,
54
- # *if* it makes sense for this crate. You can run an example the same
55
- # way. Don't forget the `--color always` part or the errors won't be
56
- # properly parsed.
57
- [jobs.run]
58
- command = ["cargo", "run", "--color=always"]
59
- need_stdout = true
60
-
61
- # You may define here keybindings that would be specific to
62
- # a project, for example a shortcut to launch a specific job.
63
- # Shortcuts to internal functions (scrolling, toggling, etc.)
64
- # should go in your personal prefs.toml file instead.
65
- [keybindings]
66
- i = "job:initial"
67
- c = "job:cranky"
68
- d = "job:doc-open"
69
- t = "job:test"
70
- r = "job:run"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
clippy.toml DELETED
@@ -1,79 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
- #
3
- # There is also a scripts/clippy_wasm/clippy.toml which forbids some methods that are not available in wasm.
4
-
5
- # -----------------------------------------------------------------------------
6
- # Section identical to scripts/clippy_wasm/clippy.toml:
7
-
8
- msrv = "1.76"
9
-
10
- allow-unwrap-in-tests = true
11
-
12
- # https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#avoid-breaking-exported-api
13
- # We want suggestions, even if it changes public API.
14
- avoid-breaking-exported-api = false
15
-
16
- excessive-nesting-threshold = 8
17
-
18
- max-fn-params-bools = 1
19
-
20
- # https://rust-lang.github.io/rust-clippy/master/index.html#/large_include_file
21
- max-include-file-size = 1000000
22
-
23
- # https://rust-lang.github.io/rust-clippy/master/index.html#/large_stack_frames
24
- stack-size-threshold = 512000
25
-
26
- too-many-lines-threshold = 200
27
-
28
- # -----------------------------------------------------------------------------
29
-
30
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
31
- disallowed-macros = ['dbg']
32
-
33
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
34
- disallowed-methods = [
35
- { path = "egui_extras::TableBody::row", reason = "`row` doesn't scale. Use `rows` instead." },
36
- { path = "glam::Vec2::normalize", reason = "normalize() can create NaNs. Use try_normalize or normalize_or_zero" },
37
- { path = "glam::Vec3::normalize", reason = "normalize() can create NaNs. Use try_normalize or normalize_or_zero" },
38
- { path = "sha1::Digest::new", reason = "SHA1 is cryptographically broken" },
39
- { path = "std::env::temp_dir", reason = "Use the tempdir crate instead" },
40
- { path = "std::panic::catch_unwind", reason = "We compile with `panic = 'abort'`" },
41
- { path = "std::thread::spawn", reason = "Use `std::thread::Builder` and name the thread" },
42
-
43
- # There are many things that aren't allowed on wasm,
44
- # but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406)
45
- # so we do that in `scripts/clippy_wasm/clippy.toml` instead.
46
- ]
47
-
48
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
49
- disallowed-names = []
50
-
51
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types
52
- disallowed-types = [
53
- { path = "ring::digest::SHA1_FOR_LEGACY_USE_ONLY", reason = "SHA1 is cryptographically broken" },
54
-
55
- { path = "std::sync::Condvar", reason = "Use parking_lot instead" },
56
- { path = "std::sync::Mutex", reason = "Use parking_lot instead" },
57
- { path = "std::sync::RwLock", reason = "Use parking_lot instead" },
58
-
59
- # "std::sync::Once", # enabled for now as the `log_once` macro uses it internally
60
- ]
61
-
62
- # Allow-list of words for markdown in dosctrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
63
- doc-valid-idents = [
64
- # You must also update the same list in `scripts/clippy_wasm/clippy.toml`!
65
- "GitHub",
66
- "GLB",
67
- "GLTF",
68
- "iOS",
69
- "macOS",
70
- "NaN",
71
- "OBJ",
72
- "OpenGL",
73
- "PyPI",
74
- "sRGB",
75
- "sRGBA",
76
- "WebGL",
77
- "WebSocket",
78
- "WebSockets",
79
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
deny.toml DELETED
@@ -1,85 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
- #
3
- # https://github.com/EmbarkStudios/cargo-deny
4
- #
5
- # cargo-deny checks our dependency tree for copy-left licenses,
6
- # duplicate dependencies, and rustsec advisories (https://rustsec.org/advisories).
7
- #
8
- # Install: `cargo install cargo-deny`
9
- # Check: `cargo deny check`.
10
-
11
-
12
- # Note: running just `cargo deny check` without a `--target` can result in
13
- # false positives due to https://github.com/EmbarkStudios/cargo-deny/issues/324
14
- [graph]
15
- targets = [
16
- { triple = "aarch64-apple-darwin" },
17
- { triple = "i686-pc-windows-gnu" },
18
- { triple = "i686-pc-windows-msvc" },
19
- { triple = "i686-unknown-linux-gnu" },
20
- { triple = "wasm32-unknown-unknown" },
21
- { triple = "x86_64-apple-darwin" },
22
- { triple = "x86_64-pc-windows-gnu" },
23
- { triple = "x86_64-pc-windows-msvc" },
24
- { triple = "x86_64-unknown-linux-gnu" },
25
- { triple = "x86_64-unknown-linux-musl" },
26
- { triple = "x86_64-unknown-redox" },
27
- ]
28
- all-features = true
29
-
30
-
31
- [advisories]
32
- version = 2
33
- ignore = [
34
- "RUSTSEC-2023-0081", # TODO(#5998): unmaintained crate "safemem" pulled in by "cargo-run-wasm"
35
- ]
36
-
37
-
38
- [bans]
39
- multiple-versions = "deny"
40
- wildcards = "allow" # We use them for examples
41
- deny = []
42
- skip = []
43
- skip-tree = []
44
-
45
-
46
- [licenses]
47
- version = 2
48
- private = { ignore = true }
49
- confidence-threshold = 0.93 # We want really high confidence when inferring licenses from text
50
- allow = [
51
- "Apache-2.0 WITH LLVM-exception", # https://spdx.org/licenses/LLVM-exception.html
52
- "Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
53
- "BSD-2-Clause", # https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)
54
- "BSD-3-Clause", # https://tldrlegal.com/license/bsd-3-clause-license-(revised)
55
- "BSL-1.0", # https://tldrlegal.com/license/boost-software-license-1.0-explained
56
- "CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/
57
- "ISC", # https://www.tldrlegal.com/license/isc-license
58
- "LicenseRef-UFL-1.0", # See https://github.com/emilk/egui/issues/2321
59
- "MIT-0", # https://choosealicense.com/licenses/mit-0/
60
- "MIT", # https://tldrlegal.com/license/mit-license
61
- "MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux.
62
- "OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html
63
- "OpenSSL", # https://www.openssl.org/source/license.html - used on Linux
64
- "Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
65
- "Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib)
66
- ]
67
- exceptions = []
68
-
69
- [[licenses.clarify]]
70
- name = "webpki"
71
- expression = "ISC"
72
- license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]
73
-
74
- [[licenses.clarify]]
75
- name = "ring"
76
- expression = "MIT AND ISC AND OpenSSL"
77
- license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
78
-
79
-
80
- [sources]
81
- unknown-registry = "deny"
82
- unknown-git = "deny"
83
-
84
- [sources.allow-org]
85
- github = ["emilk", "rerun-io"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
main.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ from __future__ import annotations
4
+
5
+ import rerun as rr
6
+ from datasets import load_dataset
7
+
8
+ # download/load dataset in pyarrow format
9
+ dataset = load_dataset("lerobot/pusht", split="train")
10
+
11
+ # select the frames belonging to episode number 5
12
+ ds_subset = dataset.filter(lambda frame: frame["episode_id"] == 5)
13
+
14
+ # load all frames in RAM in PIL format
15
+ frames = ds_subset["observation.image"]
16
+
17
+ rr.init("rerun_example_lerobot", spawn=True)
18
+
19
+ for i, frame in enumerate(frames):
20
+ rr.set_time_sequence("frame", i)
21
+ rr.log("observation/image", rr.Image(frame))
pixi.lock CHANGED
The diff for this file is too large to render. See raw diff
 
pixi.toml CHANGED
@@ -10,43 +10,20 @@
10
  # and `pixi run TASK` to run it (e.g. `pixi run example`).
11
 
12
  [project]
13
- name = "rerun_template" # TODO
14
  authors = ["rerun.io <opensource@rerun.io>"]
15
  channels = ["conda-forge"]
16
- description = "rerun_template" # TODO
17
  homepage = "https://rerun.io"
18
  license = "MIT OR Apache-2.0"
19
 
20
  platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
21
  readme = "README.md"
22
- repository = "https://github.com/rerun-io/rerun_template" # TODO
23
  version = "0.1.0"
24
 
25
 
26
  [tasks]
27
- # ------------------------------------------------------------------------------------------
28
- # C++ stuff:
29
- # Note: extra CLI argument after `pixi run TASK` are passed to the task cmd.
30
-
31
- # Clean C++ build artifacts
32
- clean = { cmd = "rm -rf build bin CMakeFiles/" }
33
- print-env = { cmd = "echo $PATH" }
34
- prepare = "cmake -G 'Ninja' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo"
35
-
36
- # Build C++ example
37
- build = { cmd = "cmake --build build --config RelWithDebInfo --target all", depends_on = [
38
- "prepare",
39
- ] }
40
-
41
- # Run C++ example
42
- example = { cmd = "build/rerun_template", depends_on = ["build"] }
43
-
44
- # Format C++ code
45
- cpp-fmt = { cmd = "clang-format -i src/*.[hc]pp" }
46
-
47
- # Check formatting of C++ code
48
- cpp-fmt-check = { cmd = "clang-format --dry-run --Werror -i src/*.[hc]pp" }
49
-
50
  # ------------------------------------------------------------------------------------------
51
  # Python stuff:
52
 
@@ -56,12 +33,6 @@ py-fmt-check = "ruff check --config pyproject.toml . && ruff format --check --co
56
  py-lint = "mypy --install-types --non-interactive --no-warn-unused-ignore"
57
 
58
  [dependencies]
59
- # C++ build-tools:
60
- cmake = "3.27.6"
61
- clang-tools = ">=15,<16" # clang-format
62
- cxx-compiler = "1.6.0.*"
63
- ninja = "1.11.1"
64
-
65
  # Python stuff:
66
  mypy = "1.8.0"
67
  ruff = "0.3.7"
 
10
  # and `pixi run TASK` to run it (e.g. `pixi run example`).
11
 
12
  [project]
13
+ name = "rerun_example_lerobot"
14
  authors = ["rerun.io <opensource@rerun.io>"]
15
  channels = ["conda-forge"]
16
+ description = "rerun_example_lerobot"
17
  homepage = "https://rerun.io"
18
  license = "MIT OR Apache-2.0"
19
 
20
  platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
21
  readme = "README.md"
22
+ repository = "https://github.com/rerun-io/python-example-lerobot"
23
  version = "0.1.0"
24
 
25
 
26
  [tasks]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  # ------------------------------------------------------------------------------------------
28
  # Python stuff:
29
 
 
33
  py-lint = "mypy --install-types --non-interactive --no-warn-unused-ignore"
34
 
35
  [dependencies]
 
 
 
 
 
 
36
  # Python stuff:
37
  mypy = "1.8.0"
38
  ruff = "0.3.7"
pyproject.toml CHANGED
@@ -21,7 +21,7 @@ extend-exclude = [
21
  ]
22
 
23
  lint.ignore = [
24
- # Missing docstring in public function - TODO(emilk): enable for SDK but not for examples
25
  "D1",
26
 
27
  # No blank lines allowed after function docstring.
 
21
  ]
22
 
23
  lint.ignore = [
24
+ # Missing docstring in public function/class
25
  "D1",
26
 
27
  # No blank lines allowed after function docstring.
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ datasets
2
+ rerun-sdk>=0.15.0,<0.16.0
rust-toolchain DELETED
@@ -1,10 +0,0 @@
1
- # If you see this, run "rustup self update" to get rustup 1.23 or newer.
2
-
3
- # NOTE: above comment is for older `rustup` (before TOML support was added),
4
- # which will treat the first line as the toolchain name, and therefore show it
5
- # to the user in the error, instead of "error: invalid channel name '[toolchain]'".
6
-
7
- [toolchain]
8
- channel = "1.76.0"
9
- components = ["rustfmt", "clippy"]
10
- targets = ["wasm32-unknown-unknown"]
 
 
 
 
 
 
 
 
 
 
 
scripts/clippy_wasm/clippy.toml DELETED
@@ -1,75 +0,0 @@
1
- # Copied from https://github.com/rerun-io/rerun_template
2
-
3
- # This is used by the CI so we can forbid some methods that are not available in wasm.
4
- #
5
- # We cannot forbid all these methods in the main `clippy.toml` because of
6
- # https://github.com/rust-lang/rust-clippy/issues/10406
7
-
8
- # -----------------------------------------------------------------------------
9
- # Section identical to the main clippy.toml:
10
-
11
- msrv = "1.76"
12
-
13
- allow-unwrap-in-tests = true
14
-
15
- # https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#avoid-breaking-exported-api
16
- # We want suggestions, even if it changes public API.
17
- avoid-breaking-exported-api = false
18
-
19
- excessive-nesting-threshold = 8
20
-
21
- max-fn-params-bools = 1
22
-
23
- # https://rust-lang.github.io/rust-clippy/master/index.html#/large_include_file
24
- max-include-file-size = 1000000
25
-
26
- too-many-lines-threshold = 200
27
-
28
- # -----------------------------------------------------------------------------
29
-
30
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
31
- disallowed-methods = [
32
- { path = "crossbeam::channel::Receiver::into_iter", reason = "Cannot block on Web" },
33
- { path = "crossbeam::channel::Receiver::iter", reason = "Cannot block on Web" },
34
- { path = "crossbeam::channel::Receiver::recv_timeout", reason = "Cannot block on Web" },
35
- { path = "crossbeam::channel::Receiver::recv", reason = "Cannot block on Web" },
36
- { path = "poll_promise::Promise::block_and_take", reason = "Cannot block on Web" },
37
- { path = "poll_promise::Promise::block_until_ready_mut", reason = "Cannot block on Web" },
38
- { path = "poll_promise::Promise::block_until_ready", reason = "Cannot block on Web" },
39
- { path = "rayon::spawn", reason = "Cannot spawn threads on wasm" },
40
- { path = "std::sync::mpsc::Receiver::into_iter", reason = "Cannot block on Web" },
41
- { path = "std::sync::mpsc::Receiver::iter", reason = "Cannot block on Web" },
42
- { path = "std::sync::mpsc::Receiver::recv_timeout", reason = "Cannot block on Web" },
43
- { path = "std::sync::mpsc::Receiver::recv", reason = "Cannot block on Web" },
44
- { path = "std::thread::spawn", reason = "Cannot spawn threads on wasm" },
45
- { path = "std::time::Duration::elapsed", reason = "use `web-time` crate instead for wasm/web compatibility" },
46
- { path = "std::time::Instant::now", reason = "use `web-time` crate instead for wasm/web compatibility" },
47
- { path = "std::time::SystemTime::now", reason = "use `web-time` or `time` crates instead for wasm/web compatibility" },
48
- ]
49
-
50
- # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types
51
- disallowed-types = [
52
- { path = "instant::SystemTime", reason = "Known bugs. Use web-time." },
53
- { path = "std::thread::Builder", reason = "Cannot spawn threads on wasm" },
54
- # { path = "std::path::PathBuf", reason = "Can't read/write files on web" }, // Used in build.rs files (which is fine).
55
- ]
56
-
57
- # Allow-list of words for markdown in dosctrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
58
- doc-valid-idents = [
59
- # You must also update the same list in the root `clippy.toml`!
60
- "..",
61
- "GitHub",
62
- "GLB",
63
- "GLTF",
64
- "iOS",
65
- "macOS",
66
- "NaN",
67
- "OBJ",
68
- "OpenGL",
69
- "PyPI",
70
- "sRGB",
71
- "sRGBA",
72
- "WebGL",
73
- "WebSocket",
74
- "WebSockets",
75
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/generate_changelog.py CHANGED
@@ -23,7 +23,7 @@ from git import Repo # pip install GitPython
23
  from tqdm import tqdm
24
 
25
  OWNER = "rerun-io"
26
- REPO = "rerun_template" # TODO: Change this to the name of the repo
27
  INCLUDE_LABELS = False # It adds quite a bit of visual noise
28
  OFFICIAL_RERUN_DEVS = [
29
  "abey79",
 
23
  from tqdm import tqdm
24
 
25
  OWNER = "rerun-io"
26
+ REPO = "rerun_example_lerobot"
27
  INCLUDE_LABELS = False # It adds quite a bit of visual noise
28
  OFFICIAL_RERUN_DEVS = [
29
  "abey79",
scripts/template_update.py CHANGED
@@ -4,7 +4,7 @@
4
  """
5
  The script has two purposes.
6
 
7
- After using `rerun_template` as a template, run this to clean out things you don't need.
8
  Use `scripts/template_update.py init --languages cpp,rust,python` for this.
9
 
10
  Update an existing repository with the latest changes from the template.
@@ -108,7 +108,7 @@ def update(languages: set[str], dry_run: bool) -> None:
108
  repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
109
 
110
  with tempfile.TemporaryDirectory() as temp_dir:
111
- Repo.clone_from("https://github.com/rerun-io/rerun_template.git", temp_dir)
112
  for root, dirs, files in os.walk(temp_dir):
113
  for file in files:
114
  src_path = os.path.join(root, file)
 
4
  """
5
  The script has two purposes.
6
 
7
+ After using `rerun_example_lerobot` as a template, run this to clean out things you don't need.
8
  Use `scripts/template_update.py init --languages cpp,rust,python` for this.
9
 
10
  Update an existing repository with the latest changes from the template.
 
108
  repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
109
 
110
  with tempfile.TemporaryDirectory() as temp_dir:
111
+ Repo.clone_from("https://github.com/rerun-io/python-example-lerobot.git", temp_dir)
112
  for root, dirs, files in os.walk(temp_dir):
113
  for file in files:
114
  src_path = os.path.join(root, file)
src/lib.rs DELETED
@@ -1 +0,0 @@
1
-
 
 
src/main.cpp DELETED
@@ -1,8 +0,0 @@
1
- #include <cstdio>
2
-
3
- #include <rerun.hpp>
4
-
5
- int main(int argc, const char* argv[]) {
6
- printf("Hello, World!\n");
7
- return 0;
8
- }
 
 
 
 
 
 
 
 
 
src/main.rs DELETED
@@ -1,3 +0,0 @@
1
- fn main() {
2
- println!("Hello, rerun_template!");
3
- }