File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
FPS = 24 # set to 30 for smoother frame rate
15
15
16
+ def parse_args ():
17
+ import argparse
18
+ p = argparse .ArgumentParser (__doc__ )
19
+ p .add_argument ("--mapLoadPath" , help = "SLAM map path" , default = None )
20
+ return p .parse_args ()
21
+
16
22
def make_pipelines ():
17
23
pipeline = depthai .Pipeline ()
18
- vio_pipeline = spectacularAI .depthai .Pipeline (pipeline )
24
+ config = spectacularAI .depthai .Configuration ()
25
+ args = parse_args ()
26
+ if args .mapLoadPath is not None :
27
+ config .mapLoadPath = args .mapLoadPath
28
+ config .useSlam = True
29
+ vio_pipeline = spectacularAI .depthai .Pipeline (pipeline , config )
19
30
20
31
# NOTE: this simple method of reading RGB data from the device does not
21
32
# scale to well to higher resolutions. Use YUV data with larger resolutions
Original file line number Diff line number Diff line change 43
43
p .add_argument ("--gray" , help = "Record (rectified) gray video data" , action = "store_true" )
44
44
p .add_argument ("--no_convert" , help = "Skip converting h265 video file" , action = "store_true" )
45
45
p .add_argument ('--no_preview' , help = 'Do not show a live preview' , action = "store_true" )
46
+ p .add_argument ('--slam' , help = 'Record SLAM map' , action = "store_true" )
46
47
p .add_argument ("--resolution" , help = "Gray input resolution (gray)" ,
47
48
default = config .inputResolution ,
48
49
choices = ['400p' , '800p' ])
52
53
53
54
config .recordingFolder = args .output
54
55
config .inputResolution = args .resolution
56
+ if args .slam :
57
+ config .useSlam = True
58
+ config .mapSavePath = os .path .join (args .output , 'slam_map._' )
55
59
56
60
# Enable recoding by setting recordingFolder option
57
61
vio_pipeline = spectacularAI .depthai .Pipeline (pipeline , config )
You can’t perform that action at this time.
0 commit comments