I am trying to build zed_components in wsl2 running ubuntu 22.04.4 LTS to be used in IsaacSIM. I have successfully installed zedSDK 5.2.2 based on the following output:
admin@docker-desktop:/workspaces/isaac_ros-dev$ /usr/local/zed/tools/ZED_Explorer --version
Stereolabs ZED SDK Version : 5.2.2
Despite this, the build keeps failing citing an error about CAMERA_TYPE not being declaring. What do I need to do in order to build properly? My output is shown below:
admin@docker-desktop:/workspaces/isaac_ros-dev$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --packages-up-to zed_wrapper
Starting >>> zed_components
[Processing: zed_components]
--- stderr: zed_components
* ISAAC ROS Nitros transport is available
/workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp: In member function ‘bool stereolabs::ZedCameraOne::startCamera()’:
/workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp:778:44: error: no matching function for call to ‘sl::InputType::setFromSerialNumber(int&, sl::BUS_TYPE)’
778 | _initParams.input.setFromSerialNumber(_camSerialNumber, sl::BUS_TYPE::GMSL);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/zed/include/sl/CameraOne.hpp:76,
from /workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/include/zed_camera_one_component.hpp:23,
from /workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp:15:
/usr/local/zed/include/sl/Camera.hpp:1085:14: note: candidate: ‘void sl::InputType::setFromSerialNumber(unsigned int)’
1085 | void setFromSerialNumber(unsigned int camera_serial_number);
| ^~~~~~~~~~~~~~~~~~~
/usr/local/zed/include/sl/Camera.hpp:1085:14: note: candidate expects 1 argument, 2 provided
/usr/local/zed/include/sl/Camera.hpp:1095:14: note: candidate: ‘void sl::InputType::setFromSerialNumber(sl::String)’
1095 | void setFromSerialNumber(sl::String serial_number);
| ^~~~~~~~~~~~~~~~~~~
/usr/local/zed/include/sl/Camera.hpp:1095:14: note: candidate expects 1 argument, 2 provided
/workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp:780:73: error: ‘sl::CAMERA_TYPE’ has not been declared
780 | _initParams.input.setFromCameraID(_camId, sl::BUS_TYPE::GMSL, sl::CAMERA_TYPE::MONO);
| ^~~~~~~~~~~
gmake[2]: *** [CMakeFiles/zed_camera_one_component.dir/build.make:132: CMakeFiles/zed_camera_one_component.dir/src/zed_camera/src/zed_camera_one_component.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:192: CMakeFiles/zed_camera_one_component.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< zed_components [47.2s, exited with code 2]
Summary: 0 packages finished [47.6s]
1 package failed: zed_components
1 package had stderr output: zed_components
1 package not processed