Re-organize in new dir structure

This commit is contained in:
dewagter
2015-01-12 20:47:19 +01:00
parent c84c5708e5
commit 4a8105fc84
10 changed files with 56 additions and 49 deletions
+51
View File
@@ -0,0 +1,51 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="cv_opticflow" dir="computer_vision">
<doc>
<description>Video ARDone 2</description>
<define name="DOWNLINK_VIDEO" value="FALSE" description="Also stream video: warning: this makes the optic flow slow: DEBUGGING only" />
</doc>
<settings>
<dl_settings>
<dl_settings name="video">
<dl_setting var="viewvideo_shot" min="0" step="1" max="1" shortname="save_shot" module="computer_vision/opticflow_module" handler="SaveShot"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="opticflow_module.h"/>
</header>
<init fun="opticflow_module_init()"/>
<periodic fun="opticflow_module_run()" freq="60" start="opticflow_module_start()" stop="opticflow_module_stop()" autorun="TRUE"/>
<makefile target="ap">
<define name="ARDRONE_VIDEO_PORT" value="2002" />
<define name="USE_ARDRONE_VIDEO" />
<file name="opticflow_module.c"/>
<file name="opticflow_code.c" dir="modules/computer_vision/opticflow"/>
<file name="hover_stabilization.c" dir="modules/computer_vision/opticflow"/>
<file name="optic_flow_ardrone.c" dir="modules/computer_vision/cv/opticflow"/>
<file name="fastRosten.c" dir="modules/computer_vision/cv/opticflow/fast9"/>
<file name="trig.c" dir="modules/computer_vision/cv"/>
<file name="jpeg.c" dir="modules/computer_vision/cv/encoding"/>
<file name="rtp.c" dir="modules/computer_vision/cv/encoding"/>
<file name="socket.c" dir="modules/computer_vision/lib/udp"/>
<file name="video.c" dir="modules/computer_vision/lib/v4l"/>
<define name="modules/computer_vision/cv" type="include"/>
<define name="modules/computer_vision/lib" type="include"/>
<define name="pthread" type="raw"/>
<define name="__USE_GNU"/>
<flag name="LDFLAGS" value="pthread"/>
<flag name="LDFLAGS" value="lrt"/>
<flag name="LDFLAGS" value="static"/>
</makefile>
<makefile target="nps">
<file name="viewvideo_nps.c"/>
</makefile>
</module>
@@ -1,44 +0,0 @@
<!DOCTYPE module SYSTEM "../module.dtd">
<module name="OpticFlow">
<doc>
<description>Video ARDone 2</description>
</doc>
<header>
<file name="opticflow_module.h"/>
</header>
<init fun="opticflow_module_init()"/>
<periodic fun="opticflow_module_run()" freq="60" start="opticflow_module_start()" stop="opticflow_module_stop()" autorun="TRUE"/>
<makefile>
<define name="ARDRONE_VIDEO_PORT" value="2002" />
<define name="USE_ARDRONE_VIDEO" />
<raw>
include $(PAPARAZZI_HOME)/sw/ext/ardrone2_vision/Makefile.paths
VISION_MODULE_FOLDER = $(DIR_MODULES)/OpticFlow
$(TARGET).CFLAGS += -I$(DIR_MODULES) -I$(DIR_CV) -I$(DIR_LIB) -pthread -D__USE_GNU
$(TARGET).CXXFLAGS += -I$(PAPARAZZI_HOME)/sw/include/ -I$(PAPARAZZI_SRC)/sw/airborne -I$(PAPARAZZI_SRC)/conf/autopilot -I$(PAPARAZZI_SRC)/sw/airborne/arch/$($(TARGET).ARCHDIR) -I$(VARINCLUDE) -I$(ACINCLUDE) -I$(PAPARAZZI_SRC)/sw/airborne/modules/
$(TARGET).CXXFLAGS += -I$(DIR_MODULES) -I$(DIR_CV) -I$(DIR_LIB) -pthread -D__USE_GNU
$(TARGET).srcs += $(VISION_MODULE_FOLDER)/opticflow_module.c
$(TARGET).srcs += $(VISION_MODULE_FOLDER)/opticflow_code.c
$(TARGET).srcs += $(VISION_MODULE_FOLDER)/hover_stabilization.c
$(TARGET).srcs += $(DIR_CV)/opticflow/optic_flow_ardrone.c
$(TARGET).srcs += $(DIR_CV)/opticflow/fast9/fastRosten.c
$(TARGET).srcs += $(DIR_CV)/encoding/jpeg.c
$(TARGET).srcs += $(DIR_CV)/encoding/rtp.c
$(TARGET).srcs += $(DIR_CV)/trig.c
$(TARGET).srcs += $(DIR_LIB)/udp/socket.c
$(TARGET).srcs += $(DIR_LIB)/v4l/video.c
$(TARGET).CFLAGS += -I$(DIR_MODULES) -I$(DIR_CV) -I$(DIR_LIB) -pthread
$(TARGET).LDFLAGS += -pthread -lrt -static
</raw>
</makefile>
</module>
@@ -33,9 +33,9 @@
#include "opticflow_code.h" #include "opticflow_code.h"
// Computer Vision // Computer Vision
#include "opticflow/optic_flow_gdc.h" #include "opticflow/optic_flow_ardrone.h"
#include "opticflow/fast9/fastRosten.h" #include "opticflow/fast9/fastRosten.h"
#include "opticflow_module.h" #include "../opticflow_module.h"
// Paparazzi Data // Paparazzi Data
#include "subsystems/ins/ins_int.h" #include "subsystems/ins/ins_int.h"
@@ -301,7 +301,7 @@ void my_plugin_run(unsigned char *frame)
// Velocity Computation // Velocity Computation
#ifdef USE_SONAR #ifdef USE_SONAR
cam_h = ins_impl.sonar_z; cam_h = 1; //ins_impl.sonar_z;
#else #else
cam_h = 1; cam_h = 1;
#endif #endif
@@ -31,7 +31,7 @@
#include "opticflow_module.h" #include "opticflow_module.h"
// Navigate Based On Vision // Navigate Based On Vision
#include "hover_stabilization.h" #include "opticflow/hover_stabilization.h"
// Paparazzi // Paparazzi
#include "state.h" // for attitude #include "state.h" // for attitude
@@ -105,7 +105,7 @@ void opticflow_module_run(void)
#include "resize.h" #include "resize.h"
// Payload Code // Payload Code
#include "opticflow_code.h" #include "opticflow/opticflow_code.h"
// Downlink Video // Downlink Video
//#define DOWNLINK_VIDEO 1 //#define DOWNLINK_VIDEO 1