Skip to content

Commit cd3f0fd

Browse files
committed
Initial commit of the Brown's AR.Drone ROS Node
0 parents  commit cd3f0fd

File tree

853 files changed

+66422
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

853 files changed

+66422
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.svn

ARDroneLib/Soft/Build/Makefile

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
GEN_CUSTOM_HEADER:=../Common/generated_custom.h
3+
4+
include custom.makefile
5+
include config.makefile
6+
7+
GNUTOOLS_PATH=/usr/local/$(GNUTOOLS_VERSION)/bin
8+
ifeq ("$(QUIET_BUILD)","yes")
9+
MAKE:=@PATH=$(GNUTOOLS_PATH):$(PATH) make -s
10+
else
11+
MAKE:=PATH=$(GNUTOOLS_PATH):$(PATH) make
12+
endif
13+
14+
define ADD_RULE_TEMPLATE
15+
TO_BUILD+=build_$(1)
16+
endef
17+
18+
# Add rule for each target
19+
$(foreach target,$(TARGETS),$(eval $(call ADD_RULE_TEMPLATE,$(target))))
20+
21+
.PHONY: linux_sample svn_update $(TO_BUILD) build_libs $(MAKECMDGOALS)
22+
23+
all: $(GEN_CUSTOM_HEADER) build_libs $(TO_BUILD)
24+
25+
$(GEN_CUSTOM_HEADER): custom.makefile
26+
@echo "#ifndef _GENERATED_CUSTOM_CONFIGURATION_H_" > $@
27+
@echo "#define _GENERATED_CUSTOM_CONFIGURATION_H_" >> $@
28+
@echo >> $@
29+
@echo "#if defined(BR2_PACKAGE_BCM4318_AP)" >> $@
30+
@echo "# define AP" >> $@
31+
@echo "#else" >> $@
32+
@echo "# define STA" >> $@
33+
@echo "#endif" >> $@
34+
@echo "#define CURRENT_NUM_VERSION_SOFT \"$(MAJOR_VERSION).$(MINOR_VERSION).$(MODIF_VERSION)\"" >> $@
35+
@echo "#define CURRENT_BUILD_DATE \"$(shell date +%F\ %H:%M)\"" >> $@
36+
@echo >> $@
37+
ifeq ("$(VIDEO_YUV)","yes")
38+
@echo "#define USE_VIDEO_YUV" >> $@
39+
endif
40+
ifeq ("$(RECORD_VISION_DATA)","yes")
41+
@echo "#define RECORD_VISION_DATA" >> $@
42+
endif
43+
@echo >> $@
44+
@echo "#define WIFI_NETWORK_NAME \"$(WIFI_NETWORK_NAME)\"" >> $@
45+
@echo "#define WIFI_BROADCAST \"$(WIFI_BROADCAST)\"" >> $@
46+
@echo "#define WIFI_ARDRONE_IP \"$(WIFI_ARDRONE_IP)\"" >> $@
47+
@echo >> $@
48+
@echo "#if defined(__linux__) || defined(USE_MINGW32)" >> $@
49+
@echo "# define WIFI_MOBILE_IP \"$(WIFI_MOBILE_IP)\"" >> $@
50+
@echo "# define WIRED_ITFNAME \"$(WIRED_ITFNAME)\"" >> $@
51+
@echo "#endif // ! __linux__" >> $@
52+
@echo >> $@
53+
@echo >> $@
54+
@echo "#endif // ! _GENERATED_CUSTOM_CONFIGURATION_H_" >> $@
55+
56+
ifneq "$(MAKECMDGOALS)" ""
57+
ifneq "$(MAKECMDGOALS)" "clean"
58+
ifneq "$(MAKECMDGOALS)" "update"
59+
$(MAKECMDGOALS):
60+
@echo -e "\nCannot make what you ask me to do :-("
61+
else
62+
$(MAKECMDGOALS): svn_update
63+
endif
64+
endif
65+
endif
66+
67+
$(MAKECMDGOALS): build_libs $(TO_BUILD)
68+
69+
define GENERIC_RULES_TEMPLATE
70+
build_$(1):
71+
@$(MAKE) -C $(1) $(MAKECMDGOALS)
72+
endef
73+
74+
$(foreach target,$(TARGETS),$(eval $(call GENERIC_RULES_TEMPLATE,$(target))))
75+
76+
build_libs:
77+
@$(MAKE) PC_TARGET=yes USE_ARDRONE_TOOL=yes TARGET=pc_ USE_MINGW32=no -C ../Lib/Build $(MAKECMDGOALS)
78+
79+
ifeq ("$(MINGW32_MODE)","yes")
80+
ifeq ($(shell which i586-mingw32msvc-gcc 2> /dev/null),)
81+
$(warning You need MinGW32 to compile My Ardrone lib for Windows if you want. (under Debian: apt-get install mingw32))
82+
else
83+
# @$(MAKE) PC_TARGET=yes TARGET=mingw32_ USE_MINGW32=yes TMP_SDK_FLAGS="USE_MINGW32=yes NO_COM=yes USE_BLUEZ=no" -C ../Lib/Build $(MAKECMDGOALS)
84+
# @$(MAKE) PC_TARGET=yes TARGET=emb_mingw32_ USE_MINGW32=yes CONTROL_DLL=yes TMP_SDK_FLAGS="USE_MINGW32=yes NO_COM=yes USE_BLUEZ=no" -C ../Lib/Build $(MAKECMDGOALS)
85+
endif
86+
endif
87+
ifeq ($(WIIMOTE_SUPPORT),yes)
88+
# @$(MAKE) PC_TARGET=yes TARGET=pc_ TMP_SDK_FLAGS="USE_BLUEZ=yes" -C ../Lib/libcwiid $(MAKECMDGOALS)
89+
endif
90+
91+
define svn_update_template
92+
cd ../.. ; \
93+
echo "Checking out tag $(1) of $(2) ..." ; \
94+
if [ $(1) != head ] ; then \
95+
svn co -r $(1) https://svn.ardrone.org/repo/ARDrone_API/$(2) ; \
96+
else \
97+
svn co https://svn.ardrone.org/repo/ARDrone_API/$(2) ; \
98+
fi ; \
99+
cd Soft/Build ;
100+
endef
101+
102+
svn_update:
103+
@-$(call svn_update_template,$(SDK_VERSION),ARDroneLib)
104+

