Having problems with VINS Mono

Yeah, I have installed OpenCV

Screenshot from 2023-12-19 18-32-14

I installed using apt, did not build it from source, should I build it from source?

yes , it is required
Please read the many blog on the subject as this is well documented
I’ll can help once you get a working VINS

Sure, I am building it from source and I also I think there are some problems with the code for VINS mono itself which is there in @chobitsfan repo, I think the issue is sorted here. It is the error that I got. I changed the code according to that and trying to build VINS, if it still fails I’ll build opencv from source and check.

one more thing, @ppoirier should I use the master ardupilot repo or the one which @chobitsfan has forked and modified?

Hey @ppoirier , VINS is built, it was the issue that I mentioned here

Can you help with the next steps?

Ahh… good, I know this patch but I dont remember if I used them on this built… anyway, good for you :slight_smile:

Yes you need build @chobitsfan branch as it is exporting the precision IMU mavlink message and it is not yet merged into Master

And you need to build the Mavlink UDP proxy as well

And camera utility (if you are using the same)

1 Like

Hey @ppoirier @chobitsfan , I am having issues with building the libcamera which @chobitsfan modified. The error is

user@raspberrypi:~/libcamera-apps$ meson setup build
The Meson build system
Version: 1.3.0
Source dir: /home/user/libcamera-apps
Build dir: /home/user/libcamera-apps/build
Build type: native build
Project name: libcamera-apps
Project version: 1.1.3
C compiler for the host machine: ccache cc (gcc 9.4.0 “cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0”)
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: ccache c++ (gcc 9.4.0 “c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0”)
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.1
Run-time dependency libcamera found: YES 0.1.0
Run-time dependency Boost (found: program_options) found: YES 1.71.0 (/usr)
Run-time dependency threads found: YES
Run-time dependency libavcodec found: YES 58.54.100
Run-time dependency libavdevice found: YES 58.8.100
Run-time dependency libavformat found: YES 58.29.100
Run-time dependency libavutil found: YES 56.31.100
Run-time dependency libswresample found: YES 3.5.100
Run-time dependency libexif found: YES 0.6.21
Run-time dependency libjpeg found: YES 2.0.3
Run-time dependency libtiff-4 found: YES 4.1.0
Run-time dependency libpng found: YES 1.6.37
Found CMake: /usr/bin/cmake (3.16.3)
DEPRECATION: CMake support for versions <3.17 is deprecated since Meson 0.62.0.
|
| However, Meson was only able to find CMake 3.16.3.
|
| Support for all CMake versions below 3.17.0 will be removed once
| newer CMake versions are more widely adopted. If you encounter
| any errors please try upgrading CMake to a newer version first.

Run-time dependency libdrm found: NO (tried pkgconfig and cmake)
Run-time dependency x11 found: YES 1.6.9
Run-time dependency epoxy found: YES 1.5.4
Run-time dependency qt5 (modules: Core, Widgets) found: YES 5.12.8 (pkg-config)
Run-time dependency opencv4 found: YES 4.2.0
Run-time dependency tensorflow-lite found: NO (tried pkgconfig and cmake)
Build targets in project: 7

libcamera-apps 1.1.3

libcamera
location : /usr/local/lib/aarch64-linux-gnu
version : 0.1.0

Build configuration
libav encoder : YES
drm preview : NO
egl preview : YES
qt preview : YES
OpenCV postprocessing: YES
TFLite postprocessing: NO

