Items with no label
3338 Discussions

Building examples (capture) realsense D435

CChuq
Beginner
3,577 Views

Hi,

I am experiencing problems when trying to build from source the examples provided by intel ( https://github.com/IntelRealSense/librealsense/tree/master/examples librealsense/examples at master · IntelRealSense/librealsense · GitHub ) .

Information about my pc/ setup :

OS : Ubuntu 16.04 LTS

Kernel: 4.15.0-33-generic

History :

First, I installed the realsense sdk following the instructions provided here https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md librealsense/distribution_linux.md at master · IntelRealSense/librealsense · GitHub and here https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md librealsense/installation.md at master · IntelRealSense/librealsense · GitHub , and have been able to run realsense-viewer without any issues.

Then, I tried building the capture example. To do this I created a build directory inside examples/capture and run :

cmake .. -DBUILD_GRAPHICAL_EXAMPLES=true , from examples/capture/build

with the following output:

-- The C compiler identification is GNU 5.4.0

-- The CXX compiler identification is GNU 5.4.0

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Performing Test COMPILER_SUPPORTS_CXX11

-- Performing Test COMPILER_SUPPORTS_CXX11 - Success

-- Performing Test COMPILER_SUPPORTS_CXX0X

-- Performing Test COMPILER_SUPPORTS_CXX0X - Success

-- Configuring done

-- Generating done

-- Build files have been written to: /home/awdw/realsense_install/librealsense/examples/capture/build

Then I run :

make

with the following output:

Scanning dependencies of target rs-capture

[ 50%] Building CXX object CMakeFiles/rs-capture.dir/rs-capture.cpp.o

In file included from /home/awdw/realsense_install/librealsense/examples/capture/rs-capture.cpp:5:0:

/home/awdw/realsense_install/librealsense/examples/capture/../example.hpp: In member function 'rect texture::calc_grid(float2, int)':

/home/awdw/realsense_install/librealsense/examples/capture/../example.hpp:189:40: warning: narrowing conversion of 'w' from 'double' to 'float' inside { } [-Wnarrowing]

return rect{ w, h, new_w, new_h}; //column count, line count, cell width cell height

^

/home/awdw/realsense_install/librealsense/examples/capture/../example.hpp:189:40: warning: narrowing conversion of 'h' from 'double' to 'float' inside { } [-Wnarrowing]

/home/awdw/realsense_install/librealsense/examples/capture/../example.hpp:189:40: warning: narrowing conversion of 'new_w' from 'double' to 'float' inside { } [-Wnarrowing]

/home/awdw/realsense_install/librealsense/examples/capture/../example.hpp:189:40: warning: narrowing conversion of 'new_h' from 'double' to 'float' inside { } [-Wnarrowing]

[100%] Linking CXX executable rs-capture

CMakeFiles/rs-capture.dir/rs-capture.cpp.o: In function `draw_pointcloud(float, float, glfw_state&, rs2::points&)':

rs-capture.cpp:(.text+0x647): undefined reference to `glPopMatrix'

rs-capture.cpp:(.text+0x651): undefined reference to `glPushAttrib'

rs-capture.cpp:(.text+0x676): undefined reference to `glClearColor'

rs-capture.cpp:(.text+0x680): undefined reference to `glClear'

rs-capture.cpp:(.text+0x68a): undefined reference to `glMatrixMode'

rs-capture.cpp:(.text+0x68f): undefined reference to `glPushMatrix'

rs-capture.cpp:(.text+0x6d1): undefined reference to `gluPerspective'

rs-capture.cpp:(.text+0x6db): undefined reference to `glMatrixMode'

rs-capture.cpp:(.text+0x6e0): undefined reference to `glPushMatrix'

rs-capture.cpp:(.text+0x71f): undefined reference to `gluLookAt'

rs-capture.cpp:(.text+0x754): undefined reference to `glTranslatef'

rs-capture.cpp:(.text+0x77a): undefined reference to `glRotated'

rs-capture.cpp:(.text+0x79f): undefined reference to `glRotated'

rs-capture.cpp:(.text+0x7b4): undefined reference to `glTranslatef'

rs-capture.cpp:(.text+0x7ca): undefined reference to `glPointSize'

rs-capture.cpp:(.text+0x7d4): undefined reference to `glEnable'

rs-capture.cpp:(.text+0x7de): undefined reference to `glEnable'

rs-capture.cpp:(.text+0x7fa): undefined reference to `glBindTexture'

rs-capture.cpp:(.text+0x844): undefined reference to `glTexParameterfv'

rs-capture.cpp:(.text+0x858): undefined reference to `glTexParameteri'

rs-capture.cpp:(.text+0x86c): undefined reference to `glTexParameteri'

rs-capture.cpp:(.text+0x876): undefined reference to `glBegin'

rs-capture.cpp:(.text+0x91e): undefined reference to `glVertex3fv'

rs-capture.cpp:(.text+0x942): undefined reference to `glTexCoord2fv'

rs-capture.cpp:(.text+0x950): undefined reference to `glEnd'

rs-capture.cpp:(.text+0x955): undefined reference to `glPopMatrix'

rs-capture.cpp:(.text+0x95f): undefined reference to `glMatrixMode'

rs-capture.cpp:(.text+0x964): undefined reference to `glPopMatrix'

rs-capture.cpp:(.text+0x969): undefined reference to `glPopAttrib'

rs-capture.cpp:(.text+0x96e): undefined reference to `glPushMatrix'

CMakeFiles/rs-capture.dir/rs-capture.cpp.o: In function `rs2::error::error(rs2_error*)':

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x2a): undefined reference to `rs2_get_error_message'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x74): undefined reference to `rs2_get_failed_function'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x9b): undefined reference to `rs2_get_failed_function'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x102): undefined reference to `rs2_get_failed_args'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x129): undefined reference to `rs2_get_failed_args'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x190): undefined reference to `rs2_get_librealsense_exception_type'

