Hello Martin,
Thank you for your reaction.
The problem was a realsense camera that was connected, and only initialized, by the software.
This caused troubles with the depthai sdk.
Hello Martin,
Thank you for your reaction.
The problem was a realsense camera that was connected, and only initialized, by the software.
This caused troubles with the depthai sdk.
Hi all,
I have a c++ project existing out of more than 6 header + code files. Initially the project was built around an Intel RealSense camera, but I am trying to convert it to use the OAK-D-PoE and depthai-core. For the project I need the Depth and Color camera.
Reading the pipeline, displaying both images and processing the data within the images works fine when running the code within main(). Yet when I use a std::shared_ptr<dai:: DataOutputQueue> (or other dai datatypes) as a method-argument for a method in another (.cpp) code file it returns a segmentation error, as shown below.
Stack trace (most recent call last):
#5 Object "./Malum", at 0x557f604067, in
#4 Object "/lib/aarch64-linux-gnu/libc.so.6" , at 0x7f813226df, in __libc_start_main
#3 Object "./Malum", at 0x557f603237, in
#2 Object "./Malum", at 0x557f61c64b, in
#1 Object "./Malum", at 0x557f61b8db, in
#0 Object "./Malum", at 0x557f61afc7c, in
Segmentation fault (Address not mapped to object [0xf8])
Segmentation fault (core dumped)
Is it possible to use dai datatypes as method-arguments for methods in another code file?
example:
main():
#include "depthai/depthai.hpp"
#include "utility.hpp"
int main(){
dai::Pipeline pipeline;
auto monoLeft = pipeline.create<dai::node::MonoCamera>();
auto monoRight = pipeline.create<dai::node::MonoCamera>();
auto stereo = pipeline.create<dai::node::StereoDepth>();
auto spatialDataCalculator = pipeline.create<dai::node::SpatialLocationCalculator>();
//further setup for the camera
dai::Device device(pipeline, dai::UsbSpeed::SUPER);
auto depthQueue = device.getOutputQueue("depth", 8, false);
auto spatialCalcQueue = device.getOutputQueue("spatialData", 8, false);
while(true){
auto inDepth = depthQueue->get<dai::imgFrame();
cv::Mat depthFrame = inDepth->getFrame();
Camera.measure(depthFrame, spatialCalcQueue);
//Rest of code
}
}
in Camera.cpp:
void Camera::measure (cv::Mat depthFrame, std::shared_ptr<dai::DataOutputQueue> spatialCalcQueue){
//The following line causes segmentation fault
std::vector<dai::SpatialLocations> spatialData = spatialCalcQueue->get<dai::SpatialLocationCalculatorData>()->getSpatialLocations();
for(dai::SpatialLocations depthData : spatialData){
//Code to extract data from depth frame
}
//More code
}
Thank you!
I converted the python demo to c++, and this looks promising. At least now i can see the complete conveyor belt.
C++ code:
#include "depthai/depthai.hpp"
#include <iostream>
#include <opencv2/opencv.hpp>
int main(){
dai::Pipeline pipeline;
auto camRgb = pipeline.create<dai::node::ColorCamera>();
camRgb->setResolution(dai::ColorCameraProperties::SensorResolution::THE_12_MP);
camRgb->setInterleaved(false);
camRgb->setIspScale(1,5);
camRgb->setPreviewSize(812,608);
camRgb->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);
camRgb->setFps(25);
auto xoutIsp = pipeline.create<dai::node::XLinkOut>();
xoutIsp->setStreamName("isp");
camRgb->isp.link(xoutIsp->input);
auto manip = pipeline.create<dai::node::ImageManip>();
manip->setMaxOutputFrameSize(270000);
manip->initialConfig.setResizeThumbnail(300,300);
camRgb->preview.link(manip->inputImage);
dai::Device device(pipeline);
auto qIsp = device.getOutputQueue("isp");
while(true){
auto frame = qIsp->get<dai::ImgFrame>();
cv::imshow("test", frame->getCvFrame());
cv::waitKey(1);
}
return 0;
}
Okay I got it working, the problem was mainly with eclipse, as it (for some reason) forces to use c++11, even though I specifically told it to use c++14.
Also there where a few libraries that needed to be updated and linked correctly.
It works now, but I can't use eclipse to run/debug the program, this is a small inconvenience, but can be worked around.
Thank you for your help!
Hi all,
I have an OAK-D-PoE camera which I use in a OpenCV program. One reason why I chose the camera, was the FOV of 69x55 (HFOVxVFOV).
I got the camera working, but I just can't get the FOV right to use the 69x55 FOV (as mentioned on the product page https://shop.luxonis.com/products/oak-d-poe). Instead I get a FOV of 43.6x34.6, which is way to small for my software. How do I get to use the full FOV?
When I use the depth camera, the FOV does seem to match the depth FOV mentioned on the product page (72x49).
The code I use for the RGB camera is: (an edited version of rgb_preview.cpp)
#include <iostream>
// Includes common necessary includes for development using depthai library
#include "depthai/depthai.hpp"
int main() {
using namespace std;
// Create pipeline
dai::Pipeline pipeline;
// Define source and output
auto camRgb = pipeline.create<dai::node::ColorCamera>();
auto xoutRgb = pipeline.create<dai::node::XLinkOut>();
xoutRgb->setStreamName("rgb");
// Properties
camRgb->setPreviewKeepAspectRatio(false);
camRgb->setPreviewSize(1920,1080);
camRgb->setBoardSocket(dai::CameraBoardSocket::RGB);
camRgb->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P);
camRgb->setInterleaved(false);
camRgb->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);
// Linking
camRgb->preview.link(xoutRgb->input);
// Connect to device and start pipeline
dai::Device device(pipeline, dai::UsbSpeed::SUPER);
cout << "Connected cameras: ";
for(const auto& cam : device.getConnectedCameras()) {
cout << cam << " ";
}
cout << endl;
// Print USB speed
cout << "Usb speed: " << device.getUsbSpeed() << endl;
// Output queue will be used to get the rgb frames from the output defined above
auto qRgb = device.getOutputQueue("rgb", 4, false);
while(true) {
auto inRgb = qRgb->get<dai::ImgFrame>();
// Retrieve 'bgr' (opencv format) frame
cv::imshow("rgb", inRgb->getCvFrame());
int key = cv::waitKey(1);
if(key == 'q' || key == 'Q') {
break;
}
}
return 0;
}
Hi Erik, thank you for your reaction!
I saw the dependency on c++ 14, and already am using it.
I checked this by printing the c++ standard, using:
int cppversion = __cplusplus;
std::cout << cppversion;
This resulted in 201402, which is c++14.
Could something else be the problem?
Hi all!
For an OpenCV project I am using an OAK-D-PoE camera, as substitution for an Intel RealSense D435.
The program is to be executed by an industrialised Nvidia Jetson AGX Xavier (Neousys NRU-120S), with PoE+ ports.
When I got the camera, I installed the python depthai library and ran the demo script, which worked. Though our project is coded in c++, so we need the depthai-core library.
So, I installed the library following the github repo: https://github.com/luxonis/depthai-core, and integrating the library to our c++ project in eclipse.
When I linked the depthai header file using #include "depthai/depthai.hpp" and tried to build the project I get 85 errors in the following file: /usr/local/include/depthai-shared/device/BoardConfig.hpp.
The errors are the following:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:36:58: error: expected identifier before ‘=’ token
enum Direction : std::int8_t { INPUT = 0, OUTPUT = 1 };
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:36:58: error: expected ‘}’ before ‘=’ token
/usr/local/include/depthai-shared/device/BoardConfig.hpp:36:58: error: expected unqualified-id before ‘=’ token
/usr/local/include/depthai-shared/device/BoardConfig.hpp:37:9: error: ‘Direction’ does not name a type; did you mean ‘Detector’?
Direction direction = Direction::INPUT;
~~~
Detector
/usr/local/include/depthai-shared/device/BoardConfig.hpp:46:14: error: expected unqualified-id before ‘)’ token
GPIO() = default;
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:47:24: error: expected ‘)’ before ‘direction’
GPIO(Direction direction) : direction(direction) {}
~~~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:48:24: error: expected ‘)’ before ‘direction’
GPIO(Direction direction, Level level) : direction(direction), level(level) {}
~~~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:49:24: error: expected ‘)’ before ‘direction’
GPIO(Direction direction, Level level, Pull pull) : direction(direction), level(level), pull(pull) {}
~~~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:50:24: error: expected ‘)’ before ‘direction’
GPIO(Direction direction, Mode mode) : mode(mode), direction(direction) {}
~~~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:51:24: error: expected ‘)’ before ‘direction’
GPIO(Direction direction, Mode mode, Pull pull) : mode(mode), direction(direction), pull(pull) {}
~~~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:53:37: error: ‘GPIO’ was not declared in this scope
std::unordered_map<std::int8_t, GPIO> gpio;
~
/usr/local/include/depthai-shared/device/BoardConfig.hpp:53:37: note: suggested alternative: ‘EIO’
std::unordered_map<std::int8_t, GPIO> gpio;
~~
EIO
/usr/local/include/depthai-shared/device/BoardConfig.hpp:53:41: error: template argument 2 is invalid
std::unordered_map<std::int8_t, GPIO> gpio;
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:53:41: error: template argument 5 is invalid
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ does not name a type
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: expected unqualified-id before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: expected ‘)’ before ‘&’ token
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: expected initializer before ‘nlohmann_json_t’
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ has not been declared
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: expected ‘,’ or ‘...’ before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: In function ‘void from_json(const json&, int)’:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘nlohmann_json_t’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: suggested alternative: ‘nlohmann_json_j’
/usr/local/include/depthai-shared/device/BoardConfig.hpp: At global scope:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ does not name a type
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: expected unqualified-id before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: expected ‘)’ before ‘&’ token
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: expected initializer before ‘nlohmann_json_t’
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ has not been declared
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: expected ‘,’ or ‘...’ before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: In function ‘void from_json(const json&, int)’:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: redefinition of ‘void from_json(const json&, int)’
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: ‘void from_json(const json&, int)’ previously defined here
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘nlohmann_json_t’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: note: suggested alternative: ‘nlohmann_json_j’
/usr/local/include/depthai-shared/device/BoardConfig.hpp: At global scope:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: redefinition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: previous definition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: redefinition of ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’ previously declared here
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:68:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ does not name a type
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: expected unqualified-id before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: expected ‘)’ before ‘&’ token
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: expected initializer before ‘nlohmann_json_t’
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ has not been declared
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: expected ‘,’ or ‘...’ before ‘&’ token
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: In function ‘void from_json(const json&, int)’:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: redefinition of ‘void from_json(const json&, int)’
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: ‘void from_json(const json&, int)’ previously defined here
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘nlohmann_json_t’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: note: suggested alternative: ‘nlohmann_json_j’
/usr/local/include/depthai-shared/device/BoardConfig.hpp: At global scope:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: redefinition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: previous definition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: redefinition of ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’ previously declared here
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:69:1: error: parse error in template argument list
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ does not name a type
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: In function ‘void to_json(nlohmann::json&, const int&)’:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘usb’ in ‘nlohmann_json_t’, which is of non-class type ‘const int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘watchdogTimeoutMs’ in ‘nlohmann_json_t’, which is of non-class type ‘const int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘watchdogInitialDelayMs’ in ‘nlohmann_json_t’, which is of non-class type ‘const int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘gpio’ in ‘nlohmann_json_t’, which is of non-class type ‘const int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘uart’ in ‘nlohmann_json_t’, which is of non-class type ‘const int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: At global scope:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ has not been declared
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: In function ‘void from_json(const json&, int&)’:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘usb’ in ‘nlohmann_json_t’, which is of non-class type ‘int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘watchdogTimeoutMs’ in ‘nlohmann_json_t’, which is of non-class type ‘int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘watchdogInitialDelayMs’ in ‘nlohmann_json_t’, which is of non-class type ‘int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘gpio’ in ‘nlohmann_json_t’, which is of non-class type ‘int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: request for member ‘uart’ in ‘nlohmann_json_t’, which is of non-class type ‘int’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp: At global scope:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: redefinition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: previous definition of ‘struct NOPMEMBER_TRAITS<T, typename std::enable_if<decltype (MatchType<T, <expression error> >())::value, void>::type>’
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai-shared/common/Point3f.hpp:7:0,
from /usr/local/include/depthai-shared/common/Extrinsics.hpp:6,
from /usr/local/include/depthai-shared/common/CameraInfo.hpp:4,
from /usr/local/include/depthai-shared/common/EepromData.hpp:7,
from /usr/local/include/depthai/device/CalibrationHandler.hpp:6,
from /usr/local/include/depthai/depthai.hpp:9,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: redefinition of ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:67:1: note: ‘template<class T> std::enable_if_t<decltype (MatchType<T, <expression error> >())::value, NOPMEMBER_TRAITS<T, void> > NOPGetExternalMemberTraits(T)’ previously declared here
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: error: ‘BoardConfig’ was not declared in this scope
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart);
^
/usr/local/include/depthai-shared/device/BoardConfig.hpp:70:1: note: suggested alternative:
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:18:8: note: ‘dai::BoardConfig’
struct BoardConfig {
~~~~~
In file included from /usr/local/include/depthai/device/DeviceBase.hpp:30:0,
from /usr/local/include/depthai/device/Device.hpp:14,
from /usr/local/include/depthai/depthai.hpp:10,
from Project_Malum.cpp:20:
/usr/local/include/depthai-shared/device/BoardConfig.hpp:72:1: error: expected declaration before ‘}’ token
} // namespace dai
^
Could someone help me to get the core library working, and help me find the problem?
Thank you in advance!