Found ninja-1.10.0 at /usr/bin/ninja
user@raspberrypi:~/libcamera-apps$ ninja -C build install
ninja: Entering directory build' [3/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_post_processor.cpp.o FAILED: libcamera_app.so.1.1.3.p/core_post_processor.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_post_processor.cpp.o -MF libcamera_app.so.1.1.3.p/core_post_processor.cpp.o.d -o libcamera_app.so.1.1.3.p/core_post_processor.cpp.o -c ../core/post_processor.cpp In file included from ../core/post_processor.cpp:10: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole [4/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o FAILED: libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o -c ../encoder/h264_encoder.cpp In file included from ../core/logging.hpp:1, from ../core/options.hpp:22, from ../core/video_options.hpp:14, from ../encoder/encoder.hpp:13, from ../encoder/h264_encoder.hpp:15, from ../encoder/h264_encoder.cpp:18: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole [5/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_options.cpp.o FAILED: libcamera_app.so.1.1.3.p/core_options.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_options.cpp.o -MF libcamera_app.so.1.1.3.p/core_options.cpp.o.d -o libcamera_app.so.1.1.3.p/core_options.cpp.o -c ../core/options.cpp In file included from ../core/logging.hpp:1, from ../core/options.hpp:22, from ../core/options.cpp:17: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole [6/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o FAILED: libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o -c ../encoder/encoder.cpp In file included from ../core/logging.hpp:1, from ../core/options.hpp:22, from ../core/video_options.hpp:14, from ../encoder/encoder.hpp:13, from ../encoder/encoder.cpp:15: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole [7/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o FAILED: libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o -c ../encoder/mjpeg_encoder.cpp In file included from ../core/logging.hpp:1, from ../core/options.hpp:22, from ../core/video_options.hpp:14, from ../encoder/encoder.hpp:13, from ../encoder/mjpeg_encoder.hpp:15, from ../encoder/mjpeg_encoder.cpp:13: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole [8/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o FAILED: libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I.. -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o -MF libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o.d -o libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o -c ../core/libcamera_app.cpp In file included from ../core/libcamera_app.cpp:11: ../core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’? 56 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureViewfinder()’: ../core/libcamera_app.cpp:262:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’? 262 | StreamRoles stream_roles = { StreamRole::Viewfinder }; | ^~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:265:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 265 | stream_roles.push_back(StreamRole::Viewfinder), lores_stream_num = stream_num++; | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:267:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 267 | stream_roles.push_back(StreamRole::Raw), raw_stream_num = stream_num++; | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:269:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 269 | configuration_ = camera_->generateConfiguration(stream_roles); | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:327:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’ 327 | configuration_->transform = options_->transform; | ^~~~~~~~~ ../core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureStill(unsigned int)’: ../core/libcamera_app.cpp:351:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’? 351 | StreamRoles stream_roles = { StreamRole::StillCapture, StreamRole::Raw }; | ^~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:352:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 352 | configuration_ = camera_->generateConfiguration(stream_roles); | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:374:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’ 374 | configuration_->transform = options_->transform; | ^~~~~~~~~ ../core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureVideo(unsigned int)’: ../core/libcamera_app.cpp:403:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’? 403 | StreamRoles stream_roles = { StreamRole::VideoRecording }; | ^~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:407:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 407 | stream_roles.push_back(StreamRole::Raw); | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:411:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 411 | stream_roles.push_back(StreamRole::Viewfinder); | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:412:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’? 412 | configuration_ = camera_->generateConfiguration(stream_roles); | ^~~~~~~~~~~~ | StreamRole ../core/libcamera_app.cpp:432:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’ 432 | configuration_->transform = options_->transform; | ^~~~~~~~~ ../core/libcamera_app.cpp:461:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’ 461 | configuration_->transform = options_->transform; | ^~~~~~~~~ ninja: build stopped: subcommand failed. user@raspberrypi:~/libcamera-apps$ ninja -C build install ninja: Entering directory build’
[3/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o
FAILED: libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_h264_encoder.cpp.o -c …/encoder/h264_encoder.cpp
In file included from …/core/logging.hpp:1,
from …/core/options.hpp:22,
from …/core/video_options.hpp:14,
from …/encoder/encoder.hpp:13,
from …/encoder/h264_encoder.hpp:15,
from …/encoder/h264_encoder.cpp:18:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
[4/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_options.cpp.o
FAILED: libcamera_app.so.1.1.3.p/core_options.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_options.cpp.o -MF libcamera_app.so.1.1.3.p/core_options.cpp.o.d -o libcamera_app.so.1.1.3.p/core_options.cpp.o -c …/core/options.cpp
In file included from …/core/logging.hpp:1,
from …/core/options.hpp:22,
from …/core/options.cpp:17:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
[5/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_post_processor.cpp.o
FAILED: libcamera_app.so.1.1.3.p/core_post_processor.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_post_processor.cpp.o -MF libcamera_app.so.1.1.3.p/core_post_processor.cpp.o.d -o libcamera_app.so.1.1.3.p/core_post_processor.cpp.o -c …/core/post_processor.cpp
In file included from …/core/post_processor.cpp:10:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
[6/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o
FAILED: libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_encoder.cpp.o -c …/encoder/encoder.cpp
In file included from …/core/logging.hpp:1,
from …/core/options.hpp:22,
from …/core/video_options.hpp:14,
from …/encoder/encoder.hpp:13,
from …/encoder/encoder.cpp:15:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
[7/47] Compiling C++ object libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o
FAILED: libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o -MF libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o.d -o libcamera_app.so.1.1.3.p/core_libcamera_app.cpp.o -c …/core/libcamera_app.cpp
In file included from …/core/libcamera_app.cpp:11:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureViewfinder()’:
…/core/libcamera_app.cpp:262:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’?
262 | StreamRoles stream_roles = { StreamRole::Viewfinder };
| ^~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:265:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
265 | stream_roles.push_back(StreamRole::Viewfinder), lores_stream_num = stream_num++;
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:267:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
267 | stream_roles.push_back(StreamRole::Raw), raw_stream_num = stream_num++;
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:269:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
269 | configuration_ = camera_->generateConfiguration(stream_roles);
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:327:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’
327 | configuration_->transform = options_->transform;
| ^~~~~~~~~
…/core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureStill(unsigned int)’:
…/core/libcamera_app.cpp:351:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’?
351 | StreamRoles stream_roles = { StreamRole::StillCapture, StreamRole::Raw };
| ^~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:352:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
352 | configuration_ = camera_->generateConfiguration(stream_roles);
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:374:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’
374 | configuration_->transform = options_->transform;
| ^~~~~~~~~
…/core/libcamera_app.cpp: In member function ‘void LibcameraApp::ConfigureVideo(unsigned int)’:
…/core/libcamera_app.cpp:403:2: error: ‘StreamRoles’ was not declared in this scope; did you mean ‘StreamRole’?
403 | StreamRoles stream_roles = { StreamRole::VideoRecording };
| ^~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:407:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
407 | stream_roles.push_back(StreamRole::Raw);
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:411:3: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
411 | stream_roles.push_back(StreamRole::Viewfinder);
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:412:50: error: ‘stream_roles’ was not declared in this scope; did you mean ‘StreamRole’?
412 | configuration_ = camera_->generateConfiguration(stream_roles);
| ^~~~~~~~~~~~
| StreamRole
…/core/libcamera_app.cpp:432:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’
432 | configuration_->transform = options_->transform;
| ^~~~~~~~~
…/core/libcamera_app.cpp:461:18: error: ‘class libcamera::CameraConfiguration’ has no member named ‘transform’
461 | configuration_->transform = options_->transform;
| ^~~~~~~~~
[8/47] Compiling C++ object libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o
FAILED: libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o
ccache c++ -Ilibcamera_app.so.1.1.3.p -I. -I… -Icore -I/usr/local/include/libcamera -I/usr/include -I/usr/include/aarch64-linux-gnu -I/usr/include/libexif -I/usr/include/libpng16 -I/usr/include/aarch64-linux-gnu/qt5/QtCore -I/usr/include/aarch64-linux-gnu/qt5 -I/usr/include/aarch64-linux-gnu/qt5/QtWidgets -I/usr/include/aarch64-linux-gnu/qt5/QtGui -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++17 -O3 -pedantic -Wno-unused-parameter -faligned-new -D_FILE_OFFSET_BITS=64 -Wno-psabi -ftree-vectorize -DLIBAV_PRESENT=1 -DLIBEGL_PRESENT=1 -DQT_PRESENT=1 -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -DBOOST_ALL_NO_LIB -MD -MQ libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o -MF libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o.d -o libcamera_app.so.1.1.3.p/encoder_mjpeg_encoder.cpp.o -c …/encoder/mjpeg_encoder.cpp
In file included from …/core/logging.hpp:1,
from …/core/options.hpp:22,
from …/core/video_options.hpp:14,
from …/encoder/encoder.hpp:13,
from …/encoder/mjpeg_encoder.hpp:15,
from …/encoder/mjpeg_encoder.cpp:13:
…/core/libcamera_app.hpp:56:33: error: ‘StreamRoles’ in namespace ‘libcamera’ does not name a type; did you mean ‘StreamRole’?
56 | using StreamRoles = libcamera::StreamRoles;
| ^~~~~~~~~~~
| StreamRole
ninja: build stopped: subcommand failed.
user@raspberrypi:~/libcamera-apps$

I havent built that one because I am using USB based camera
But it looks like incompatibility with
Run-time dependency libcamera found: YES 0.1.0

I guess you will have to run with older release = manual build :wink:

Yep… confirmed
https://git.libcamera.org/libcamera/libcamera.git/commit/?id=668a5e674aed65b8982b449b4bed58ff7e3e1413

The StreamRoles type definition has been removed. This is now handled as a
Span to prevent unnecessary allocations and copies.

How is @chobitsfan libcamera and the original one different, because when I cloned from the official repo of libcamera it was built without any error, if that can be used I might build the original one instead of the modified one

Does official repo have the /core/libcamera_app.hpp ?
This one obviously need StreamRoles

Nope it doesn’t, but that is where I am getting the error during build, I’ll try sorting it out and get back to you.

Revert to version 0.0.5

1 Like

@Dr0ne_guy Hi, have you done the whole implementation? I’m planning to build a similar project with picam and RPI 4, also can you please tell me that all the software mentioned by @chobitsfan in his post is running on pi?

Hey @Nerd , I haven’t tried the full implementation but I will be doing that on a different system, but I was able to successfully build Vins Mono in RPi 4 with Ubuntu 20 as suggested by @ppoirier , but there were some build issues with @chobitsfan modified librealsense, so I was stuck there, but now I’ll be trying Vins Mono on a jetson device

Thanks for the update. Good luck