-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfast_app.py
34 lines (26 loc) · 1.05 KB
/
fast_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import sys
import os
pckg_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..'))
sys.path.append(pckg_dir)
import logging
from .Gesture import Gesture
from ..utils import ToolFastApp, load_yaml, log_config
if __name__ == '__main__':
log_config()
logging.info("Starting the T11_Gesture process...")
# Load the configuration parameters from the config file
params = load_yaml("Tools/parameters.yaml")
nao_ip = params["nao_ip"]
params = params["T11_Gesture"]
# Initialize the Leds object
gesture = Gesture(
nao_ip = nao_ip,
)
logging.info("T11_Gesture object initialized successfully.")
T11_fast_app = ToolFastApp(
command_dict = {"start": gesture.start, "stop": gesture.stop, "hi": gesture.say_hi, "bye": gesture.say_bye, "sit": gesture.sit},
get_status_function = gesture.get_running,
status_file = "Tools/T11_Gesture/fast_com/status.txt",
command_file = "Tools/T11_Gesture/fast_com/command.txt"
)
T11_fast_app.run()