-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined symbol: _ZN2cv3MatC1Ev #2467
Comments
I noticed I have Cleaning up and using ... did not resolve this. |
And neither did building with the RS_USB backend. the rosdep/apt installed |
Hi @arpaterson If you install librealsense and the RealSense ROS wrapper together from packages with the wrapper's Method 1 instructions then the packages will be based on the RSUSB backend and not contain CUDA support. However, CUDA support accelerates just three types of function: color conversion, depth-color alignment and pointcloud. So unless you are setting align_depth to true or using the pointcloud filter, having CUDA support enabled in librealsense is unlikely to provide a performance benefit. At #2326 where the error undefined symbol: _ZN2cv3MatC1Ev occurred on a Jetson Xavier NX, a RealSense ROS user at #2326 (comment) suggested a solution that solved the error in that particular case. |
I am currently setting align_depth true, although I am unsure if I will continue to do that. This ROS project uses an AGX orin now, but should also run on a nano. |
Have you had the opportunity to try the solution at #2326 (comment) which states that it can work with RSUSB = false (native backend). Whilst CUDA support is not included when installing from packages with the ROS wrapper's Method 1 instructions, it is included if you build librealsense and the ROS wrapper separately (librealsense from Jetson packages or source code, the ROS wrapper from source code). Instructions for installing librealsense from packages on Jetson are at the link below. CUDA support is automatically included in the librealsense packages. If librealsense is built from source code with CMake then you can add CUDA support by including -DBUILD_WITH_CUDA=true in the CMake build instruction. |
I will try that shortly, however from today until the 18th I will not have the equipment. I will come back to this on my return |
Thanks very much @arpaterson for the update. I look forward to your next report. Good luck! |
To clarify: In the jetson instructions, we are referred to the ubuntu instructions for ubuntu20.04 the ubuntu guide suggests And then returning to the jetson instructions
Am I following that correctly? |
My interpretation of the instructions would be as follows.
The installation instructions state that libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev are necessary if you want to build the SDK with support for OpenGL-enabled graphical examples, otherwise the core SDK will be configured for a headless environment without a graphics display. |
OK, yes I picked that up after re-reading the instructions. I added: and modified:
But I still have this error when launching rs_rgbd. In the realsense2_camera build output everything looks normal except for:
It is the right track though, OpenCV is not being linked. My full realsense2_camera CMakeLists:
|
librealsense is built from source (realsense-viewer works) opencv4.5.0 is built from source Perhaps it is something to do with this? |
The RealSense ROS wrapper does not support an RGBD launch by default and support for it has to be installed first before using the wrapper's rs_rgbd.launch launch file. Can you confirm if you have installed RGBD support, please? It can be done on Noetic using the instruction below. sudo apt-get install ros-noetic-rgbd-launch |
Yes, I have installed rgbd-launch
Anthony Paterson
On 6. Sep 2022, at 06:38, MartyG-RealSense ***@***.***> wrote:
The RealSense ROS wrapper does not support an RGBD launch by default and support for it has to be installed first before using the wrapper's rs_rgbd.launch launch file. Can you confirm if you have installed RGBD support, please? It can be done on Noetic using the instruction below.
sudo apt-get install ros-noetic-rgbd-launch
|
It was established earlier in this discussion at #2467 (comment) that librealsense and the RealSense Viewer were working correctly on Jetson Orin. However, the ROS wrapper has the undefined symbol error when launching. As you suggest in the above link, it may be related to installing OpenCV 4.5.0 from source, since OpenCV installation is not a required step in the ROS wrapper install instructions. |
Hi @arpaterson Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Is it possible to reopen this? |
Yes, it is fine to re-open it if you wish to resume the case. |
Are there any requirements on opencv? The only thing I can see is the openGL support is not there "NO" in openCV build information.
|
Support for OpenGL graphics in librealsense on Jetson would be enabled by either building librealsense from source code with CMake and including the build term -DBUILD_GRAPHICAL_EXAMPLES=true, or building from packages and installing the 'librealsense-utils' package with the instruction sudo apt-get install librealsense2-utils A non-RealSense discussion at mdegans/nano_build_opencv#51 provides advice about building OpenCV on Jetson Nano with OpenGL support. |
I think I've solved this through a combination of
I don't have any clear learnings to share, but the problem is solved. For the record heres what I did
Additionally, I
It is possible that between having apt installed versions, workspace sourcing, etc that I was not running the compiled version of librealsense. Anyay, the changes to realsense-ros CMakeLists.txt works. |
Just before closing this, I see almost none, and low framerates when connected over xrdp, but that is expected. Connected to a monitor I see a solid 30FPS in rviz, up to 45 if uncapped. |
That's excellent news that you achieved a solution. Thanks so much for sharing the details with the RealSense ROS community! Below are some example figures for CPU vs GPU performance when using alignment with and without CUDA. The figures are a few years old but should provide a rough guide for expectations of reduction in CPU usage with CUDA. At a recent case at IntelRealSense/librealsense#10911 a RealSense ROS user who was checking whether librealsense's CUDA support was enabled reported that if the GPU was being utilized then it would be registered in nvtop. |
I will have a chance to look at nvtop this weekend.
If I do not see the expected resource use I will reopen, or open another issue.
Thank you again!
|
You are very welcome. I look forward to your next report. Good luck! |
Hi @arpaterson Do you have an update about this case that you can provide, please? Thanks! |
Case closed due to no further comments received. |
nothing further at this point. |
Hey, @arpaterson, I solved this problem by modifying the Cmake.txt file from the realsense2_camera package
|
I have done a source build of
realsense-ros
andlibrealsense
(native backend + CUDA, but SKIPPING the kernel patches) on a nvidia AGX Orin.It was suggested here that this might work.
I am getting
undefined symbol: _ZN2cv3MatC1Ev
when trying to launch.Output of
uname -a
Output with launching
rs_rgbd.launch
orrs_camera.launch
I think this might be related.
The text was updated successfully, but these errors were encountered: