Skip to content

Commit

Permalink
Updated codebase to the latest OpenNI / Sensor version (1.3.2.1 / 5.0…
Browse files Browse the repository at this point in the history
….3.3)
  • Loading branch information
avin2 committed Jul 14, 2011
1 parent 28738dc commit 98a8df3
Show file tree
Hide file tree
Showing 49 changed files with 1,249 additions and 688 deletions.
23 changes: 21 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
Detailed Change log:
--------------------

Version 5.0.1.32 (Unstable version - Apr 11th 2010)
Version 5.0.3.3 (Stable version - Jul 5th 2011)
-----------------------------------------------
* Linux: Allow installation to a different directory (for cross-compilation mainly).
* Workaround firmware bug: if no depth, IR timestamps are corrupt. Use host clock for timestamps instead.
* Bug Fix: unregistering USB event callback when destroying sensor to prevent crash when unplugging device.
* XnExportedSensorDevice now only enumerates devices that weren't created in the context yet.

Version 5.0.2.3 (Stable version - May 3rd 2011)
-----------------------------------------------
* Fixed use of deprecated CreateProductionTree().
* Bug Fix: playing XNS files in applications using deprecated API might cause memory leaks.
* Bug Fix: serial number was in hex format instead of decimal one.
* Make sure SensorV2 nodes will only use SensorV2 device (up to now they only checked it's a PrimeSense device).

Version 5.0.1.33 (Unstable version - Apr 18th 2011)
---------------------------------------------------
* CE4100: adding support in makefiles, redist and install.
* CE4100: default is now BULK with compressed formats.

Version 5.0.1.32 (Unstable version - Apr 11th 2011)
---------------------------------------------------
* Fixing log prints of resolutions (-1 appeared as MAX_UINT64...) to the resolution name.
* Linux Bug Fix: Server creates two log files, one in the client folder and one in /var/log/primesense/XnSensorServer
* Fixed a memory leak when rewinding old XNS files.
* Win32: WIX installer (replacing NSIS)
* Fixed wrong version in XnDeviceFile

Version 5.0.1.31 (Stable version - Apr 11th 2010)
Version 5.0.1.31 (Stable version - Apr 11th 2011)
-------------------------------------------------
* Fix BULK timeout - it was too small...
* Bug Fix: IR only works in QVGA...
Expand Down
6 changes: 1 addition & 5 deletions Include/XnCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
*****************************************************************************/






#ifndef __XN_COMMON_H__
#define __XN_COMMON_H__

Expand Down Expand Up @@ -59,4 +55,4 @@ typedef enum XnPrimeSenseErrorModules
#define XN_PS_STATUS_MESSAGE_MAP_END(module) \
XN_STATUS_MESSAGE_MAP_END_FROM(XN_ERROR_GROUP_PRIMESENSE, module)

#endif // __XN_COMMON_H__
#endif // __XN_COMMON_H__
4 changes: 2 additions & 2 deletions Include/XnPsVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
/** Xiron minor version. */
#define XN_PS_MINOR_VERSION 0
/** Xiron maintenance version. */
#define XN_PS_MAINTENANCE_VERSION 1
#define XN_PS_MAINTENANCE_VERSION 3
/** Xiron build version. */
#define XN_PS_BUILD_VERSION 32
#define XN_PS_BUILD_VERSION 3

/** Xiron version (in brief string format): "Major.Minor.Maintenance (Build)" */
#define XN_PS_BRIEF_VERSION_STRING \
Expand Down
16 changes: 9 additions & 7 deletions OpenNI/Data/SamplesConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
</Dumps>
</Log>
<ProductionNodes>
<!-- Normal Depth -->
<Node type="Depth" name="Depth1">
<Configuration>
<Mirror on="true"/>
</Configuration>
</Node>

<!-- Normal Image -->
<Node type="Image" name="Image1" stopOnError="false">
<Configuration>
Expand Down Expand Up @@ -49,13 +56,8 @@
<Mirror on="true"/>
</Configuration>
</Node>
-->

<Node type="Depth" name="Depth1">
<Configuration>
<Mirror on="true"/>
</Configuration>
</Node>
-->

<!--
<Node type="Audio" name="Audio1">
</Node>
Expand Down
55 changes: 55 additions & 0 deletions Platform/Linux-x86/Build/Common/CommonCSMakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# Output name under one of the following:
# NETLIB_NAME (.net module) or
# NETEXE_NAME (.net executable)
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# USED_LIBS - a list of libraries to link with
# CSFLAGS - [Optional] additional flags for mono compiler
# NET_WIN_FORMS - [Optional] when 1, application uses WinForms
#############################################################################

# take this file's dir
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))

