I am facing issues while trying to install the zed-ros2-examples on my Jetson device following the official instructions. After cloning the repository and updating the dependencies, I encounter the following errors during the process:
rosdep Error: When running rosdep install --from-paths src --ignore-src -r -y, I receive the following error:
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
zed_robot_integration: Cannot locate rosdep definition for [scout_description]
Continuing to install resolvable dependencies...
Despite this error, rosdep continues and claims that all required rosdeps were installed successfully.
Build Errors: During the build process with colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release,
I encounter the following errors:
In file included from /home/jetson/ros2_ws/src/zed-ros2-examples/examples/zed_aruco_localization/src/component/src/zed_aruco_localization_component.cpp:24:
/home/jetson/ros2_ws/src/zed-ros2-examples/examples/zed_aruco_localization/src/component/include/aruco.hpp:87:18: error: redefinition of ‘class cv::aruco::Dictionary’
...
In file included from /usr/include/opencv4/opencv2/objdetect/aruco_dictionary.hpp:25:27: note: previous definition of ‘class cv::aruco::Dictionary’
The errors seem to be related to conflicts between the aruco.hpp file included in the zed_aruco_localization package and the existing OpenCV4 aruco headers. This leads to redefinition errors for classes like cv::aruco::Dictionary, cv::aruco::DetectorParameters, and others.
I have tried updating all dependencies and rebuilding the workspace, but the issue persists. Unfortunately, as a new user, I am unable to attach the error.txt file with the full error log. Could anyone provide guidance on how to resolve these conflicts and the rosdep error?
The build fails with this error, and the zed_rgb_convert package does not compile successfully. Additionally, I am also getting warnings related to missing paths in the environment variables like AMENT_PREFIX_PATH and CMAKE_PREFIX_PATH.
I have tried updating all dependencies and rebuilding the workspace, but the issue persists. Unfortunately, as a new user, I am unable to attach the error.txt file with the full error log. Could anyone provide guidance on how to resolve these issues?
As for the issues with OpenCV, I followed the instructions from this guide to install OpenCV on my Jetson device. After the installation, when I run the command:
In my opinion, you broke the OpenCV configuration, so the libraries are not correctly detected.
I recommend you uninstall OpenCV, both the versions you installed (Jetpack and sources).
Then you should uninstall ROS2.
Now you can install OpenCV with the method you prefer and then install ROS 2 again which will detect the installed OpenCV libraries and adapt to the active configuration.
Hi @ErayBe
unfortunately, this is a custom configuration of the Jetson, and finding a fix is out of the scope of our support. You can try to search and eventually open a thread on the NVIDIA Developer forum.
In any case, I recommend you reflash your Jetson with the SDK Manager application, being careful to not install OpenCV (you can unselect it from the list of the installed packages).
Then you can install the CUDA version you prefer and then ROS 2.
I was able to resolve the issue by reflashing my Jetson device and selecting all the tools during the installation process (choosing all the available radiobuttons).