Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylark0924 committed Sep 10, 2022
1 parent 5b8e7e6 commit ebfe6be
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions rofunc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Zed](#zed)
- [Record](#record)
- [Playback](#playback)
- [Export](#export)

## Hello, robot world!

Expand All @@ -35,7 +36,7 @@ import rofunc as rf
| | | `optitrack.visualize` | Show or save gif about the motion | |
| | ZED | `zed.record` | Record with multiple cameras ||
| | | `zed.playback` | Playback the recording and save snapshots ||
| | | `zed.export` | Export the recording to mp4 | |
| | | `zed.export` | Export the recording to .avi and image sequence | |
| | Multi-modal | `mmodal.record` | Record multi-modal demonstration data simultaneously | |
| **Logger** | | `logger.write` | Custom tensorboard-based logger | |
| **Coordinate** | | `coord.custom_class` | Define the custom class of `Pose` | |
Expand Down Expand Up @@ -200,4 +201,42 @@ Saving image 1.png : SUCCESS
Saving image 2.png : SUCCESS
Saving image 3.png : SUCCESS
...
```
```

#### Export
```python
def export(filepath, mode=1):
"""
Export the svo file with specific mode.
Args:
filepath: SVO file path (input) : path/to/file.svo
mode: Export mode: 0=Export LEFT+RIGHT AVI.
1=Export LEFT+DEPTH_VIEW AVI.
2=Export LEFT+RIGHT image sequence.
3=Export LEFT+DEPTH_VIEW image sequence.
4=Export LEFT+DEPTH_16Bit image sequence.
Returns:
"""
```

Example
```python
import rofunc as rf

rf.zed.export('/home/ubuntu/Data/06_24/Video/20220624_1649/38709363.svo', 2)
```

> Since the converting always take a long time, I provide the batch form to convert in parallel.
```python
def export_batch(filedir, all_mode=True, mode=None, core_num=10):
```

Example:
```
rf.zed.export_batch('/home/ubuntu/Data/06_24/Video/20220624_1649', core_num=20)
```

Then you can convert all the .svo files under the specific directory with all mode in parallel. Enjoy it!

0 comments on commit ebfe6be

Please sign in to comment.