include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak

# create -r option to mcs
USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(OUT_DIR)/$(lib).dll)

ifeq "$(NET_WIN_FORMS)" "1"
USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll
endif

ifeq "$(CFG)" "Release"
CSFLAGS += -o+
endif

# some lib / exe specifics
ifneq "$(NETLIB_NAME)" ""
OUTPUT_NAME = $(NETLIB_NAME).dll
TARGET = library
endif
ifneq "$(NETEXE_NAME)" ""
OUTPUT_NAME = $(NETEXE_NAME).exe
TARGET = winexe
endif

OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)

#############################################################################
# Targets
#############################################################################
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak

# Final output file
$(OUTPUT_FILE):
$(OUTPUT_COMMAND)

133 changes: 133 additions & 0 deletions Platform/Linux-x86/Build/Common/CommonCppMakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# Output name under one of the following:
# EXE_NAME (executable),
# LIB_NAME (dynamic library) or
# SLIB_NAME (static library) or
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_LIBS - a list of libraries to link with
# DEFINES - [Optional] additional preprocessor defines
# CFLAGS - [Optional] additional flags for the compiler
# LDFLAGS - [Optional] additional flags for the linker
# SSE_GENERATION - [Optional] The SSE generation to use (default is 3)
# TARGET_SYS_ROOT - [Optional] The path to the root of the target
#############################################################################

ifndef TARGET_SYS_ROOT
TARGET_SYS_ROOT = /
endif

# take this file's dir
COMMON_CPP_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))

include $(COMMON_CPP_MAKE_FILE_DIR)CommonDefs.mak

# define a function to figure .o file for each source file (placed under intermediate directory)
SRC_TO_OBJ = $(addprefix ./$(INT_DIR)/,$(addsuffix .o,$(notdir $(basename $1))))

# create a list of all object files
OBJ_FILES = $(call SRC_TO_OBJ,$(SRC_FILES_LIST))

# define a function to translate any source file to its dependency file (note that the way we create
# dep files, as a side affect of compilation, always puts the files in the INT_DIR with suffix .d)
SRC_TO_DEP = $(addprefix ./$(INT_DIR)/,$(addsuffix .d,$(notdir $(basename $1))))

# create a list of all dependency files
DEP_FILES = $(call SRC_TO_DEP,$(SRC_FILES_LIST))

# append the -I switch to each include directory
INC_DIRS_OPTION = $(foreach dir,$(INC_DIRS),-I$(dir))

# append the -L switch to each library directory
LIB_DIRS_OPTION = $(foreach dir,$(LIB_DIRS),-L$(dir)) -L$(OUT_DIR)

# append the -l switch to each library used
USED_LIBS_OPTION = $(foreach lib,$(USED_LIBS),-l$(lib))

# append the -D switch to each define
DEFINES_OPTION = $(foreach def,$(DEFINES),-D$(def))

# tell compiler to use the target system root
ifneq ("$(TARGET_SYS_ROOT)","/")
CFLAGS += --sysroot=$(TARGET_SYS_ROOT)
LDFLAGS += --sysroot=$(TARGET_SYS_ROOT)
endif

# set Debug / Release flags
ifeq "$(CFG)" "Debug"
CFLAGS += -g
endif
ifeq "$(CFG)" "Release"
CFLAGS += -O2 -DNDEBUG
CSFLAGS += -o+
endif

CFLAGS += $(INC_DIRS_OPTION) $(DEFINES_OPTION)
LDFLAGS += $(LIB_DIRS_OPTION) $(USED_LIBS_OPTION)

# some lib / exe specifics
ifneq "$(LIB_NAME)" ""
OUTPUT_NAME = lib$(LIB_NAME).so
CFLAGS += -fPIC -fvisibility=hidden
ifneq ("$(OSTYPE)","Darwin")
LDFLAGS += -Wl,--no-undefined
OUTPUT_NAME = lib$(LIB_NAME).so
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared
else
LDFLAGS += -undefined error
OUTPUT_NAME = lib$(LIB_NAME).dylib
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -dynamiclib -headerpad_max_install_names
endif
endif
ifneq "$(EXE_NAME)" ""
OUTPUT_NAME = $(EXE_NAME)
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS)
endif
ifneq "$(SLIB_NAME)" ""
OUTPUT_NAME = lib$(SLIB_NAME).a
OUTPUT_COMMAND = $(AR) $(OUTPUT_FILE) $(OBJ_FILES)
endif

