openni / openni Goto Github PK
View Code? Open in Web Editor NEWOpenNI
Home Page: www.openni.org
License: Apache License 2.0
OpenNI
Home Page: www.openni.org
License: Apache License 2.0
I was developing my own .NET wrapper for the OpenNI. Now that you have published an "official" one, I'd like to contribute with some suggestions.
My first suggestion is to use the SuppressUnmanagedCodeSecurity attribute on the native methods class: http://msdn.microsoft.com/en-us/library/system.security.suppressunmanagedcodesecurityattribute.aspx
FxCop goes further and makes the following suggestions on the class name: http://msdn.microsoft.com/en-us/library/ms182161%28v=vs.80%29.aspx
Antao
Hello,
I made an app who show neededNodes for each ProductionNode create from a configurationFile
It works but when i'm closing the Form
I get an error of memory access violation from OpenNi.
I've tried to read all other information from NodeInfo and there's no problem except reading NeedeNodes.
I'm using OpenNi.net.dll in version 1.1.0.41
Thanks for your excellent job by the way
here's the c# code
string contextFilePath=@"..\data\openni.xml";
Context context = new Context(contextFilePath);
string message="";
foreach(NodeInfo ni in context.EnumerateExistingNodes())
{
message+=ni.InstanceName+"\n";
foreach(NodeInfo neededNI in ni.NeededNodes)
{
message+="\t"+neededNI.InstanceName+"\n";
}
}
MessageBox.Show(message);
context.Shutdown();
After updating to version 1.3.4.3 in the unstable branch, I got the following error when running NiViewer with a specified .oni file in the tag.
Open failed: failed to open the file!
It works fine when I switch to the latest version in the master branch with the memmove patch.
OS: Ubuntu 11.10
Kinect driver: SensorKinect latest unstable branch
The GestureGenerator::RegisterToGestureChange method is calling xnRegisterToPixelFormatChange instead of xnRegisterToGestureChange.
Hello, I'm writing you this e-mail because I've an important problem with the kinect, when I launch any program which uses the kinect (like the FAAST software or a visual studio solution compilated executable), I have the error "Can't create any node of the requested type".
But what is strange is that in a first time (last week), I installed the kinect driver "avin2-SensorKinect-0124bd2" with the version 1.0.0.25 of OpenNI and the version 1.3.0.18 of Nite Bin (both are unstable version).
Everything worked very well with these softwares and driver, I had no problem.
And yesterday I wanted to update my software components and drivers, so I installed the kinect driver "avin2-SensorKinect-b7cd39d" with the version 1.1.0.38 of OpenNI and the version 1.3.1.3 of Nite Bin (both are stable version). It was from there that I got this error.
So I uninstalled everything (drivers, openNI and nite) to restore the old software components, but strangely, after installing my previous drivers and software, the error is always present...
How is it possible that this error is still there? If you have any idea or if you can help me to solve this problem, I thank you very much and I'm wainting for your response.
cordially,
Vince
in the file wrappers.cs there is an error regarding the codecID-creation.
the c#-version shifts the bytes from first to last, the c-version does this from last byte to first byte. The generated codesc in the .NET wrapper are undefined and can't be laoded.
c#:
public CodecID(byte byte1, byte byte2, byte byte3, byte byte4) :
this((UInt32)(byte4 << 24 | byte3 << 16 | byte2 << 8 | byte1))
{
}
c:
With kind regards
Patrock
The method context.release() simply call the context.dispose() method and the device stays turned on. Missing a context.shutdown() method?
I get the following error when trying to run Platforms/Linux/CreateRedist/RedistMaker.Arm on my Gumstix Overo Fire running Debian Squeeze:
make: the `-j' option requires a positive integral argument
...
failed to execute: make PLATFORM=Arm -j0 -C /root/kinect/OpenNI/Platform/Linux/CreateRedist/../Build clean > /root/kinect/OpenNI/Platform/Linux/CreateRedist/Output/BuildOpenNI_clean.txt
Cleaning Failed!
I strictly follow the build instructions in the README file, but I get compilation errors.
It looks like there are plain syntax errors in the shell script!
teo@XXX:/media/DATA/downloads/programmi/openni/sources/openni/Platform/Linux-x86/CreateRedist$ ./RedistMaker
2011-06-08 14:07:35 *
Building Failed!!
teo@XXX:/media/DATA/downloads/programmi/openni/sources/openni/Platform/Linux-x86/CreateRedist$
The problem seems to be here: 3253922 WARNING Read: Depth buffer is corrupt. Size is 0 (!= 614400)
The full log plus the configuration file follows. Any idea how to proceed?
934 INFO New log started on 2012-02-25 20:14:41
962 INFO OpenNI version is 1.5.2 (Build 23)-MacOSX (Dec 28 2011 17:54:37)
971 INFO --- Filter Info --- Minimum Severity: INFO
32984 INFO Creating node 'Script1' of type Script: OpenNI/OpenNI/1.5.2.23...
33562 INFO USB is initialized.
577938 WARNING No PS sensor is connected!
2094967 WARNING No PS sensor is connected!
2095031 INFO Creating node 'Device1' of type Device: PrimeSense/SensorV2/5.1.0.41...
2096818 INFO Module 'Device' configuration was loaded from file.
2647896 INFO Connected to USB device
2647923 INFO Property Device.USBPath was changed to 1d27/0600@38/2.
2659456 INFO Hardware versions: FW=5.3.26 (9) HW=2 Chip=2 Sensor=1 SYS=14
2836686 INFO Property Device.PhysicalDeviceName was changed to PrimeSense RD1.08x.
2836740 INFO Property Device.VendorSpecificData was changed to PS1080SOC.
2836762 INFO Property Device.ID was changed to 1112240017.
2836805 INFO Device sensor initialized
2837093 INFO Creating node 'Depth1' of type Depth: PrimeSense/SensorV2/5.1.0.41...
2837187 INFO Creating stream 'Depth1' of type 'Depth'...
2837212 INFO Setting Device.ReadData to 1...
2843137 INFO Endpoints open
2844400 INFO Property Device.ReadData was changed to 1.
2844418 INFO Device.ReadData was successfully set.
2845054 INFO Property Depth1.Resolution was changed to QVGA.
2845071 INFO Property Depth1.XRes was changed to 320.
2845081 INFO Property Depth1.YRes was changed to 240.
2845090 INFO Property Depth1.FPS was changed to 30.
2845098 INFO Property Depth1.OutputFormat was changed to 1.
2845106 INFO Property Depth1.BytesPerPixel was changed to 2.
2845115 INFO Property Depth1.RequiredDataSize was changed to 153600.
2845124 INFO Property Depth1.ParamCoeff was changed to 4.
2845187 INFO Property Depth1.ShiftScale was changed to 10.
2854666 INFO Property Depth1.ConstShift was changed to 200.
2854762 INFO Property Depth1.ZPD was changed to 120.
2854885 INFO Property Depth1.ZPPS was changed to 0.105200.
2854896 INFO Property Depth1.LDDIS was changed to 7.500000.
2854992 INFO Property Depth1.DCRCDIS was changed to 2.630000.
2855084 INFO Property Depth1.Gain was changed to 42.
2855108 INFO Property Depth1.SupportedModesCount was changed to 9.
2855118 INFO Property Depth1.SupportedModesCount was changed to 15.
2855131 INFO Stream 'Depth1' was initialized.
2855145 INFO 'Depth1' stream was created.
2857128 INFO Module 'Depth1' configuration was loaded from file.
2857353 INFO Setting Depth1.FPS to 30...
2857363 INFO Depth1.FPS value did not change.
2857371 INFO Setting Depth1.YRes to 480...
2857379 INFO Property Depth1.Resolution was changed to Custom.
2857389 INFO Property Depth1.YRes was changed to 480.
2857398 INFO Property Depth1.RequiredDataSize was changed to 307200.
2857408 INFO Depth1.YRes was successfully set.
2857416 INFO Setting Depth1.XRes to 640...
2857423 INFO Property Depth1.Resolution was changed to VGA.
2857431 INFO Property Depth1.XRes was changed to 640.
2857439 INFO Property Depth1.RequiredDataSize was changed to 614400.
2857448 INFO Depth1.XRes was successfully set.
2857491 INFO Setting Depth1.Mirror to 1...
2857500 INFO Property Depth1.FirmwareMirror was changed to 1.
2857509 INFO Property Depth1.Mirror was changed to 1.
2857515 INFO Depth1.Mirror was successfully set.
2865942 INFO USB read thread was started.
2865960 INFO Property Depth1.ActualReadData was changed to 1.
3229536 INFO Property Depth1.State was changed to 1.
3229562 INFO Stream Depth1 is open.
3229957 WARNING Depth: Expected 1, got 3
3229969 WARNING Depth frame is corrupt!
3253922 WARNING Read: Depth buffer is corrupt. Size is 0 (!= 614400)
3652494 WARNING No PS sensor is connected!
4189631 WARNING No PS sensor is connected!
4724636 WARNING No PS sensor is connected!
5259643 WARNING No PS sensor is connected!
5259737 INFO Creating node 'Gesture1' of type Gesture: PrimeSense/XnVGestureGenerator/1.5.2.21...
5268207 INFO Creating node 'Scene1' of type Scene: PrimeSense/XnVSceneAnalyzer/1.5.2.21...
5286228 INFO Creating node 'User1' of type User: PrimeSense/XnVSkeletonGenerator/1.5.2.21...
<OpenNI>
<Licenses>
<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4=" />
</Licenses>
<Log writeToConsole="true" writeToFile="false">
<LogLevel value="1"/>
<Masks>
<Mask name="ALL" on="true"/>
</Masks>
<Dumps>
</Dumps>
</Log>
<ProductionNodes>
<Node type="Depth" name="Depth1">
<Configuration>
<MapOutputMode xRes="640" yRes="480" FPS="30"/>
<Mirror on="true"/>
</Configuration>
</Node>
</ProductionNodes>
</OpenNI>
Hello,
there seems to be an issue within the XnVFeatures64_1_4_2.dll which leads to an application crash at runtime.
Unfortunately I cannot reproduce the behaviour. However, the error seems to appear when there's "a lot to do" for the Kinect e.g. there have been two or more users tracked and some others come into camera scope.
I know this is not that much info, but ...
The context is as follows:
The system log entry is as follows:
I'm using the Java wrapper (latest unstable Mac release) to read an .oni file. For the following code:
myPlayer.tellFrame( myProductionNode );
i get:
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at org.OpenNI.Player.tellFrame(Player.java:101)
In org_OpenNI_NativeMethods.cpp -> Java_org_OpenNI_NativeMethods_xnTellPlayerFrame (starting line 2718) it says:
SetOutArgLongValue( ... )
but it's set to return an "jint" / "int"
There are a couple of native methods that have this combination if jint and SetOutArgLongValue, i wonder if these are maybe wrong too?
I have made a Unity3D published application with OpenNI 1.5.2.23 and NITE 1.5.2.21 and the user has reported a crash.
It has logged a crash in XnVFeatures_1_5_2.dll file at 0x558078d0 offset.
I assume that the called method is xnModuleGetOpenNIVersion at the mentioned offset.
Could you please fix it and publish an updated version?
XnVFeatures_1_5_2.dll caused an Access Violation (0xc0000005)
in module XnVFeatures_1_5_2.dll at 0023:558078d0.
Context:
EDI: 0x00000002 ESI: 0x0018f0a0 EAX: 0x558078c8
EBX: 0x55a15664 ECX: 0x0002adfc EDX: 0x0018f0c4
EIP: 0x558078d0 EBP: 0x0018f104 SegCs: 0x00000023
EFlags: 0x00210283 ESP: 0x0018f09c SegSs: 0x0000002b
C:\Program Files (x86)\PrimeSense\NITE\Features_1_5_2\Bin\XnVFeatures_1_5_2.dll
Image Base: 0x55770000 Image Size: 0x00307000
File Size: 3058688 File Time: 2011-12-28_154406
Version:
Company: PrimeSense Ltd.
Product: PrimeSense OpenNI Module
FileDesc: PrimeSense OpenNI Module
FileVer: 1.5.2.21
ProdVer: 1.5.2.21
========== OUTPUTING STACK TRACE ==================
(0x558078D0) (XnVFeatures_1_5_2): (filename not available): xnModuleGetOpenNIVersion
(0x55807344) (XnVFeatures_1_5_2): (filename not available): xnModuleGetOpenNIVersion
========== END OF STACKTRACE ===========
Some members in AlternativeViewPointCapability are not public (amongst other setViewpoint and isViewpointSupported). As such it is not possible to set an alternative viewpoint on a production node.
This is probably a NITE issue, and if you know that NITE developers don't read this issue list, could you please forward this to them.
The problem: Skeleton tracking does not work if Kinect is rotated 90 degrees around its viewing axis. We are building an augmented reality installation where the form factor requires that we use 2 Kinects "sideways". There should be a 3-axis accelerometer inside Kinect determining its pose, so I don't see why this issue couldn't be fixed, unless the accelerometer is separate from PrimeSense's board.
An alternative fix would be to rotate the input pixels 90 degrees, if indicated by one of the OpenNI/NITE xml files that the user wants to track sideways.
After running the RedistMaker as in readme file i don't have any result files. During the compilation there's a lot of warnings but no errors. Theres no Output subdirectory. When executed the install.sh file outputs:
ls ($path)/Platform/Linux-x86/CreateRedist/./Lib/*: No such file or directory
Hello! please can anyone help me with this? i'm not a programmer but i'm trying to follow the instructions and i can't go much longer alone.
I use Mac OS X version 10.6.8, my Xcode version is 3.2.6.
First i/m trying to install the OpenNI. Started installing the Macports, then go to terminal and install - sudo port install libtool - i get this msg -
Deactivating libtool @2.4.2_0+universal
---> Cleaning libtool
---> Activating libtool @2.4.2_0
---> Cleaning libtool
then i install - sudo port install libusb-devel +universal - and i get this msg
Deactivating libtool @2.4.2_0
---> Cleaning libtool
---> Activating libtool @2.4.2_0+universal
---> Cleaning libtool
---> Computing dependencies for libusb-devel
---> Dependencies to be installed: git-core
Error: Requested variants "+credential_osxkeychain+doc+pcre+python27+universal" do not match original selection "+credential_osxkeychain+doc+pcre+python27".
Please use the same variants again, perform 'port clean git-core' or specify the force option (-f).
Error: Failed to install git-core
Log for git-core is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_git-core/git-core/main.log
Error: The following dependencies were not installed: git-core
Error: Status 1 encountered during processing.
To report a bug, see http://guide.macports.org/#project.tickets
What am i doing wrong? can anyone explain step by step?
Thanks!
Platform: Ubuntu 10.10 x64
Steps to recreate:
Expected output:
Success!
Actual output:
Lots of successful output, then this:
cd ../CreateRedist; ./RedistMaker; cd -
/bin/sh: ./RedistMaker: Permission denied
/home/eryn/Code/kinect/OpenNI/Platform/Linux/Build
cd ../Redist; ./install.sh; cd -
cd: 1: can't cd to ../Redist
/bin/sh: ./install.sh: not found
ls -la shows RedistMaker is not executable (644). After changing the perms to 755, make continued successfully.
In current C++ wrapper, there are many functionality require 2, or more pass to get data from OpenNI.
Such as
xn::MapGenerator.GetSupportedMapOutputModes()
Now, developer need to get the number of supported mode, and then allocate memory space for GetSupportedMapOutputModes() to write data.
But if OpenNI can provide a function directly get the result in STL container format, like:
std::vector<XnMapOutputMode> GetSupportedMapOutputModes() const
{
XnUInt32 uCount = xnGetSupportedMapOutputModesCount(GetHandle());
std::vector<XnMapOutputMode> vSupportedMode;
if( uCount > 0 )
{
vSupportedMode.resize( uCount );
xnGetSupportedMapOutputModes( GetHandle(), &(vSupportedMode[0]), &uCount );
}
return vSupportedMode;
}
It should be better to use, and may avoid memory leak(by deveolper).
Hi,
there is a memory leak in jni methods
Java_org_OpenNI_NativeMethods_xnConvertProjectiveToRealWorld
Java_org_OpenNI_NativeMethods_xnConvertRealWorldToProjective
The arrays aProjective and aRealWorld are allocated each time these methods are called, however they are not deleted/freed at the end of the method. As a result, when converting coordinates in every frame, Java will quickly run out of memory.
I've tried to fix this by adding
delete[] aRealWorld;
delete[] aProjective;
before the line with return XN_STATUS_OK; (1613 and 1633), although it fixes the memory leak, it slows down the program quite a lot.
Is there any solution to fix the memory leak and maintain the same speed?
I am seeing that OpenNI or NITE is creating a Scene Generator even though I do not request one.
This behavior started sometime between OpenNI 1.3.2.3 / NITE 1.4.1.2 ---> OpenNI 1.5.2.23 / NITE 1.5.2.21
on the Win32 platform
The errant behavior can be seen by creating an XML config file with the following nodes: IMAGE, DEPTH, USER
Then xnContextRunXmlScriptFromFileEx() on the file
When you iterate through the running nodes, you will find a XN_NODE_TYPE_SCENE
Additionally, if you wanted a Scene generator and put a SCENE node in the XML files, then the xnContextRunXmlScriptFromFileEx() will fail with the error:
This operation is invalid!
and, of course, nothing will work thereafter.
The only known workaround is to just deal with fact that you will always have a Scene Generator and to not declare one in the XML file.
Most .NET documentation suggests the following when raising an event:
if(ThingChanged != null)
ThingChanged(this, args);
This has some issues when using multiple threads. You should cache the handlers list as the reference operation is atomic.
var handlers = ThingChanged;
if (handlers != null)
handlers(this, args);
You can find more info at http://piers7.blogspot.com/2010/03/3-races-with-net-events.html
Antao
After cross-compiling OpenNI, installing with option -c from Redist folder results in:
% ./install.sh -c ~/build/sysroot-arm
Installing OpenNI
copying shared libraries...OK
copying executables...OK
copying include files...OK
creating database directory...OK
registering module 'libnimMockNodes.so'.../home/adahl/build/sysroot-arm/usr/bin/niReg: 1: Syntax error: word unexpected (expecting ")")
This is because of the following part of install.sh:
110 # register modules
111 for module in $MODULES; do
112 printf "registering module '$module'..."
113 $INSTALL_BIN/niReg -r $INSTALL_LIB/$module
114 printf "OK\n"
115 done
The script tries to execute the cross-compiled niReg which of course fails because it's not possible to execute arm binaries on x64.
I see that the wrapper project is targeting .NET 2.0.
Anyone can compile to a more recent version but, 2.0 is way too old...
You should target the Client Profile versions as they are much smaller than the full ones.
Antao
If we try to compile with GCC (4.4.6) with the c++ Ox support (gcc -std=c++0x ), OpenNI doesn't compile.
It seems the linux flag is not defined anymore. May be GCC 4.4.6 has changed it?
If we define the linux flag in the CFLAGS variable in OpenNI/Plateform/Linux-x86/Build/CommonMakefile
CFLAGS += -malign-double -std=c++0x -Dlinux
it works fine.
I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.
Would you like to add more error handling for return values from functions like the following?
Open source is more than just making public the source. It is also letting the community contribute to a common goal.
The number of forks and the activity in these shows the interest that there is. Unfortunately, there has never been a merge from these forks into the official source, issue reports and pull requests are just ignored. Not approved, not reproved or commented. Simply ignored...
That's not the way you create a community. That's not the way you set a standard...
It's been a lot of fun but, with this attitude and the official Kinect SDK comming out, this project as lost all my interest...
My two cents,
aalmada
Output:
./RedistMaker
2011-07-10 14:39:19 *
System.Windows.Forms.dll' make[1]: *** [../../../Bin/Release/SimpleViewer.net.exe] Error 1 make: *** [Samples/SimpleViewer.net] Error 2 make: Leaving directory
/home/davisp/Kinect/OpenNI/Platform/Linux-x86/Build'Building Failed!!
I suggest to try the search pattern "<(?:(?:(.*))|([A-Z]+))" on source files.
Some places will be found where names begin with two underscores or an underscore and an uppercase letter.
Examples:
This does not fit to the expected naming conventions of the C/C++ language standard.
I recommend to adjust your selection for unique names.
Both xn::DepthMetaData and xn::SceneMetaData have operator() and operator[] for access data.
But xn::IRMetaData don't have these two operators.
Recommand:
Add operator() and operator[] in xn::IRMetaData for the interface consistent.
Sometimes it's arguable if you should use a property or a get method, but I've noticed that you never use properties.
Why not use:
public bool GlobalMirror
{
set
{
UInt32 status = OpenNIImporter.xnSetGlobalMirror(this.InternalObject, value);
WrapperUtils.CheckStatus(status);
}
get
{
return OpenNIImporter.xnGetGlobalMirror(this.InternalObject);
}
}
instead of
public void SetGlobalMirror(bool mirror)
{
UInt32 status = OpenNIImporter.xnSetGlobalMirror(this.InternalObject, mirror);
WrapperUtils.CheckStatus(status);
}
public bool GetGlobalMirror()
{
return OpenNIImporter.xnGetGlobalMirror(this.InternalObject);
}
?
It would make a lot easier to use:
context.GlobalMirror = true;
instead of
context.SetGlobalMirror(true);
Thanks,
Antao
i was attempting to create a formula of openni so it could potentially be referenced by the homebrew package management system - http://mxcl.github.com/homebrew/
however it seemed non-trivial to get the paths in the standard format. for example it's important to specify a prefix to ['bin', 'lib', etc..] for installing into, for example, /usr/local/* or /usr/local/Cellar/openni/1.3.2.1/*
it appears CreateRedist is forcing i386 instead of finding other arch such as x86_64
% brew install libusb
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.8/libusb-1.0.8.tar.bz2
File already downloaded in /Users/jw/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.8
==> make install
/usr/local/Cellar/libusb/1.0.8: 8 files, 308K, built in 19 seconds
% pwd
/tmp/OpenNI-OpenNI-f846740/Platform/Linux-x86/CreateRedist
% ./RedistMaker
[...]
../../../../Include/XnCppWrapper.h:5640: warning: ‘warning’ attribute directive ignored
../../../../Include/XnCppWrapper.h:5715: warning: ‘warning’ attribute directive ignored
In file included from ../../../../Source/OpenNI/Linux-x86/XnUSBLinux-x86.cpp:25:
../../../../Include/XnUSB.h:78: warning: ‘warning’ attribute directive ignored
../../../../Include/XnUSB.h:83: warning: ‘warning’ attribute directive ignored
In file included from ../../../../Source/OpenNI/Linux-x86/XnUSBLinux-x86.cpp:25:
../../../../Include/XnUSB.h:78: warning: ‘warning’ attribute directive ignored
../../../../Include/XnUSB.h:83: warning: ‘warning’ attribute directive ignored
ld: warning: directory not found for option '-L/opt/local/lib'
ld: warning: ignoring file /usr/local/lib/libusb-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_libusb_submit_transfer", referenced from:
xnUSBReadThreadMain(void*) in XnUSBLinux-x86.o
"_libusb_cancel_transfer", referenced from:
xnUSBReadThreadMain(void*) in XnUSBLinux-x86.o
"_libusb_free_transfer", referenced from:
xnCleanupThreadData(XnUSBReadThreadData*) in XnUSBLinux-x86.o
"_libusb_bulk_transfer", referenced from:
_xnUSBReadEndPoint in XnUSBLinux-x86.o
_xnUSBWriteEndPoint in XnUSBLinux-x86.o
[...]
% file /usr/local/lib/libusb-1.0.dylib
/usr/local/lib/libusb-1.0.dylib: symbolic link to `../Cellar/libusb/1.0.8/lib/libusb-1.0.dylib'
% file /usr/local/Cellar/libusb/1.0.8/lib/libusb-1.0.dylib
/usr/local/Cellar/libusb/1.0.8/lib/libusb-1.0.dylib: symbolic link to `libusb-1.0.0.dylib'
% file /usr/local/Cellar/libusb/1.0.8/lib/libusb-1.0.0.dylib
/usr/local/Cellar/libusb/1.0.8/lib/libusb-1.0.0.dylib: Mach-O 64-bit dynamically linked shared library
in the future would you be willing to push a git tag
so the version can be grabbed by tag? it would make getting specific versions simpler.
Hey all,
I can't seem to compile on OSX. When I run the CreateRedist script, I get the following:
2011-01-26 17:00:55 *
Building Failed!!
-END-
If I add the cflag -m32, it doesn't give that error anymore, but a load of compile errors, the first being:
../../../../Include/XnPlatform.h:70:3: error: #error OpenNI Platform Abstraction Layer - Unsupported Platform!
Any ideas? Thanks!
Best,
Leonard
Hello, I'm writing you this e-mail because I've an important problem with the kinect, when I launch my program which uses the kinect (a visual studio solution compilated executable), I have the error "A timeout has occured when waiting for data".
I have the following software components and drivers :
I tried different versions of everything (drivers, openNI and nite) but the error is stil there.
If you have any idea or if you can help me to solve this problem, I thank you very much and I'm wainting for your response.
cordially,
Vince
According to http://groups.google.com/group/openni-dev/browse_thread/thread/188a2ac823584117&usg=AFQjCNHYl1bSsXO6fLndrHG-4-jdlk460g there is a problem using more than one user generators (f.e. when multiple kinects are connected). I'm looking forward to a solution of this problem. Are there any updates on the stated "we'll fix that"?
Hi,
I follow the installation guide and installed libtool and libusb. However, when I run ./RedistMaker under Platform/Linux-x86/CreateRedist, I got such error message:
PrimeSense OpenNI Redist *
2011-10-12 23:18:46 *
Taking version...
version is 1.3.3.6
Building OpenNI...
In file included from ../../../../Source/OpenNI/XnDump.cpp:25:
../../../../Include/XnDump.h:167: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:168: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:169: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:170: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:171: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:172: warning: ‘warning’ attribute directive ignored
In file included from ../../../../Source/OpenNI/XnDump.cpp:25:
../../../../Include/XnDump.h:167: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:168: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:169: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:170: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:171: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:172: warning: ‘warning’ attribute directive ignored
In file included from ../../../../Include/XnDumpWriters.h:7,
from ../../../../Source/OpenNI/XnDumpFileWriter.h:7,
from ../../../../Source/OpenNI/XnDumpFileWriter.cpp:4:
../../../../Include/XnDump.h:167: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:168: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:169: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:170: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:171: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:172: warning: ‘warning’ attribute directive ignored
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual XnDumpWriterFileHandle XnDumpFileWriter::OpenFile(const XnChar_, XnBool, const XnChar_)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:25: error: invalid conversion from ‘XN_FILE_HANDLE’ to ‘void_’
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual void XnDumpFileWriter::Write(XnDumpWriterFileHandle, const XnUInt8_, XnUInt32)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:33: error: invalid conversion from ‘void_’ to ‘XN_FILE_HANDLE’
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual void XnDumpFileWriter::CloseFile(XnDumpWriterFileHandle)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:39: error: invalid conversion from ‘void_’ to ‘XN_FILE_HANDLE’
In file included from ../../../../Include/XnDumpWriters.h:7,
from ../../../../Source/OpenNI/XnDumpFileWriter.h:7,
from ../../../../Source/OpenNI/XnDumpFileWriter.cpp:4:
../../../../Include/XnDump.h:167: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:168: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:169: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:170: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:171: warning: ‘warning’ attribute directive ignored
../../../../Include/XnDump.h:172: warning: ‘warning’ attribute directive ignored
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual XnDumpWriterFileHandle XnDumpFileWriter::OpenFile(const XnChar_, XnBool, const XnChar_)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:25: error: invalid conversion from ‘XN_FILE_HANDLE’ to ‘void_’
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual void XnDumpFileWriter::Write(XnDumpWriterFileHandle, const XnUInt8_, XnUInt32)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:33: error: invalid conversion from ‘void_’ to ‘XN_FILE_HANDLE’
../../../../Source/OpenNI/XnDumpFileWriter.cpp: In member function ‘virtual void XnDumpFileWriter::CloseFile(XnDumpWriterFileHandle)’:
../../../../Source/OpenNI/XnDumpFileWriter.cpp:39: error: invalid conversion from ‘void_’ to ‘XN_FILE_HANDLE’
lipo: can't figure out the architecture type of: /var/folders/8L/8LNYMSgEE5mYsWyaUxuEUE+++TI/-Tmp-//ccTxpyjf.out
make[1]: *** [Release/XnDumpFileWriter.o] Error 1
make: *** [OpenNI] Error 2
failed to execute: make PLATFORM=x86 -C ../Build > /Users/wilson100/Projects/OpenNI/Platform/Linux-x86/CreateRedist/Output/BuildOpenNI.txt
Building Failed!
I have update my CMake and any library I can think of but still failed. Can someone tell me which step I miss? Thanks.
I believe I've isolated an issue with the new generation codebases of:
OpenNI 1.3.2.3 for Win32
PrimeSense NITE 1.4.1.2 for Win32
PrimeSense SensorKinect Win32 Device Driver v0.7 (based on Primesense 5.0.3.4)
Given an XML config file which has a DEPTH, IMAGE, and USER nodes, then repeated reloading of it using xnContextRunXmlScriptFromFileEx() causes a crash in less than 10 reloads.
If there is no USER node, then I can reload it over 100 times (tested) with no issues.
Before each reload, nodes are being released. The crash is not occurring in the releasing. It is instead occurring within xnContextRunXmlScriptFromFileEx()
Hello, i´m trying to compile under XOS and I´m getting this error:
2011-01-05 17:11:35 *
Any idea what´s it means?
Update:
Removing ../../Samples/.DS_Store fix this issue.
Now I´m stock getting how to make the examples to work
I have a setup with two production nodes (kinect sensor using drivers from https://github.com/avin2/SensorKinect). I used to call WaitAnyUpdateAll()
to have the data updated and it worked fine. Now I have added AlternativeViewPoint to my depthnode and many frames now appears to be incomplete (with lower rows all black) when WaitAnyUpdateAll()
returns.
To solve this I substituted WainAnyUpdateAll
for WaitOneUpdateAll(depthGenerator)
followed by imageGenerator.WaitAndUpdateData()
. This resoloved the issue as long as the sensor was connected, but not when playing data from a prerecorded file.
My XML-config:
`
Image1
<!-- Recorder node. Comment out when not used -->
<!-- can use "NONE" or "16zP" as codec -->
<!--
<Node type="Recorder" name="Recorder1">
<Configuration>
<RecorderDestination medium="File" name="recordKinectView_NONE.oni"/>
<AddNodeToRecording name="Image1" codec="NONE"/>
<AddNodeToRecording name="Depth1" codec="NONE"/>
</Configuration>
</Node>
-->
</ProductionNodes>
The method allocates a new buffer each time an image frame is accessed. This uses a lot of memory and keeps the garbage collector busy all the time. A preferred way would be to allocate the buffer just once in the constructor.
When the configuration path for the lixXnDevicesSensorV2.dylib isn't found loading the modules fails withouth showing a message or error. It keeps "waiting" on something. You can reproduce this easily by changing the configDir inthe modules.xml file to a non-exsting path.
Wrappers/OpenNI.java/src/org/OpenNI/AlternativeViewPointCapability.java
should be renamed to: (small 'p')
AlternativeViewpointCapability.java
Hello,
i think i discovered a bug in this function.
When the pinvoke call
[DllImport(openNILibraryName)]
public static extern ProductionNodeDescription xnNodeInfoGetDescription(XnNodeInfo pNodeInfo);
is done there is a accessviolationexception. When i change the return type to IntPtr and do a Marshal.PtrToStructure on this, i can get the right ProductionNodeDescription...
this seems to solve other problems i had with NodeInfo.instance too... don't know why...
Greetings,
Patrock
The interface to get context now is:
void ProductionNode::GetContext(Context& context) const
But in this way, user need to define a variable of context, and then assign value by GetContext.
Context xContext;
ProductionNode::GetContext( xContext );
But if ProductionNode can provide a interface like:
Context& ProductionNode::GetContext() const;
It should be more convenient to use.
there are mixed use of spaces and tabs in OpenNI/Platform/Win32/CreateRedist/*.py, rendering them not usable at all without fixing manually.
i didn't check the other scripts, but they are likely suffering the same problem too.
thank you so much for this release.
But i 've some problems when i try to build openNI in Ubuntu 10.10 (amd64), with RedistMaker?:
../../../../../Wrappers/OpenNI.jni/methods.inl:314: warning: deprecated conversion from string constant to ‘char_’ /bin/sh: javac: not found make1?: ../../../Bin/Release/org.OpenNI.jar? Error 127 make: Wrappers/OpenNI.java? Error 2 failed to execute: make PLATFORM=x86 -C ../Build > /home/_****/Documents/OpenNI-OpenNI-7fad563/Platform/Linux-x86/CreateRedist?/Output/BuildOpenNI.txt Building Failed!
Does someone solve this error? thanks for your help :)
K.
Hi,
I am seeing the following crash on Mac OS X with latest OpenNI / Nite:
Thread 5 Crashed:
0 libXnVFeatures_1_3_1.dylib 0x0000000123c3ba51 RobustICP::InitialCellSegmentation(Box2D const&, double&, double&, Vector3D&, Frame3D const&, DistanceFromEdges const_, Vector3D const&, bool) + 849
1 libXnVFeatures_1_3_1.dylib 0x0000000123c3c65d RobustICP::CreateTorsoCellsAndHead(bool, Array&) + 477
2 libXnVFeatures_1_3_1.dylib 0x0000000123c3cc09 RobustICP::Run(MultiResDepthMapContainer const_, UserInfo const_, Box2D&, bool, PoseCandidateInfo_, BodyParameters_, BodySegmentation_, TorsoDetector_, StateMachine_, DistanceFromEdges_, HeadCandidate_, TorsoFitting_) + 297
3 libXnVFeatures_1_3_1.dylib 0x0000000123b39adc FeatureExtractor::ComputeBestFitTorso(int, double, int) + 3548
4 libXnVFeatures_1_3_1.dylib 0x0000000123b3a4bb FeatureExtractor::Run(int, double, int) + 1947
5 libXnVFeatures_1_3_1.dylib 0x0000000123b3b8e3 FeatureExtractor::Update(int, double, int) + 35
6 libXnVFeatures_1_3_1.dylib 0x0000000123b0a432 MultiUserFeatureExtractor::Update(xn::DepthGenerator const&, xn::DepthMetaData const&, xn::SceneMetaData const&) + 386
7 libXnVFeatures_1_3_1.dylib 0x0000000123aa0a71 XnVSkeletonGenerator::UpdateUsers() + 1809
8 libXnVFeatures_1_3_1.dylib 0x0000000123aa0eff XnVSkeletonGenerator::UpdateData() + 79
9 libOpenNI.dylib 0x000000010004c848 xnUpdateDataImpl(XnInternalNodeData_) + 88
10 libOpenNI.dylib 0x0000000100050600 xnUpdateTreeImpl(XnProductionNodesSet_, XnNodeInfo const_) + 1760
11 libOpenNI.dylib 0x00000001000560a7 xnWaitNoneUpdateAll + 903
12 sensorinput 0x00000001000109ed OpenNIWrapper::run() + 141
13 libboost_thread-mt.dylib 0x000000010027b209 thread_proxy + 137
14 libSystem.B.dylib 0x00007fff826f84f6 _pthread_start + 331
15 libSystem.B.dylib 0x00007fff826f83a9 thread_start + 13
There seems to be a bug in the Java wrapper, which causes Java programs to crash at pose detection.
The fix which works for me was posted here:
http://stackoverflow.com/questions/6831777/openni-usertracker-java-sample-crashes/7029208#7029208
Hello, i have a request that could make sense to had to the library.
ConvertToRealWorld takes a list of points and converts to a list of points XPoint3D.
It would be nice to have this function to work in image space, pass a uint16* buffer and return a float3* buffer (xyz pos as a rgb float texture)
Another helpful method would be a projection matrix
Hi there, I have been trying to install OpenNI 1.3.3.6, but when executing "RedistMaker" or "make" in Build directory, always shows me:
2011-10-15 10:58:25 *
I checked Source/OpenNI/XnDumpFileWriter.cpp file, and in line 5:
So in Include directory only exists "XnLog.h" with "X", no "x", so ichanged it, and I got more erros:
2011-10-15 11:08:09 *
And I don't know what to do.
Please I need help because I have been cleaning and formating my computer many times, and the previous version of OpenNI 1.3.2.1 worked fine, I don't know how to fix the error.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.