wu_xinjun
2022-03-22 fee0c7c1872b32141612ad0b3730b865e7e4dace
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
 
@REM change to the filepath
cd %~dp0
echo change to path: %cd%
 
set aerialpython=%cd%/env/aerial_deploy/python.exe
set envsetting=%cd%/env/SettingEnv.bat
 
@REM Setting the env
if not exist %aerialpython% (
    call %envsetting% 
)
 
@REM pre-defined parameters
set port=COM11
set speed=200
set degree_step=5
set time_delay=5
set alpha=0
set beta=20
set gamma=auto
set microwaveHost=192.168.2.65
set udp_packets=1000
set deviceName=testDevice
set saveFolder=./data/run_test/
 
@REM re-defined parameters
set /p port=Please input the serial port of rotation machine (example: COM11):
set /P speed=Please input the speed of rotation machine (example: 200):
@REM set /P degree_step=Please input the degree step of rotation machine (example: 5):
set /P time_delay=Please input the delay time of rotation machine (example: 5):
set /P alpha=Please input the alpha degree of microwave device (example: 0/-20/auto):
set /P beta=Please input the beta degree of microwave device (example: 0/-20/auto):
set /P gamma=Please input the gamma degree of microwave device (example: 0/-20/auto):
@REM set /p udp_packets=Please input the udp packets num (example: 1000):
set /p saveFolder=Please input the folder to save the data (example: ./data/run_test/):
 
set PLYfile=%saveFolder%/data.ply
 
@REM verify the parameters
echo    ################# parameters #################
echo    port                    :%port%
echo    speed                   :%speed%
echo    degree_step             :%degree_step%
echo    time_delay              :%time_delay%
echo    alpha                   :%alpha%
echo    beta                    :%beta%
echo    gamma                   :%gamma%
echo    microwaveHost           :%microwaveHost%
echo    udp_packets             :%udp_packets%
echo    deviceName              :%deviceName%
echo    saveFolder              :%saveFolder%
echo    PLYfile                 :%PLYfile%
 
set /p choice=Please verify the parameters and choice [y/n]:
 
cd %~dp0
echo change to path: %cd%
 
if %choice% == y (
    %aerialpython% ./src/auto_slam.py %port% %speed% %degree_step% %time_delay% %alpha% %beta% %gamma% %microwaveHost% %udp_packets% %deviceName% %saveFolder%
    @REM -------------- Usage: plot_ply.py [PLYfile]"
    %aerialpython% ./src/utils/plot_ply.py %PLYfile%
) else (
    exit
)