ARDroneLib/Soft/Build/config.makefile

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
2+
#########################################################
3+
# Common build definitions (CUSTOM)
4+
#########################################################
5+
6+
RELEASE_BUILD = yes
7+
QUIET_BUILD = yes
8+
9+
#########################################################
10+
# System utility definitions (STATIC)
11+
#########################################################
12+
define CHECK_UNDEFINITION
13+
ifdef $(1)
14+
$$(warning ERROR : $(1) defined $(2))
15+
ERROR=1
16+
endif
17+
endef
18+
19+
define EXIT_IF_ERROR
20+
ifeq "$$(ERROR)" "1"
21+
$$(error There has been some errors)
22+
endif
23+
endef
24+
25+
26+
#########################################################
27+
# Validity control (STATIC)
28+
#########################################################
29+
30+
ifdef PC_TARGET
31+
$(eval $(call CHECK_UNDEFINITION,CONSOLE_TARGET,(should not be defined when PC_TARGET is defined)))
32+
endif
33+
34+
$(eval $(call EXIT_IF_ERROR))
35+
36+
37+
#########################################################
38+
# Common definitions (STATIC)
39+
#########################################################
40+
41+
ifeq "$(QUIET_BUILD)" "yes"
42+
MAKE=@make -s
43+
else
44+
MAKE=make
45+
endif
46+
47+
COMMON_DIR:=../Common
48+
49+
SDK_FLAGS:="NO_EXAMPLES=yes"
50+
SDK_FLAGS+="USE_SDK=yes"
51+
SDK_FLAGS+="QUIET_BUILD=$(QUIET_BUILD)"
52+
SDK_FLAGS+="RELEASE_BUILD=$(RELEASE_BUILD)"
53+
SDK_FLAGS+="SDK_VERSION=$(SDK_VERSION)"
54+
55+
ifeq ($(filter NO_COM=%,$(TMP_SDK_FLAGS)),)
56+
SDK_FLAGS+="NO_COM=no"
57+
endif
58+
59+
#########################################################
60+
# PC_TARGET specific definitions (STATIC)
61+
#########################################################
62+
ifdef PC_TARGET
63+
SDK_FLAGS+="NO_COM=no"
64+
65+
ifeq ($(ARDRONE_TARGET_OS),Linux)
66+
OS_DEFINE=GNU_LINUX
67+
else
68+
ifeq ($(ARDRONE_TARGET_OS),iphoneos)
69+
OS_DEFINE=GNU_LINUX
70+
else
71+
ifeq ($(ARDRONE_TARGET_OS),iphonesimulator)
72+
OS_DEFINE=GNU_LINUX
73+
else
74+
TARGET:=$(TARGET).exe
75+
OS_DEFINE=WINDOW
76+
endif
77+
endif
78+
endif
79+
80+
GENERIC_CFLAGS+=-D_MOBILE
81+
82+
ifeq ("$(PC_USE_TABLE_PILOTAGE)","yes")
83+
GENERIC_CFLAGS+=-DUSE_TABLE_PILOTAGE
84+
endif
85+
86+
ifeq ("$(RECORD_VIDEO)","yes")
87+
GENERIC_CFLAGS+=-DRECORD_VIDEO
88+
endif
89+
90+
GENERIC_CFLAGS+=-D$(OS_DEFINE)
91+
ifeq ($(IPHONE_MODE),yes)
92+
ifeq ($(ARDRONE_TARGET_OS),iphoneos)
93+
GENERIC_CFLAGS+=-DTARGET_OS_IPHONE
94+
else
95+
GENERIC_CFLAGS+=-DTARGET_IPHONE_SIMULATOR
96+
endif
97+
endif
98+
99+
ifneq ("$(USE_MINGW32)","yes")
100+
GENERIC_CFLAGS+=$(shell pkg-config --cflags gtk+-2.0)
101+
GENERIC_LIBS+=$(shell pkg-config --libs gtk+-2.0)
102+
endif
103+
104+
ifeq ("$(USE_LINUX)","yes")
105+
SDK_FLAGS+="USE_LINUX=yes"
106+
else
107+
SDK_FLAGS+="USE_LINUX=no"
108+
endif
109+
110+
SDK_FLAGS+="USE_ELINUX=no"
111+
112+
ifneq ($(findstring iphone,$(ARDRONE_TARGET_OS)),)
113+
SDK_FLAGS+="USE_IPHONE=yes"
114+
SDK_FLAGS+="IPHONE_PLATFORM=$(ARDRONE_TARGET_OS)"
115+
else
116+
SDK_FLAGS+="USE_IPHONE=no"
117+
endif
118+
SDK_FLAGS+="IPHONE_SDK_PATH=$(IPHONE_SDK_PATH)"
119+
120+
ifeq ("$(USE_NDS)","yes")
121+
SDK_FLAGS+="USE_NDS=yes"
122+
SDK_FLAGS+="NDS_CPU=ARM7"
123+
else
124+
SDK_FLAGS+="USE_NDS=no"
125+
endif
126+
127+
ifeq ("$(USE_ANDROID)","yes")
128+
SDK_FLAGS+="USE_ANDROID=yes"
129+
SDK_FLAGS+="TOOLCHAIN_VERSION=arm-eabi-4.4.0"
130+
SDK_FLAGS+="NDK_PLATFORM_VERSION=android-5"
131+
else
132+
SDK_FLAGS+="USE_ANDROID=no"
133+
endif
134+
135+
ifeq ($(filter USE_BLUEZ=%,$(TMP_SDK_FLAGS)),)
136+
SDK_FLAGS+="USE_BLUEZ=no"
137+
endif
138+
139+
SDK_FLAGS+="USE_VLIB=yes"
140+
SDK_FLAGS+="USE_BONJOUR=no"
141+
SDK_FLAGS+="USE_WIFI=yes"
142+
143+
SDK_FLAGS+="USE_BROADCOM=no"
144+
SDK_FLAGS+="USE_IWLIB=no"
145+
146+
SDK_FLAGS+="FF_ARCH=Intel"
147+
148+
SDK_FLAGS+="USE_PARROTOS_CORE=no"
149+
SDK_FLAGS+="USE_PARROTOS_DRIVERS=no"
150+
SDK_FLAGS+="USE_PARROTOS_DEVS=no"
151+
SDK_FLAGS+="USE_PARROTOS_CODEC=no"
152+
153+
154+
SDK_FLAGS+="USE_ARDRONELIB=yes"
155+
SDK_FLAGS+="USE_ARDRONE_VISION=yes"
156+
SDK_FLAGS+="USE_ARDRONE_POLARIS=no"
157+
SDK_FLAGS+="USE_ARDRONE_TEST_BENCHS=no"
158+
SDK_FLAGS+="USE_ARDRONE_CALIBRATION=no"
159+
160+
endif
161+