define CREATE_SRC_TARGETS
# create a target for the object file (the CXX command creates both an .o file
# and a .d file)
ifneq ("$(OSTYPE)","Darwin")
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
$(CXX) -MD -MP -MT "$(call SRC_TO_DEP,$1) $$@" -c $(CFLAGS) -o $$@ $$<
else
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
$(CXX) -c $(CFLAGS) -o $$@ $$<
endif
endef

#############################################################################
# Targets
#############################################################################
.PHONY: clean-objs clean-defs

include $(COMMON_CPP_MAKE_FILE_DIR)CommonTargets.mak

# create targets for each source file
$(foreach src,$(SRC_FILES_LIST),$(eval $(call CREATE_SRC_TARGETS,$(src))))

# include all dependency files (we don't need them the first time, so we can use -include)
-include $(DEP_FILES)

$(OUTPUT_FILE): $(OBJ_FILES)
$(OUTPUT_COMMAND)

clean-objs:
rm -rf $(OBJ_FILES)

clean-defs:
rm -rf $(DEP_FILES)

clean: clean-objs clean-defs
25 changes: 25 additions & 0 deletions Platform/Linux-x86/Build/Common/CommonDefs.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# some defaults
ifndef CFG
CFG = Release
endif

# expand file list
SRC_FILES_LIST = $(wildcard $(SRC_FILES))

# define the intermediate directory
INT_DIR = $(CFG)

# define output directory
OUT_DIR = $(BIN_DIR)/$(CFG)

# full path to output file
OUTPUT_FILE = $(OUT_DIR)/$(OUTPUT_NAME)

# take this file's dir
COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST)))

# get the OS type
OSTYPE := $(shell uname -s)

# platform specific args
-include $(COMMON_MAK_DIR)Platform.$(PLATFORM)
79 changes: 79 additions & 0 deletions Platform/Linux-x86/Build/Common/CommonJavaMakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# JAR_NAME - name of the package
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_JARS - a list of libraries used
# MAIN_CLASS - [Optional] for executable jar
#############################################################################

# take this file's dir
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))

include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak

nullstring :=
space := $(nullstring) # end of the line

USED_JARS_OPTION =
ifneq "$(USED_JARS)" ""
USED_JARS_PATH = $(foreach jar, $(USED_JARS), $(OUT_DIR)/$(jar).jar /usr/share/java/$(jar).jar)
USED_JARS_OPTION = -cp $(subst $(space),:,$(strip $(USED_JARS_PATH)))
endif

OUTPUT_NAME = $(JAR_NAME).jar

# create manifest file if needed
JAR_MANIFEST_CREATE_COMMAND :=
MANIFEST_FILE :=
JAR_OPTIONS = -cf

ifneq (, $(if $(or $(MAIN_CLASS), $(USED_JARS)),1))
JAR_OPTIONS = -cfm
MANIFEST_FILE = Manifest.txt
JAR_MANIFEST_CREATE_COMMAND = (
ifneq (,$(MAIN_CLASS))
JAR_MANIFEST_CREATE_COMMAND += echo "Main-Class: $(MAIN_CLASS)";
endif
ifneq (,$(USED_JARS))
JAR_MANIFEST_CREATE_COMMAND += echo "Class-Path: $(USED_JARS_PATH)";
endif
JAR_MANIFEST_CREATE_COMMAND += ) > $(MANIFEST_FILE)
endif

CREATE_SHORTCUT =
ifneq (, $(MAIN_CLASS))
SHORTCUT = $(OUT_DIR)/$(JAR_NAME)
CREATE_SHORTCUT = echo java -jar $(OUTPUT_NAME) > $(SHORTCUT); chmod +x $(SHORTCUT)
endif

#############################################################################
# Targets
#############################################################################
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak

.PHONY: clean-manifest clean-int

# Final output file
$(OUTPUT_FILE): | $(INT_DIR)
javac $(USED_JARS_OPTION) -d $(INT_DIR) $(SRC_FILES)
$(JAR_MANIFEST_CREATE_COMMAND)
jar $(JAR_OPTIONS) $@ $(MANIFEST_FILE) -C $(INT_DIR) .
$(CREATE_SHORTCUT)

clean-manifest:
rm -rf $(MANIFEST_FILE)

clean-int:
rm -rf $(INT_DIR)

clean: clean-manifest clean-int


Loading

0 comments on commit 98a8df3

Please sign in to comment.