Git Product home page Git Product logo

Comments (10)

olafkaehler avatar olafkaehler commented on August 17, 2024

For libuvc, make sure you get the branch from Steve McGuire at https://github.com/mcguire-steve/libuvc.git (as mentioned in README). The changes to talk to the RealSense have not been merged into the main branch yet.

For OpenNI, specify OPEN_NI_ROOT when running cmake. I guess we should fix our FindOpenNI2.cmake to look in some default locations (/usr or /usr/local ?) which it apparently does not do at the moment...

from infinitam.

hs2873 avatar hs2873 commented on August 17, 2024

Hi,

Thanks for the input. I was able to resolve the error for OpenNI by making changes to the FindOpenNI.cmake file.
However, I tried to use the libuvc provided by Steve: https://github.com/mcguire-steve/libuvc . I am still getting error when I run make. The error is as follows.

  use of undeclared identifier 'UVC_FRAME_FORMAT_GRAY16'; did you mean
  'UVC_FRAME_FORMAT_GRAY8'?
    data->framebuffer_depth->frame_format = UVC_FRAME_FORMAT_GRAY16;
                                            ^~~~~~~~~~~~~~~~~~~~~~~
                                            UVC_FRAME_FORMAT_GRAY8

/usr/local/include/libuvc/libuvc.h:71:3: note: 'UVC_FRAME_FORMAT_GRAY8' declared
here
UVC_FRAME_FORMAT_GRAY8,
^
InfiniTAM-master/InfiniTAM/Engine/LibUVCEngine.cpp:151:9: error:
use of undeclared identifier 'uvc_open2'
res = uvc_open2(data->dev, &(data->devh_rgb), 0); //Try to ...
^
InfiniTAM-master/InfiniTAM/Engine/LibUVCEngine.cpp:161:9: error:
use of undeclared identifier 'uvc_open2'
res = uvc_open2(data->dev, &(data->devh_d), 1); //Try to op...
^
In file included from InfiniTAM-master/InfiniTAM/Engine/LibUVCEngine.cpp:3:
InfiniTAM-master/InfiniTAM/Engine/LibUVCEngine.h:22:9: warning:
private field 'colorAvailable' is not used [-Wunused-private-field]
bool colorAvailable, depthAvailable;
^
InfiniTAM-master/InfiniTAM/Engine/LibUVCEngine.h:22:25: warning:
private field 'depthAvailable' is not used [-Wunused-private-field]
bool colorAvailable, depthAvailable;
^
Thanks!!!

from infinitam.

olafkaehler avatar olafkaehler commented on August 17, 2024

I fear that something in your installation of libuvc appears to be broken. The version in the master branch of https://github.com/mcguire-steve/libuvc.git does provide the missing definitions (check the libuvc.h included there). For some reason, your globally installed version of libuvc (/usr/local/include/libuvc/libuvc.h) does not have these extras, and your InfiniTAM is configured to use that version.

Try any combination of the following:

  • Remove globally installed libuvc from /usr/local
  • Specify the libuvc_DIR used in the cmake process of InfiniTAM
  • Overwrite the globally installed libuvc with your newly compiled version of the modified libuvc

from infinitam.

ml-rodriguez avatar ml-rodriguez commented on August 17, 2024

Hello,
I am also trying to use the Intel real sense camera to run this project and I have had the same problem. I have already tried the above solutions. However, I am still getting error when I run make. The error is as follows:

-- CUDA found: TRUE
-- OpenNI found: TRUE
-- libuvc found: TRUE
-- libpng found: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/maria/InfiniTAM/build
[ 2%] Built target Utils
[ 75%] Built target ITMLib
[ 77%] Building CXX object Engine/CMakeFiles/Engine.dir/LibUVCEngine.cpp.o
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp: In function ‘void callback_depth(uvc_frame_t_, void_)’:
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp:57:42: error: ‘UVC_FRAME_FORMAT_GRAY16’ was not declared in this scope
data->framebuffer_depth->frame_format = UVC_FRAME_FORMAT_GRAY16;
^
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp: In constructor ‘InfiniTAM::Engine::LibUVCEngine::LibUVCEngine(const char_, Vector2i, Vector2i)’:
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp:225:50: error: ‘uvc_open2’ was not declared in this scope
res = uvc_open2(data->dev, &devh_tmp, cameraID);
^
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp:251:51: error: ‘uvc_open2’ was not declared in this scope
res = uvc_open2(data->dev, &(data->devh_rgb), 0);
^
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp:286:24: error: ‘uvc_get_stream_ctrl_frame_desc’ was not declared in this scope
format_rgb.interval);
^
/home/maria/InfiniTAM/Engine/LibUVCEngine.cpp:298:21: error: ‘uvc_get_stream_ctrl_frame_desc’ was not declared in this scope
format_d.interval);
^
make[2]: *_* [Engine/CMakeFiles/Engine.dir/LibUVCEngine.cpp.o] Error 1
make[1]: *** [Engine/CMakeFiles/Engine.dir/all] Error 2
make: *** [all] Error 2

I would really appreciate any suggestions. Thanks in advance

from infinitam.

olafkaehler avatar olafkaehler commented on August 17, 2024

As I said earlier, for Intel Realsense support you need at least the libuvc branch of Steve McGuire or, in the very latest version to support both the R200 and F200 cameras, you need the version of libuvc from here: https://github.com/olafkaehler/libuvc

If your distribution installed some other version of libuvc, make sure the correct one is being used when building InfiniTAM

from infinitam.

ml-rodriguez avatar ml-rodriguez commented on August 17, 2024

I removed globally installed libuvc from /usr/local. After, I have installed (in /usr/local) the version of libuvc from here: https://github.com/olafkaehler/libuvc

I have checked that this last version is being used when building InfiniTAM (libuvc_DIR /usr/local/lib/cmake/libuvc) but I am get the same error

from infinitam.

olafkaehler avatar olafkaehler commented on August 17, 2024

If you look deep inside your build directory into the file Engine/CMakeFiles/Engine.dir/depend.make there should be a line identifying the "libuvc.h" that "LibUVCEngine.cpp" depends on. Can you check, whether this is the file you expect it to be and can you check whether that libuvc.h provides a definition of e.g. the function uvc_open2()?

from infinitam.

ml-rodriguez avatar ml-rodriguez commented on August 17, 2024

Into the file Engine/CMakeFiles/Engine.dir/depend.make I have found the line:
Engine/CMakeFiles/Engine.dir/LibUVCEngine.cpp.o: /usr/local/include/libuvc/libuvc.h

I have compared libuvc.h downloaded with libuvc.h into repository and they are not same. My libuvc.h downloaded provides

uvc_error_t uvc_open(
uvc_device_t _dev,
uvc_device_handle_t *_devh);

but not uvc_open2(). Can be this the problem?

from infinitam.

olafkaehler avatar olafkaehler commented on August 17, 2024

Yes this is a problem...

Personally, I'd NOT install anything I compile myself into a directory that I myself can not write to without root access. Generally, don't do anything as root. Install libraries in a /home/.../3rdparty/ directory and make sure the things that depend on them (like InfiniTAM) take the right version when they need it. Try to get rid of the libuvc installed in /usr/local, both the libuvc.h and any libuvc.so and libuvc.a files... and maybe the .cmake files as well... unfortunately there is not usually a clean uninstall if you ever do anything as root and bypass the package management system... that's precisely why you shouldn't ever do anything as root, an application of the rule "if you can't undo it, don't do it or live with the consequences"!

(At least that's the way I like to manage dependencies. I keep preaching it to everyone having such problems as described, and I'm always shocked how many people happily just do whatever they want as root and are surprised by the consequences.)

from infinitam.

ml-rodriguez avatar ml-rodriguez commented on August 17, 2024

Thank you for the advice. I will try to solve this problem and not do anything as root

from infinitam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.