ARDroneLib/Soft/Build/custom.makefile

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#########################################################
2+
# Common definitions (CUSTOM)
3+
#########################################################
4+
IPHONE_MODE = no
5+
MINGW32_MODE = no
6+
USE_NDS = no
7+
USE_ANDROID = no
8+
USE_LINUX = yes
9+
MAJOR_VERSION = 0
10+
MINOR_VERSION = 0
11+
MODIF_VERSION = 0
12+
13+
#########################################################
14+
# ARDroneTool options definitions
15+
#########################################################
16+
USE_ARDRONE_MAINLOOP=yes
17+
USE_CHECK_WIFI_CONFIG=no
18+
19+
ifeq ($(IPHONE_MODE),yes)
20+
USE_ARDRONE_MAINLOOP=no
21+
IPHONE_SDK_PATH=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0
22+
# iphoneos or iphonesimulator
23+
ARDRONE_TARGET_OS=iphoneos
24+
else
25+
ifeq ($(USE_ANDROID),yes)
26+
USE_ARDRONE_MAINLOOP=no
27+
endif
28+
ARDRONE_TARGET_OS=Linux
29+
endif
30+
31+
################## Wifi Options ##################
32+
# Name of the network you want to join or create
33+
WIFI_NETWORK_NAME = "ardronenetwork"
34+
WIFI_BROADCAST = "192.168.1.255"
35+
36+
################## Video Options ##################
37+
# Tells if we want to record video on pc side
38+
RECORD_VIDEO = no
39+
# Tells if we want to add vision data to video stream (in raw mode)
40+
# Vision data are saved into file only if we define RECORD_VIDEO too
41+
RECORD_VISION_DATA = no
42+
# If the yuv mode is choosen then video is displayed & recorded in color
43+
# Otherwise only luminances are displayed & recorded
44+
VIDEO_YUV = yes
45+
46+
#########################################################
47+
# Embedded definitions (CUSTOM)
48+
#########################################################
49+
WIFI_ARDRONE_IP = "192.168.1.1"
50+
51+
#########################################################
52+
# Linux definitions (CUSTOM)
53+
#########################################################
54+
WIFI_MOBILE_IP = "192.168.1.2"
55+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
filter.o ../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_vlib_Linux_2.6.32-21-generic_GNU_Linux_gcc_4.4.3/Maths/filter.c.d: ../..//Soft/Lib/Maths/filter.c ../..//Soft/Lib/Maths/maths.h \
2+
../VP_Os/vp_os_types.h ../VP_Os/vp_os.h ../VP_Os/vp_os_rtmon.h \
3+
..//VP_Os/linux/vp_os_serial.h /usr/include/termios.h \
4+
/usr/include/features.h /usr/include/bits/predefs.h \
5+
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
6+
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
7+
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
8+
/usr/include/bits/termios.h /usr/include/sys/ttydefaults.h \
9+
/usr/include/stdint.h /usr/include/bits/wchar.h \
10+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stddef.h \
11+
../VP_Os/linux/intrin.h /usr/include/math.h /usr/include/bits/huge_val.h \
12+
/usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
13+
/usr/include/bits/inf.h /usr/include/bits/nan.h \
14+
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
15+
/usr/include/bits/mathinline.h \
16+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/float.h \
17+
../..//Soft/Lib/Maths/filter.h
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
maths.o ../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_vlib_Linux_2.6.32-21-generic_GNU_Linux_gcc_4.4.3/Maths/maths.c.d: ../..//Soft/Lib/Maths/maths.c ../..//Soft/Lib/Maths/maths.h \
2+
../VP_Os/vp_os_types.h ../VP_Os/vp_os.h ../VP_Os/vp_os_rtmon.h \
3+
..//VP_Os/linux/vp_os_serial.h /usr/include/termios.h \
4+
/usr/include/features.h /usr/include/bits/predefs.h \
5+
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
6+
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
7+
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
8+
/usr/include/bits/termios.h /usr/include/sys/ttydefaults.h \
9+
/usr/include/stdint.h /usr/include/bits/wchar.h \
10+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stddef.h \
11+
../VP_Os/linux/intrin.h /usr/include/math.h /usr/include/bits/huge_val.h \
12+
/usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
13+
/usr/include/bits/inf.h /usr/include/bits/nan.h \
14+
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
15+
/usr/include/bits/mathinline.h \
16+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/float.h
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
matrices.o ../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_vlib_Linux_2.6.32-21-generic_GNU_Linux_gcc_4.4.3/Maths/matrices.c.d: ../..//Soft/Lib/Maths/matrices.c ../VP_Os/vp_os_assert.h \
2+
/usr/include/assert.h /usr/include/features.h \
3+
/usr/include/bits/predefs.h /usr/include/sys/cdefs.h \
4+
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
5+
/usr/include/gnu/stubs-64.h ../..//Soft/Lib/Maths/matrices.h \
6+
../VP_Os/vp_os_types.h ../VP_Os/vp_os.h ../VP_Os/vp_os_rtmon.h \
7+
..//VP_Os/linux/vp_os_serial.h /usr/include/termios.h \
8+
/usr/include/bits/termios.h /usr/include/sys/ttydefaults.h \
9+
/usr/include/stdint.h /usr/include/bits/wchar.h \
10+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stddef.h \
11+
../VP_Os/linux/intrin.h ../..//Soft/Lib/Maths/maths.h \
12+
/usr/include/math.h /usr/include/bits/huge_val.h \
13+
/usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
14+
/usr/include/bits/inf.h /usr/include/bits/nan.h \
15+
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
16+
/usr/include/bits/mathinline.h \
17+
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/float.h

0 commit comments

Comments
 (0)