ROS2 Wrapper Build Error

Hello, I’m currently trying to download and build the ROS2 wrapper by following the instructions on the guide on this page. I’m running Ubuntu 20.04, ROS2 Foxy, and Jetpack 5.1.2. The xacro package does not build when I go to build the workspace. Are there suggested next steps? I’m not running humble because Jetpack 6 has yet to be released and support for that SDK isnt out. Thanks!

The robot localization package also fails. Are there any other additional resources I can use to help get my zedx camera running on my Orin Nano?

Hi @alboron18
Please post the error messages

Here are the error messages i get when i run ‘colcon build --symlink-install’

Starting >>> diagnostic_updater
Starting >>> angles
Starting >>> geographic_msgs
Starting >>> nmea_msgs
Starting >>> zed_interfaces
Starting >>> xacro
Finished <<< angles [3.56s]
Starting >>> diagnostic_aggregator
— stderr: xacro
CMake Error at /opt/ros/foxy/share/ament_cmake_python/cmake/ament_python_install_package.cmake:34 (message):
ament_python_install_package() called with unused arguments:
SCRIPTS_DESTINATION;lib/xacro
Call Stack (most recent call first):
/opt/ros/foxy/share/ament_cmake_python/cmake/ament_python_install_package.cmake:28 (_ament_cmake_python_install_package)
CMakeLists.txt:10 (ament_python_install_package)


Failed <<< xacro [2.74s, exited with code 1]
Aborted <<< diagnostic_aggregator [0.48s]
Aborted <<< diagnostic_updater [4.37s]
Aborted <<< nmea_msgs [3.41s]
Aborted <<< geographic_msgs [3.73s]
Aborted <<< zed_interfaces [3.07s]

Summary: 1 package finished [9.81s]
1 package failed: xacro
5 packages aborted: diagnostic_aggregator diagnostic_updater geographic_msgs nmea_msgs zed_interfaces
1 package had stderr output: xacro
9 packages not processed

Additionally, running ‘colcon build --symlink-install --package-select robot_localization’ gives the following error as well:

Starting >>> robot_localization
— stderr: robot_localization
CMake Error at CMakeLists.txt:78 (rosidl_get_typesupport_target):
Unknown CMake command “rosidl_get_typesupport_target”.


Failed <<< robot_localization [4.76s, exited with code 1]

Summary: 0 packages finished [9.01s]
1 package failed: robot_localization
1 package had stderr output: robot_localization

Hi @alboron18
You have many missing packages and dependencies.
I recommend you clean the build folders of your ROS 2 workspace
rm -r build install log
and follow the installation guide of the wrapper step-by-step:

Thanks for the help! I did that but are still running into similar issues. When I ran ‘rosdep install --from-paths src --ignore-src -r -y # install dependencies’ I get the following message:

rosdep install --from-paths src --ignore-src -r -y # install dependencies
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
zed_wrapper: Cannot locate rosdep definition for [xacro]
zed_components: Cannot locate rosdep definition for [robot_localization]
Continuing to install resolvable dependencies…
#All required rosdeps installed successfully

When Colcon build gets run following this, the following occurs on the terminal:
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --parallel-workers $(nproc)
Starting >>> zed_interfaces
[Processing: zed_interfaces]
Finished <<< zed_interfaces [42.4s]
Starting >>> zed_components
— stderr: zed_components
CMake Error at CMakeLists.txt:129 (find_package):
By not providing “Findnmea_msgs.cmake” in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
“nmea_msgs”, but CMake did not find one.

Could not find a package configuration file provided by “nmea_msgs” with
any of the following names:

nmea_msgsConfig.cmake
nmea_msgs-config.cmake

Add the installation prefix of “nmea_msgs” to CMAKE_PREFIX_PATH or set
“nmea_msgs_DIR” to a directory containing one of the above files. If
“nmea_msgs” provides a separate development package or SDK, be sure it has
been installed.

Do you get errors when running the command
$ sudo apt install ros-foxy-nmea-msgs
to install the missing dependency?

Furthermore these errors

zed_wrapper: Cannot locate rosdep definition for [xacro]
zed_components: Cannot locate rosdep definition for [robot_localization]

mean that you have not correctly updated the package definition:
sudo apt update && rosdep update

Hi Myzhar,
I have the same problem when I was installing Zed ros2 wrapper on my Jetson.
I got the ZED sdk for Jetpack 4.6.1 successfully installed, and here is the output

I follow your instruction
$ sudo apt install ros-foxy-nmea-msgs
to install the nmea-msgs, here is the output:

jetson@nano:~/ros2_ws$ sudo apt install ros-foxy-nmea-msgs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-foxy-nmea-msgs is already the newest version (2.0.0-1focal.20230527.054029).
The following packages were automatically installed and are no longer required:
  gir1.2-goa-1.0 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But when I try to use rosdep update as you mentioned, I found lots of error:

jetson@nano:~/ros2_ws$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
ERROR: error loading sources list:
	The read operation timed out

Can you tell me how to fix it? Now When I try to build the zed ros2 wrapper there are still the same error on nmea_msgs

Thanks!