How to add OpenCV functions in CarlaUE4? #9352
Unanswered
yonglei123
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I added the OpenCV library functions in the CMakeLists.txt in LibCarla, and modified CarlaCameraPublisher.cpp and CarlaCameraPublisher.h. The libcarla_fastdds.a compiled successfully.
In Carla.Build.cs, I added:
PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libopencv_core.so");
PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libopencv_imgproc.so");
PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so");
PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libopencv_highgui.so");
But when compiling with make launch ARGS="--ros2 --editor-flags='--ros2'", I get the following error:
[68/77] Link (lld) libUE4Editor-HoudiniEngineEditor.so
20 warnings generated.
[69/77] Link (lld) libUE4Editor-Carla.so
ld.lld: error: undefined symbol: cv::imshow(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cv::_InputArray const&)
Can anyone help me see what the problem is?
Beta Was this translation helpful? Give feedback.
All reactions