File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Visual and Acoustic recorder
1+ # python- recorder
22
33Visual and Acoustic Odometry recorder using python. Devices: RealSense D435i
44camera, RODE VideoMicNTG and smartLav+ microphones
55
6+ Framework
7+
8+ TODO ros
9+
610# Setup
711
812Clone this repository to your local machine. Detailed instructions about
Original file line number Diff line number Diff line change 1+ [tool .poetry ]
2+ name = " python-recorder"
3+ version = " 0.0.1"
4+ description = " "
5+ authors = [" Andreu Gimenez <esdandreu@gmail.com>" ]
6+ readme = " README.md"
7+ license = " MIT"
8+ packages = [{include = " recorder" }]
9+
10+ [tool .poetry .scripts ]
11+ recorder = " recorder.__main__:app"
12+
13+ [tool .poetry .dependencies ]
14+ python = " ^3.7"
15+ typer = {extras = [" all" ], version = " ^0.4.0" }
16+ PyInquirer = " ^1.0.3"
17+ PyYAML = " ^5.1"
18+ numpy = " ^1.22.2"
19+ sounddevice = {version = " ^0.4.4" , optional = true }
20+ pyrealsense2 = {version = " ^2.50.0" , optional = true }
21+ Flask = {version = " ^2.1.1" , optional = true }
22+
23+ [tool .poetry .dev-dependencies ]
24+ pytest = " ^7.1.1"
25+
26+ [tool .poetry .extras ]
27+ realsense = [" pyrealsense2" ]
28+ microphone = [" sounddevice" ]
29+ localhost = [" Flask" ]
30+ all = [" pyrealsense2" , " sounddevice" , " Flask" ]
31+
32+ [build-system ]
33+ requires = [" poetry>=0.12" ]
34+ build-backend = " poetry.masonry.api"
Original file line number Diff line number Diff line change @@ -185,9 +185,13 @@ def test(
185185 output_folder = recorder (seconds = 5 )
186186
187187
188- if __name__ == '__main__' :
188+ def main () :
189189 # Launch the command line application
190190 try :
191- app ()
191+ app (prog_name = 'recorder' )
192192 except RuntimeError as e :
193- typer .secho (str (e ), fg = 'red' )
193+ typer .secho (str (e ), fg = 'red' )
194+
195+
196+ if __name__ == '__main__' :
197+ main ()
Original file line number Diff line number Diff line change 33
44from typing import List
55from pathlib import Path
6- from datetime import datetime
76
8- DEFAULT_CONFIG_PATH = Path .cwd () / 'vao -recorder.yaml'
7+ DEFAULT_CONFIG_PATH = Path .cwd () / 'python -recorder.yaml'
98
10- DEFAULT_OUTPUT_FOLDER = Path .cwd () / 'output '
9+ DEFAULT_OUTPUT_FOLDER = Path .cwd () / 'recordings '
1110
1211
1312class Config (dict ):
Original file line number Diff line number Diff line change 11from .device import Device
2- from .microphone import Microphone
3- from .realsense import RealSense
2+ try :
3+ from .microphone import Microphone
4+ except ImportError as e :
5+ class Microphone :
6+ def __init__ (self , * args , ** kwargs ) -> None :
7+ raise e
8+ try :
9+ from .realsense import RealSense
10+ except ImportError as e :
11+ class RealSense :
12+ def __init__ (self , * args , ** kwargs ) -> None :
13+ raise e
414
515DEVICE_CLASSES = {repr (cls ): cls for cls in Device .__subclasses__ ()}
Original file line number Diff line number Diff line change 22
33from typing import Dict
44from pathlib import Path
5- from warnings import warn
65from datetime import datetime
76from abc import ABC , ABCMeta , abstractmethod
87
You can’t perform that action at this time.
0 commit comments