Skip to content

Commit 247a7d4

Browse files
authored
docs: update tutorial document (#213)
* docs: move cli directory to the document root Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * docs: update the docuemnt for the rendering tutorial Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * docs: add a link to the CLI docuemnt Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> --------- Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
1 parent dc77bd1 commit 247a7d4

6 files changed

Lines changed: 14 additions & 22 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A toolkit to load and operate T4 dataset.
1111
🏠 [Documentation](https://tier4.github.io/t4-devkit/) |
1212
📝 [Dataset Schema](https://tier4.github.io/t4-devkit/schema) |
1313
⚙️ [Tutorial](https://tier4.github.io/t4-devkit/tutorials/initialize/) |
14+
💻 [CLI](https://tier4.github.io/t4-devkit/cli/) |
1415
🧰 [API Reference](https://tier4.github.io/t4-devkit/apis/tier4/)
1516

1617
### Installation
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ t4viz --install-completion
3030

3131
### Scene
3232

33-
This command performs the same behavior with [`Tier4.render_scene(...)`](../render.md#rendering-scene).
33+
This command performs the same behavior with [`Tier4.render_scene(...)`](../tutorials/render.md#rendering-scene).
3434

3535
For options, run `t4viz scene -h`.
3636

@@ -40,7 +40,7 @@ t4viz scene <DATA_ROOT> [OPTIONS]
4040

4141
### Specific Instance(s)
4242

43-
This command performs the same behavior with [`Tier4.render_instance(...)`](../render.md#rendering-instances).
43+
This command performs the same behavior with [`Tier4.render_instance(...)`](../tutorials/render.md#rendering-instances).
4444

4545
For options, run `t4viz instance -h`.
4646

@@ -56,7 +56,7 @@ t4viz instance <DATA_ROOT> <INSTANCE_TOKEN1> <INSTANCE_TOKEN2> ... [OPTIONS]
5656

5757
### PointCloud
5858

59-
This command performs the same behavior with [`Tier4.render_pointcloud(...)`](../render.md#rendering-pointcloud).
59+
This command performs the same behavior with [`Tier4.render_pointcloud(...)`](../tutorials/render.md#rendering-pointcloud).
6060

6161
For options, run `t4viz pointcloud -h`.
6262

docs/tutorials/render.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ To initialize `RerunViewer`, you can use the `ViewerBuilder` class:
7373
.with_spatial3d()
7474
.with_spatial2d(cameras=["CAM_FRONT", "CAM_BACK"])
7575
.with_labels({"car": 1, "pedestrian": 2})
76-
.build("foo")
76+
.build(app_id="foo")
7777
)
7878

7979
# Timestamp in seconds
@@ -92,7 +92,7 @@ To initialize `RerunViewer`, you can use the `ViewerBuilder` class:
9292
It allows you to render boxes by specifying elements of boxes directly.
9393

9494
```python
95-
# Rendering 3D boxes
95+
# Rendering 3D boxes by specifying elements of boxes directly
9696
>>> centers = [[i, i, i] for i in range(10)]
9797
>>> frame_id = "base_link"
9898
>>> rotations = [[1, 0, 0, 0] for _ in range(10)]
@@ -108,31 +108,22 @@ It allows you to render boxes by specifying elements of boxes directly.
108108
For 2D spaces, you need to specify camera names in the viewer constructor, and render images by specifying camera names:
109109

110110
```python
111-
# RerunViewer(<APP_ID:str>, cameras=<CAMERA_NAMES:[str;N]>)
112-
>>> viewer = (
113-
ViewerBuilder()
114-
.with_spatial3d()
115-
.with_spatial2d(cameras=["camera1"])
116-
.with_labels({"car": 1, "pedestrian": 2})
117-
.build("foo")
118-
)
119-
120111
>>> import numpy as np
112+
>>> from t4_devkit.dataclass import Box2D
113+
114+
# Rendering an image
121115
>>> image = np.zeros((100, 100, 3), dtype=np.uint8)
122116
>>> viewer.render_image(seconds, "camera1", image)
123-
```
124117

125-
```python
126118
# Rendering 2D boxes
127-
>>> from t4_devkit.dataclass import Box2D
128119
>>> box2ds = [Box2D(...)...]
129120
>>> viewer.render_box2ds(seconds, "camera1", box2ds)
130121
```
131122

132123
It allows you to render boxes by specifying elements of boxes directly:
133124

134125
```python
135-
# Rendering 2D boxes
126+
# Rendering 2D boxes by specifying elements of boxes directly
136127
>>> rois = [[0, 0, 10 * i, 10 * i] for i in range(10)]
137128
>>> viewer.render_box2ds(seconds, "camera1", rois, class_ids)
138129
```

mkdocs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ nav:
1414
- Initialization: tutorials/initialize.md
1515
- Visualization: tutorials/render.md
1616
- Schema Customization: tutorials/customize.md
17-
- CLI:
18-
- Command Line Tools: tutorials/cli/index.md
19-
- t4viz: tutorials/cli/t4viz.md
20-
- t4sanity: tutorials/cli/t4sanity.md
17+
- CLI:
18+
- Home: cli/index.md
19+
- t4viz: cli/t4viz.md
20+
- t4sanity: cli/t4sanity.md
2121
- API References:
2222
- t4_devkit.tier4: apis/tier4.md
2323
- t4_devkit.helper: apis/helper.md

0 commit comments

Comments
 (0)