ArduPilot / ardupilot_gz

Tools for ArduPilot ROS2 integration and testing on ROS 2 humble
GNU General Public License v3.0
27 stars 19 forks source link

sdformat_urdf package error #52

Closed Sadufy2 closed 2 months ago

Sadufy2 commented 2 months ago

Ubuntu 20.04, ROS2 Humble, Gazebo Garden

Hey, so it seems i ran into a bit of a trouble

When i'm trying to execute the following code from the official Ardupilot documentation (https://ardupilot.org/dev/docs/ros2-gazebo.html), trying to install repositories into a ROS2 workspace to link up with gazebo

cd ~/ros2_ws
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/ros2_gz.repos --recursive src

https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/ros2_gz.repos

I'm getting the following error:

... === src/micro_ros_agent (git) ===

Already on 'humble' Your branch is up to date with 'origin/humble'.

=== src/ros_gz (git) ===

Already on 'humble' Your branch is up to date with 'origin/humble'.

=== src/sdformat_urdf (git) === Could not checkout ref 'ros2': fatal: invalid reference: ros2

Every other package was cloned correctly, however from what i can understand, the sdformat_urdf import fails because this repo https://github.com/ros/sdformat_urdf.git doesn't have a "ros2" branch anymore. And so, if i try to colcon build the project anyway, i'm getting the following error

Starting >>> ros_gz_interfaces Starting >>> ros_gz_sim Starting >>> micro_ros_agent Starting >>> ardupilot_gazebo Starting >>> ardupilot_msgs Starting >>> ardupilot_gz_description Starting >>> ardupilot_gz_gazebo Starting >>> sdformat_test_files Starting >>> ardupilot_gz_application Finished <<< ardupilot_gz_description [0.26s]
Finished <<< sdformat_test_files [0.27s]
Finished <<< ardupilot_gz_application [0.27s] Starting >>> sdformat_urdf Finished <<< micro_ros_agent [0.32s] Finished <<< ardupilot_gazebo [0.35s] Starting >>> ardupilot_sitl_models Finished <<< ardupilot_gz_gazebo [0.36s] Finished <<< ros_gz_sim [0.39s] Starting >>> ros_ign_gazebo Finished <<< ardupilot_sitl_models [0.16s]
Finished <<< ros_ign_gazebo [0.17s] --- stderr: sdformat_urdf
CMake Error at CMakeLists.txt:22 (find_package): By not providing "Findsdformat_vendor.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "sdformat_vendor", but CMake did not find one.

Could not find a package configuration file provided by "sdformat_vendor" with any of the following names:

sdformat_vendorConfig.cmake
sdformat_vendor-config.cmake

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

gmake: *** [Makefile:623: cmake_check_build_system] Error 1

Failed <<< sdformat_urdf [0.30s, exited with code 2] Aborted <<< ardupilot_msgs [0.60s] Aborted <<< ros_gz_interfaces [1.20s]

Summary: 9 packages finished [1.73s] 1 package failed: sdformat_urdf 2 packages aborted: ardupilot_msgs ros_gz_interfaces 1 package had stderr output: sdformat_urdf 13 packages not processed

What i did try to do was, download the same files from the humble branch and swap them out in the workspace, which seemed to solve the issue, however while building the `bringup' package my computer crashes so hard that the screen freezes, audio stops and doesn't react to any kind of input.

Thank you for any feedback in advance

srmainwaring commented 2 months ago

@Sadufy2 thanks for the report about the change in https://github.com/ros/sdformat_urdf.git. The humble branch should be suitable, we'll get that tested.

If I can't replicate the crash you are seeing we may need some further information about your system.

The ros2 branch corresponded to https://github.com/ros/sdformat_urdf/commit/c78c23ca6cc1e2562d803763f81450c947b7a81f. There is one additional update to the head of the humble branch: https://github.com/ros/sdformat_urdf/commit/9cec63e0f7102bd5809d1901e5c3e451b0aeb82f which updates the empy version. This should not cause a break, so there may be something else going causing your crash which is unrelated to the sdformat_urdf version.

Update