View my account

An error occurred when installing pyrealsense2 on ubuntu

Comments

15 comments

  • MartyG

    Hi B2992872  pip install of pyrealsense2 will not work on Jetson because it has an Arm processor chip, and the pyrealsense2 pip packages are for x86 / x64 processors like the ones in PCs.  The pyrealsense2 wrapper can be built from source code on Jetson.

    https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#building-from-source 

    0
    Comment actions Permalink
  • B2992872

    Hi @MartyG
    I have tried to build from the source, but an error occurred when I clicked three steps

    0
    Comment actions Permalink
  • MartyG

    Have you got the CMake program installed please?

    https://cmake.org/ 

    0
    Comment actions Permalink
  • B2992872

    Do you use the downloaded data to make CMake?

    0
    Comment actions Permalink
  • MartyG

    I believe that you go to the root librealsense directory of the librealsense SDK and do mkdir build && cd build to create a sub-folder named build (librealsense > build).  The command then changes the directory so that you are inside the build folder.

    Then input the CMake build command whilst in that build folder:

    cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true

    Then after that, input these commands:

    make -j4

    sudo make install

    0
    Comment actions Permalink
  • B2992872

    After I tried to install cmake and update, an error occurred when I typed make mkdir build

    0
    Comment actions Permalink
  • MartyG

    The error message suggests that you are launching the build command from the /home/Nvidia/build directory.    If that is the case then you are not at the correct directory path (the instructions for building the pyrealsense2 wrapper from source are admittedly not clear about this). 

    If you have the librealsense SDK built then you should have a directory called librealsense or something similar.  This is the folder that the SDK files are in.  So you should enter this directory and use the command mkdir build && cd build to create a 'build' directory and navigate to it.   Then input the CMake build command.

    -1
    Comment actions Permalink
  • B2992872

    I successfully updated cmake to version 3.18.2, and then executed mkdir build in the directory of librealsense. The first time I executed the error, the cmake version was too old, so I tried again after the update

    0
    Comment actions Permalink
  • MartyG

    After doing mkdir build in the librealsense directory to create the build folder, you have to use cd build to enter the build directory before running the CMake python bindings command.

    0
    Comment actions Permalink
  • B2992872

    Is cmake installed in the librealsense directory?

    0
    Comment actions Permalink
  • MartyG

    To the best of my knowledge, once CMake is installed somewhere on your computer then it should be accessible from anywhere.  You can download it for Linux as a pre-built "binary" file (cmake-3.18.2-Linux-x86_64.tar.gz)  that just installs when you run it, so you do not need to build CMake from source code.

    https://cmake.org/download/ 

    0
    Comment actions Permalink
  • B2992872

    I tried to update cmake in the librealsense directory to check that the version is still old, so the cmake command is still wrong

    0
    Comment actions Permalink
  • B2992872

    Can the fifth step be explained in detail?

    0
    Comment actions Permalink
  • Sheethal Ng

    Hi Marty

    Here is my requirement

    1. Initially the IR emitter will be turned off

    2. I need to then turn on the emitter and get depth frame

    3. Turn off the emitter and get IR frame

     

    I believe when we call pipeline.wait_for_frames(), we will get all the enabled streams with either emitter on or off

    Could u please tell me whether it is possible to get each individual stream with different emitter options ie ON/OFF??

     

    Thanks in advance

    0
    Comment actions Permalink
  • MartyG

    Hi Sheethal Ng  The IR Emitter (projector) is a separate physical camera component from the IR imager components.  It can be enabled / disabled independently of the current status of the depth, color and IMU streams.  So the IR Emitter is either On or Off, and you cannot set an individual on / off state for each individual stream type.

    If you are needing to remove the IR dot pattern projection from the IR image, the D415 camera model provides a Visual Preset (json) configuration file called Left Imager Color w/o IR Pattern that removes the pattern.  This pattern removal feature is also coming to the new D455 model in an upcoming firmware version.

    https://github.com/IntelRealSense/librealsense/tree/master/examples/sensor-control 

    The visibility of the dot pattern can also be reduced whilst keeping the IR Emitter on by reducing the value of the Laser Power option.  This can make the depth image more sparse in detail though.

    If you prefer to toggle the IR Emitter on-off then you can find example code to do so in the link below, under the librealsense2 heading:

    https://github.com/IntelRealSense/librealsense/wiki/API-How-To#controlling-the-laser 

    0
    Comment actions Permalink

Please sign in to leave a comment.