rs-capture.cpp:(.text._ZN3rs25errorC2EP9rs2_error[_ZN3rs25errorC5EP9rs2_error]+0x1a5): undefined reference to `rs2_free_error'

CMakeFiles/rs-capture.dir/rs-capture.cpp.o: In function `rs2::error::handle(rs2_error*)':

rs-capture.cpp:(.text._ZN3rs25error6handleEP9rs2_error[_ZN3rs25error6handleEP9rs2_error]+0x22): undefined reference to `rs2_get_librealsense_exception_type'

CMakeFiles/rs-capture.dir/rs-capture.cpp.o: In function `rs2::stream_profile::stream_profile(rs2_stream_profile const*)':

rs-capture.cpp:(.text._ZN3rs214stream_profileC2EPK18rs2_stream_profile[_ZN3rs214stream_profileC5EPK18rs2_stream_profile]+0xc1): undefined reference to `rs2_get_stream_profile_data'

rs-capture.cpp:(.text._ZN3rs214stream_profileC2EPK18rs2_stream_profile[_ZN3rs214stream_profileC5EPK18rs2_stream_profile]+0xe7): undefined reference to `rs2_is_s...

0 Kudos
3 Replies
idata
Employee
2,243 Views

Hi,

 

 

It looks like you've made the build directory in the wrong directory altogether and that's why you're getting these errors.

 

The Librealsense installation instructions say to create a build directory in the librealsense root directory, not in examples/capture.
  • navigate to the Librealsense root directory
  • mkdir build
  • cd build
  • cmake .. -DBUILD_EXAMPLES=true
Please let me know if you're able to run the examples after following these instructions!

 

 

Regards,

 

Sahira
0 Kudos
rjeth
Beginner
2,243 Views

I am trying to develop visual odometry by intel realsense T265 camera but i am unable to do so . Is their any way or any document regarding this which can help me .

0 Kudos
MartyG
Honored Contributor III
2,243 Views

Intel has a guide to getting data from the T265's IMU.

 

https://www.intelrealsense.com/how-to-getting-imu-data-from-d435i-and-t265/

There is also a long presentation on YouTube by a T265 expert in an Intel seminar.

https://youtube.com/watch?v=62vm0_RZ1n

0 Kudos
Reply