-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenNI 2 grabber #276
OpenNI 2 grabber #276
Conversation
Hi Ky, thanks a lot for your contribution! Having all changes in one big pull request, makes it hard to review, so it would be great if you could split this up and do a little cleanup as well. Just tell me, if you need help with it. Cheers Jochen |
What is generally the recommended way to do that? Git rebase seems to be the desired method, but everyone seems to warn against rebasing commits already pushed to a public server. (I haven't done much work with rewriting history before.) |
Rebasing is fine as long as no one else is sharing your history. For PCL the PointCloudLibrary/pcl repo is the public one, everyone uses contrary to your fork, which no one should use without being aware that it's work in progress. |
I refactored much of the history, but some of the log messages are still useless (even to me). I will not have time to do more clean up until after ISMAR is over, so it might be better to leave integration pending until then. |
Okay, I squashed most of the commits into cohesive units for review. |
HI @kwaegel could you please remove the merge commit? Thanks! |
How do I remove the merge commit? I rebased on master as part of my cleanup, but I'm not sure why that commit is listed as part of my branch. I looked into combining the nearly identical files in openni_camera and openni2_camera, but have not had time to do that yet. Switching entirely to OpenNI2 would be nice, but would add a dependency (OpenNI2-Freenect) since OpenNI2 does not have native Kinect support on Linux. |
Removed merge commit by rebasing on current master again. |
Can you run? I can not run pcl_openni2_viewer after.cmake your openni2 of branchs. |
Try the openni2_pullrequest branch. The openni2 branch can be a little unstable, though I would not have expected that particular problem. @jspricke What is a good way to add unit tests for what is essentially a device driver? Could we use a tiny (~5 frame) depth camera recording for automated testing? OpenNI 2 wraps devices and device recordings with the same interface. I'm not sure if data files are appropriate for the repository. |
I wouldn't add tests, as we would test OpenNI2 basically. Maybe it would |
The pull request cannot be merged, can you please fix it? |
I can rebase on master again, but I'll wait until my win32_viz_fixes pull-request is integrated. I can't compile the master branch otherwise. |
I tried building your pull request branch (kwaegel/openni2_pullrequest) but failed. It seems like the culprit was the
This was using GCC on Linux (x64, Fedora 19). I am a bit surprised, because I tried the same branch two days ago (Saturday 14th), and then I had no problems. |
That's from the most recent commit (68b4e79) fixing the default video mode. I used the C++11 definition of auto, but apparently it's not safe to do so yet. I'll have to change it back. |
Great! I got it working with pcl_kinfu_app as well. Hope to see this merged soon. |
That's great that it works on Linux! Did you have to change I made I'd like to have a common interface so we can use something like |
Nope, no changes to I personally am fine with having it mutually exclusive for now. |
I'm not entirely sure if they should be mutually exclusive. I'll try to find some time together with @sdmiller and test this, as it's a pretty important feature to have in PCL 1.8 |
Unfortunately this pull request can no longer be merged automatically. Can we please fix the conflict? |
@kwaegel Why did you close the pull request? |
Needed to be rebased on the PCL master branch again, since it was about two months behind and could not auto-merge. |
OK, I can confirm that it builds on Linux without any errors (although there are quite a few warnings). I had some other problem, on the other hand: I couldn't make it to build the OpenNI2 grabber. Both in command line and cmake-gui listed that OpenNI2 exists and was found. I have no idea why it happened. Did I forget to change some flag somewhere (I know only two CMakeLists files that provide installation options for OpenNI)? In the end, I just commented out those lines which were testing whether or not OpenNI2 exists. I know that this is no solution, but unfortunately I wasn't able to spend more time on this issue. The main thing is, that it builds and runs (tested Xtion camera). |
I've also started building this on Clang in a VM, to avoid future compile errors, and I've not had any problems building the 2.x grabber. |
@jspricke: I used the |
Ah, openni2 is fine then :). |
I'm not in touch with this part of PCL, but in general I think merging won't hurt, but only help to discover bugs faster. I see that this PR changes the required version of Boost to 1.47. I checked the downloads section of pointclouds.org and it seems like we already provide "right" versions for Windows and Mac. "Compiling from source" page talks about 1.46 though. |
@kwaegel looks like there is a merge conflict. Can you fix this, so we can push the button? ;). Thanks! |
+1. OpenNI2 support is an important contribution. |
@jochen, will do, but it might take up to a week. I'm at the VR 2014
|
* Chrono was added in boost 1.47.0, so changed minimum version to match.
*also added a find_openni2 macro to PCLConfig.cmake.in to allow external users of PCL to find the OpenNI 2 libraries. This is a duplicate of the code in FindOpenNI2.cmake.
* This is not an exceptional event and always occurs for file devices. Print error message instead.
* The convertTo..PointCloud methods used statically allocated buffers to resize images, causing a data race if multiple deices tried to create point clouds simultaneously. Switched to using member buffers for each grabber.
* Fixed assignment in conditional test * Removed unused argument to focal length getters * Removed 'register' keywords that do nothing.
* Changed default viewpoint for OpenNI 2 viewer app. Needed to look down +Z axis to see point cloud.
* Depends on pcl/io/openni_grabber.h and does not work with OpenNI 2.x grabber yet
Fixed the merge conflicts, rebased on master, and squashed some of the minor fixup commits. |
+1 |
1 similar comment
+1 |
* /usr/include/openni2 is a common install location for unofficial OpenNI2 deb packages.
Experimental version of an OpenNI 2.x grabber.
I tested the existing OpenNI 1.x grabber under VS2010 and did not find any obvious regressions or errors with this code in place, so the two should be able to coexist as long as they are not built at the same time. There is a CMake check preventing this.
Several apps and example programs break encapsulation and directly use OpenNI 1.x data structures, so they will not work with the new grabber until this is fixed.
Linux compatibility has not been tested, but I expect the new grabber will fail to build until FindOpenNI2.cmake is updated with the correct default paths.