-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
147 lines (95 loc) · 5.76 KB
/
Makefile
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
rapyuta_ws := rapyuta_ws
scuderia := scuderia.yaml
machines := $(rapyuta_ws)/src/rapyuta/machines
all: $(machines)
$(machines): $(scuderia)
python setup/create-machines-file.py $(scuderia) > $(machines)
fix-time:
echo "Calling ntpdate to fix time"
sudo ntpdate -u us.pool.ntp.org
fix-time2:
sudo ntpdate -s time.nist.gov
clean-pyc:
find rapyuta_ws/src/ -name '*.pyc' | xargs rm
catkin-clean: clean-pyc
rm -rf $(rapyuta_ws)/build
build-parallel:
catkin_make -C $(rapyuta_ws) --make-args "-j4"
build:
catkin_make -C $(rapyuta_ws)
# Unit tests
# Teddy: make it so "make unittests" runs all unit tests
unittests-environment: $(machines)
bash -c "source environment.sh; source set_vehicle_name.sh; python setup/sanity_checks"
unittests:
$(MAKE) unittests-environment
bash -c "source environment.sh; catkin_make -C $(rapyuta_ws) run_tests; catkin_test_results $(rapyuta_ws)/build/test_results/"
unittests-anti_instagram:
$(MAKE) unittests-environment
bash -c "source environment.sh; rosrun anti_instagram annotation_tests.py"
# HW testing
test-camera:
echo "Testing Camera HW by taking a picture (smile!)."
raspistill -t 1000 -o test-camera.jpg
test-led:
echo "Calibration blinking pattern"
bash -c "source environment.sh; rosrun rgb_led blink test_all_1"
test-turn-right:
echo "Calibrating right turn"
bash -c "rostest indefinite_navigation calibrate_turn.test veh:=$(vehicle_name) type:=right"
test-turn-left:
echo "Calibrating left turn"
bash -c "rostest indefinite_navigation calibrate_turn.test veh:=$(vehicle_name) type:=left"
test-turn-forward:
echo "Calibrating forward turn"
bash -c "rostest indefinite_navigation calibrate_turn.test veh:=$(vehicle_name) type:=forward"
# Basic demos
vehicle_name=$(shell hostname)
demo-joystick: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown joystick.launch veh:=$(vehicle_name)"
demo-joystick-high-speed: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown joystick.launch veh:=$(vehicle_name) joy_mapper_param_file_name:=high_speed "
demo-joystick-camera: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown joystick_camera.launch veh:=$(vehicle_name)"
demo-joystick-camera-high-speed: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown joystick_camera.launch veh:=$(vehicle_name) joy_mapper_param_file_name:=high_speed "
demo-line_detector: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown line_detector.launch veh:=$(vehicle_name)"
demo-joystick-perception: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos master.launch fsm_file_name:=joystick"
demo-lane_following-%: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos lane_following.launch line_detector_param_file_name:=$*"
demo-led-fancy1: unittests-environment
bash -c "source environment.sh; rosrun rgb_led fancy1"
demo-led-fancy2: unittests-environment
bash -c "source environment.sh; rosrun rgb_led fancy2"
demo-led-blink-%: unittests-environment
bash -c "source environment.sh; rosrun rgb_led blink $*"
demo-line_detector-default: demo-line_detector-quiet-default
demo-line_detector-guy: demo-line_detector-quiet-guy
demo-line_detector-universal: demo-line_detector-quiet-universal
demo-line_detector-default_ld2: demo-line_detector-quiet-default_ld2
demo-line_detector-quiet-%: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; roslaunch duckietown line_detector.launch veh:=$(vehicle_name) line_detector_param_file_name:=$* verbose:=false"
# ==========
# openhouse demos
openhouse-dp1: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos parallel_autonomy.launch"
openhouse-dp1-%: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos parallel_autonomy.launch line_detector_param_file_name:=$*"
openhouse-dp2: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos obstacle_vehicle_avoid.launch"
openhouse-dp2-%: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos obstacle_vehicle_avoid.launch line_detector_param_file_name:=$*"
openhouse-dp2-vehicle: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos vehicle_avoid.launch"
openhouse-dp2-obstacle: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos obstacle_avoid.launch"
openhouse-dp2-vehicle-no-wheels: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos vehicle_avoid_nowheels.launch"
openhouse-dp2-obstacle-no-wheels: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos obstacle_avoid_nowheels.launch"
openhouse-dp3: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos indefinite_navigation.launch"
openhouse-dp3-%: unittests-environment
bash -c "source environment.sh; source set_ros_master.sh; source set_vehicle_name.sh; roslaunch duckietown_demos indefinite_navigation.launch line_detector_param_file_name:=$*"