Skip to content

Commit 608308f

Browse files
committed
Updated codebase to the latest OpenNI / Sensor version (1.3.2.1 / 5.0.3.3)
1 parent 8f199ca commit 608308f

Some content is hidden

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

49 files changed

+1249
-688
lines changed

CHANGES

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
11
Detailed Change log:
22
--------------------
33

4-
Version 5.0.1.32 (Unstable version - Apr 11th 2010)
4+
Version 5.0.3.3 (Stable version - Jul 5th 2011)
5+
-----------------------------------------------
6+
* Linux: Allow installation to a different directory (for cross-compilation mainly).
7+
* Workaround firmware bug: if no depth, IR timestamps are corrupt. Use host clock for timestamps instead.
8+
* Bug Fix: unregistering USB event callback when destroying sensor to prevent crash when unplugging device.
9+
* XnExportedSensorDevice now only enumerates devices that weren't created in the context yet.
10+
11+
Version 5.0.2.3 (Stable version - May 3rd 2011)
12+
-----------------------------------------------
13+
* Fixed use of deprecated CreateProductionTree().
14+
* Bug Fix: playing XNS files in applications using deprecated API might cause memory leaks.
15+
* Bug Fix: serial number was in hex format instead of decimal one.
16+
* Make sure SensorV2 nodes will only use SensorV2 device (up to now they only checked it's a PrimeSense device).
17+
18+
Version 5.0.1.33 (Unstable version - Apr 18th 2011)
19+
---------------------------------------------------
20+
* CE4100: adding support in makefiles, redist and install.
21+
* CE4100: default is now BULK with compressed formats.
22+
23+
Version 5.0.1.32 (Unstable version - Apr 11th 2011)
524
---------------------------------------------------
625
* Fixing log prints of resolutions (-1 appeared as MAX_UINT64...) to the resolution name.
726
* Linux Bug Fix: Server creates two log files, one in the client folder and one in /var/log/primesense/XnSensorServer
827
* Fixed a memory leak when rewinding old XNS files.
928
* Win32: WIX installer (replacing NSIS)
1029
* Fixed wrong version in XnDeviceFile
1130

12-
Version 5.0.1.31 (Stable version - Apr 11th 2010)
31+
Version 5.0.1.31 (Stable version - Apr 11th 2011)
1332
-------------------------------------------------
1433
* Fix BULK timeout - it was too small...
1534
* Bug Fix: IR only works in QVGA...

Include/XnCommon.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
*****************************************************************************/
2222

2323

24-
25-
26-
27-
2824
#ifndef __XN_COMMON_H__
2925
#define __XN_COMMON_H__
3026

@@ -59,4 +55,4 @@ typedef enum XnPrimeSenseErrorModules
5955
#define XN_PS_STATUS_MESSAGE_MAP_END(module) \
6056
XN_STATUS_MESSAGE_MAP_END_FROM(XN_ERROR_GROUP_PRIMESENSE, module)
6157

62-
#endif // __XN_COMMON_H__
58+
#endif // __XN_COMMON_H__

Include/XnPsVersion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
/** Xiron minor version. */
4242
#define XN_PS_MINOR_VERSION 0
4343
/** Xiron maintenance version. */
44-
#define XN_PS_MAINTENANCE_VERSION 1
44+
#define XN_PS_MAINTENANCE_VERSION 3
4545
/** Xiron build version. */
46-
#define XN_PS_BUILD_VERSION 32
46+
#define XN_PS_BUILD_VERSION 3
4747

4848
/** Xiron version (in brief string format): "Major.Minor.Maintenance (Build)" */
4949
#define XN_PS_BRIEF_VERSION_STRING \

OpenNI/Data/SamplesConfig.xml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
</Dumps>
1515
</Log>
1616
<ProductionNodes>
17+
<!-- Normal Depth -->
18+
<Node type="Depth" name="Depth1">
19+
<Configuration>
20+
<Mirror on="true"/>
21+
</Configuration>
22+
</Node>
23+
1724
<!-- Normal Image -->
1825
<Node type="Image" name="Image1" stopOnError="false">
1926
<Configuration>
@@ -49,13 +56,8 @@
4956
<Mirror on="true"/>
5057
</Configuration>
5158
</Node>
52-
-->
53-
54-
<Node type="Depth" name="Depth1">
55-
<Configuration>
56-
<Mirror on="true"/>
57-
</Configuration>
58-
</Node>
59+
-->
60+
5961
<!--
6062
<Node type="Audio" name="Audio1">
6163
</Node>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#############################################################################
2+
# Primesense template makefile.
3+
# This file should not be made, but only included from other makefiles.
4+
# By default, this makefile compiles in release. To compile a debug version:
5+
# make CFG=Debug
6+
#
7+
# Project makefile should define the following BEFORE including this file:
8+
# SRC_FILES - a list of all source files
9+
# Output name under one of the following:
10+
# NETLIB_NAME (.net module) or
11+
# NETEXE_NAME (.net executable)
12+
# BIN_DIR - Bin directory (output dir)
13+
# INC_DIRS - a list of additional include directories
14+
# USED_LIBS - a list of libraries to link with
15+
# CSFLAGS - [Optional] additional flags for mono compiler
16+
# NET_WIN_FORMS - [Optional] when 1, application uses WinForms
17+
#############################################################################
18+
19+
# take this file's dir
20+
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
21+
22+
include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak
23+
24+
# create -r option to mcs
25+
USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(OUT_DIR)/$(lib).dll)
26+
27+
ifeq "$(NET_WIN_FORMS)" "1"
28+
USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll
29+
endif
30+
31+
ifeq "$(CFG)" "Release"
32+
CSFLAGS += -o+
33+
endif
34+
35+
# some lib / exe specifics
36+
ifneq "$(NETLIB_NAME)" ""
37+
OUTPUT_NAME = $(NETLIB_NAME).dll
38+
TARGET = library
39+
endif
40+
ifneq "$(NETEXE_NAME)" ""
41+
OUTPUT_NAME = $(NETEXE_NAME).exe
42+
TARGET = winexe
43+
endif
44+
45+
OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)
46+
47+
#############################################################################
48+
# Targets
49+
#############################################################################
50+
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak
51+
52+
# Final output file
53+
$(OUTPUT_FILE):
54+
$(OUTPUT_COMMAND)
55+
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#############################################################################
2+
# Primesense template makefile.
3+
# This file should not be made, but only included from other makefiles.
4+
# By default, this makefile compiles in release. To compile a debug version:
5+
# make CFG=Debug
6+
#
7+
# Project makefile should define the following BEFORE including this file:
8+
# SRC_FILES - a list of all source files
9+
# Output name under one of the following:
10+
# EXE_NAME (executable),
11+
# LIB_NAME (dynamic library) or
12+
# SLIB_NAME (static library) or
13+
# BIN_DIR - Bin directory (output dir)
14+
# INC_DIRS - a list of additional include directories
15+
# LIB_DIRS - a list of additional library directories
16+
# USED_LIBS - a list of libraries to link with
17+
# DEFINES - [Optional] additional preprocessor defines
18+
# CFLAGS - [Optional] additional flags for the compiler
19+
# LDFLAGS - [Optional] additional flags for the linker
20+
# SSE_GENERATION - [Optional] The SSE generation to use (default is 3)
21+
# TARGET_SYS_ROOT - [Optional] The path to the root of the target
22+
#############################################################################
23+
24+
ifndef TARGET_SYS_ROOT
25+
TARGET_SYS_ROOT = /
26+
endif
27+
28+
# take this file's dir
29+
COMMON_CPP_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
30+
31+
include $(COMMON_CPP_MAKE_FILE_DIR)CommonDefs.mak
32+
33+
# define a function to figure .o file for each source file (placed under intermediate directory)
34+
SRC_TO_OBJ = $(addprefix ./$(INT_DIR)/,$(addsuffix .o,$(notdir $(basename $1))))
35+
36+
# create a list of all object files
37+
OBJ_FILES = $(call SRC_TO_OBJ,$(SRC_FILES_LIST))
38+
39+
# define a function to translate any source file to its dependency file (note that the way we create
40+
# dep files, as a side affect of compilation, always puts the files in the INT_DIR with suffix .d)
41+
SRC_TO_DEP = $(addprefix ./$(INT_DIR)/,$(addsuffix .d,$(notdir $(basename $1))))
42+
43+
# create a list of all dependency files
44+
DEP_FILES = $(call SRC_TO_DEP,$(SRC_FILES_LIST))
45+
46+
# append the -I switch to each include directory
47+
INC_DIRS_OPTION = $(foreach dir,$(INC_DIRS),-I$(dir))
48+
49+
# append the -L switch to each library directory
50+
LIB_DIRS_OPTION = $(foreach dir,$(LIB_DIRS),-L$(dir)) -L$(OUT_DIR)
51+
52+
# append the -l switch to each library used
53+
USED_LIBS_OPTION = $(foreach lib,$(USED_LIBS),-l$(lib))
54+
55+
# append the -D switch to each define
56+
DEFINES_OPTION = $(foreach def,$(DEFINES),-D$(def))
57+
58+
# tell compiler to use the target system root
59+
ifneq ("$(TARGET_SYS_ROOT)","/")
60+
CFLAGS += --sysroot=$(TARGET_SYS_ROOT)
61+
LDFLAGS += --sysroot=$(TARGET_SYS_ROOT)
62+
endif
63+
64+
# set Debug / Release flags
65+
ifeq "$(CFG)" "Debug"
66+
CFLAGS += -g
67+
endif
68+
ifeq "$(CFG)" "Release"
69+
CFLAGS += -O2 -DNDEBUG
70+
CSFLAGS += -o+
71+
endif
72+
73+
CFLAGS += $(INC_DIRS_OPTION) $(DEFINES_OPTION)
74+
LDFLAGS += $(LIB_DIRS_OPTION) $(USED_LIBS_OPTION)
75+
76+
# some lib / exe specifics
77+
ifneq "$(LIB_NAME)" ""
78+
OUTPUT_NAME = lib$(LIB_NAME).so
79+
CFLAGS += -fPIC -fvisibility=hidden
80+
ifneq ("$(OSTYPE)","Darwin")
81+
LDFLAGS += -Wl,--no-undefined
82+
OUTPUT_NAME = lib$(LIB_NAME).so
83+
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared
84+
else
85+
LDFLAGS += -undefined error
86+
OUTPUT_NAME = lib$(LIB_NAME).dylib
87+
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -dynamiclib -headerpad_max_install_names
88+
endif
89+
endif
90+
ifneq "$(EXE_NAME)" ""
91+
OUTPUT_NAME = $(EXE_NAME)
92+
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS)
93+
endif
94+
ifneq "$(SLIB_NAME)" ""
95+
OUTPUT_NAME = lib$(SLIB_NAME).a
96+
OUTPUT_COMMAND = $(AR) $(OUTPUT_FILE) $(OBJ_FILES)
97+
endif
98+
99+
define CREATE_SRC_TARGETS
100+
# create a target for the object file (the CXX command creates both an .o file
101+
# and a .d file)
102+
ifneq ("$(OSTYPE)","Darwin")
103+
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
104+
$(CXX) -MD -MP -MT "$(call SRC_TO_DEP,$1) $$@" -c $(CFLAGS) -o $$@ $$<
105+
else
106+
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
107+
$(CXX) -c $(CFLAGS) -o $$@ $$<
108+
endif
109+
endef
110+
111+
#############################################################################
112+
# Targets
113+
#############################################################################
114+
.PHONY: clean-objs clean-defs
115+
116+
include $(COMMON_CPP_MAKE_FILE_DIR)CommonTargets.mak
117+
118+
# create targets for each source file
119+
$(foreach src,$(SRC_FILES_LIST),$(eval $(call CREATE_SRC_TARGETS,$(src))))
120+
121+
# include all dependency files (we don't need them the first time, so we can use -include)
122+
-include $(DEP_FILES)
123+
124+
$(OUTPUT_FILE): $(OBJ_FILES)
125+
$(OUTPUT_COMMAND)
126+
127+
clean-objs:
128+
rm -rf $(OBJ_FILES)
129+
130+
clean-defs:
131+
rm -rf $(DEP_FILES)
132+
133+
clean: clean-objs clean-defs
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# some defaults
2+
ifndef CFG
3+
CFG = Release
4+
endif
5+
6+
# expand file list
7+
SRC_FILES_LIST = $(wildcard $(SRC_FILES))
8+
9+
# define the intermediate directory
10+
INT_DIR = $(CFG)
11+
12+
# define output directory
13+
OUT_DIR = $(BIN_DIR)/$(CFG)
14+
15+
# full path to output file
16+
OUTPUT_FILE = $(OUT_DIR)/$(OUTPUT_NAME)
17+
18+
# take this file's dir
19+
COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
20+
21+
# get the OS type
22+
OSTYPE := $(shell uname -s)
23+
24+
# platform specific args
25+
-include $(COMMON_MAK_DIR)Platform.$(PLATFORM)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#############################################################################
2+
# Primesense template makefile.
3+
# This file should not be made, but only included from other makefiles.
4+
# By default, this makefile compiles in release. To compile a debug version:
5+
# make CFG=Debug
6+
#
7+
# Project makefile should define the following BEFORE including this file:
8+
# SRC_FILES - a list of all source files
9+
# JAR_NAME - name of the package
10+
# BIN_DIR - Bin directory (output dir)
11+
# INC_DIRS - a list of additional include directories
12+
# LIB_DIRS - a list of additional library directories
13+
# USED_JARS - a list of libraries used
14+
# MAIN_CLASS - [Optional] for executable jar
15+
#############################################################################
16+
17+
# take this file's dir
18+
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
19+
20+
include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak
21+
22+
nullstring :=
23+
space := $(nullstring) # end of the line
24+
25+
USED_JARS_OPTION =
26+
ifneq "$(USED_JARS)" ""
27+
USED_JARS_PATH = $(foreach jar, $(USED_JARS), $(OUT_DIR)/$(jar).jar /usr/share/java/$(jar).jar)
28+
USED_JARS_OPTION = -cp $(subst $(space),:,$(strip $(USED_JARS_PATH)))
29+
endif
30+
31+
OUTPUT_NAME = $(JAR_NAME).jar
32+
33+
# create manifest file if needed
34+
JAR_MANIFEST_CREATE_COMMAND :=
35+
MANIFEST_FILE :=
36+
JAR_OPTIONS = -cf
37+
38+
ifneq (, $(if $(or $(MAIN_CLASS), $(USED_JARS)),1))
39+
JAR_OPTIONS = -cfm
40+
MANIFEST_FILE = Manifest.txt
41+
JAR_MANIFEST_CREATE_COMMAND = (
42+
ifneq (,$(MAIN_CLASS))
43+
JAR_MANIFEST_CREATE_COMMAND += echo "Main-Class: $(MAIN_CLASS)";
44+
endif
45+
ifneq (,$(USED_JARS))
46+
JAR_MANIFEST_CREATE_COMMAND += echo "Class-Path: $(USED_JARS_PATH)";
47+
endif
48+
JAR_MANIFEST_CREATE_COMMAND += ) > $(MANIFEST_FILE)
49+
endif
50+
51+
CREATE_SHORTCUT =
52+
ifneq (, $(MAIN_CLASS))
53+
SHORTCUT = $(OUT_DIR)/$(JAR_NAME)
54+
CREATE_SHORTCUT = echo java -jar $(OUTPUT_NAME) > $(SHORTCUT); chmod +x $(SHORTCUT)
55+
endif
56+
57+
#############################################################################
58+
# Targets
59+
#############################################################################
60+
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak
61+
62+
.PHONY: clean-manifest clean-int
63+
64+
# Final output file
65+
$(OUTPUT_FILE): | $(INT_DIR)
66+
javac $(USED_JARS_OPTION) -d $(INT_DIR) $(SRC_FILES)
67+
$(JAR_MANIFEST_CREATE_COMMAND)
68+
jar $(JAR_OPTIONS) $@ $(MANIFEST_FILE) -C $(INT_DIR) .
69+
$(CREATE_SHORTCUT)
70+
71+
clean-manifest:
72+
rm -rf $(MANIFEST_FILE)
73+
74+
clean-int:
75+
rm -rf $(INT_DIR)
76+
77+
clean: clean-manifest clean-int
78+
79+

0 commit comments

Comments
 (0)