Skip to content
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

{humble} WIP: ros-image-world fixes for Humble Kirkstone #1150

Open
wants to merge 60 commits into
base: kirkstone
Choose a base branch
from

Conversation

robwoolley
Copy link
Collaborator

@robwoolley robwoolley commented May 21, 2024

This is the latest revision to enable ignition and rviz2 to support building the turtlebot3 recipe on ROS Humble with
Yocto Kirkstone.

It requires meta-clang and meta-qt5. The following also needs to be added to local.conf:

DISTRO_FEATURES:append = " x11 opengl vulkan polkit"
PACKAGECONFIG:append:pn-clang = " libomp"
PACKAGECONFIG:append:pn-qtbase-native = " gui"
PACKAGECONFIG:append:pn-python3 = " tk"

Tested on Raspberry Pi 4 using the shell mode with this kas script found in the build branch of meta-ros:
oeros-kirkstone-humble-raspberrypi4-64.yml

Needs some work before I can merge this. I am just submitting this PR for additional feedback from people eager to support the Turtlebot3, rviz, or Ignition/Gazebo.

Upstream changes set PY_DEST so that the Python module is installed
in the correct directory.

These changes also now use Python3_SOABI. This variable is introduced
in CMake 3.26, but Kirkstone uses 3.22.3. Thus, we must supply
PYTHON_SOABI in the recipe.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The pid-controller dependency is no longer required.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The googletest recipe provides gtest in OpenEmbedded.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The identifer LGPL-3.0+ has been deprecated in favour of
LGPL-3.0-or-later.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
This is the latest version supported in ROS 2 Humble.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The libfyaml receipe is needed by mrpt2.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add nanogui recipe as a dependency for mrpt2.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Receipe does not yet build.  It currently fails on finding TrueType
fonts:
    Could not find ENTYPO_TTF_FILE using the following files: entypo.ttf

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add recipe for jxrlib for freeimage, ogre-next, Gazebo and others.

Using Debian as the upstream source including additional patches.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
This version is being backported from scarthgap.

The tiff recipe is used by gdal, openscenegraph, and freeimage.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The freeimage recipe is used by ogre, ogre-next, ignition, and Gazebo.

Debian is used as the upstream source including patches.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
This recipe is required by warehouse-ros-mongo which uses mongodb.

Debian is being used as the upstream source including patches.

Additional patches were required to provide bitbake variables to
the Scons build system.  Fixes to the Scons SConstruct file were
also required to use Python3.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add openexr as a dependency for freeimage and ogre.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add gts as a dependency for Gazebo and Ignition.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Python3 colorcet is required by caret-analyze. Colorcet also depends
on param and pyct.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
We can't use CMake's find_library() macro to find libm in OpenEmbedded
when building native recipes.  CMake is intentionally configured
to not look in the host library paths.

As a result, we must ensure that CMake is provided with a suitable
default value for the name of the math library.

Upstream-Status: Pending

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add sdformat9 for Ignition or Gazebo recipes that require the older version.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add sdformat12 for Ignition or Gazebo recipes that require the newer version.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The imath package is a dependency of openexr.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add CMake support for Qt5 and limit ignition-gui6 as a build
dependency that doesn't require building natively.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@whni
Copy link

whni commented May 21, 2024

@robwoolley amazing work!

I am seeing this branch is on top of kirkstone-next and you are going to merge it back to krikstone. Could I know the difference between kirkstone-next and kirkstone? Thank you!

@whni
Copy link

whni commented May 21, 2024

Tried out this PR and seeing these issues on my dev machine:

Ogre recipe is upgraded to 14.2.5 and the imgui issue is reolved. However, there show some warning about version mismatch:

WARNING: preferred version 1.12.12 of ogre not available (for item ogre)
WARNING: versions of ogre available: 14.2.5
WARNING: preferred version 1.12.12 of ogre not available (for item ogre)
WARNING: versions of ogre available: 14.2.5
WARNING: preferred version 1.12.12 of ogre not available (for item ogre-dev)
WARNING: versions of ogre available: 14.2.5

When trying to build rviz-rendering recipe, it throws a header missing error in an ogre related file. Not sure if this is related to the version mismatch above.

| /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/core2-64-robotpi-linux/rviz-rendering/11.2.12-1-r0/recipe-sysroot/usr/include/OGRE/RenderSystems/GL/OgreGLPrerequisites.h:60:10: fatal error: glad/glad.h: No such file or directory
|    60 | #include <glad/glad.h>
|       |          ^~~~~~~~~~~~~
| compilation terminated.

I remember the previous ogre version was v1.12.12 and imgui was v1.79.

Here are my layers:

meta-clang           = "kirkstone:312ff1c39b1bf5d35c0321e873417eb013cea477"
meta-networking      
meta-oe              
meta-python          = "kirkstone:8bb16533532b6abc2eded7d9961ab2a108fd7a5b"
meta-qt5             = "kirkstone:644ebf220245bdc06e7696ccc90acc97a0dd2566"
meta-ros-common      
meta-ros2            
meta-ros2-humble     = "kirkstone-humble-world-fixes:403970d6c16f0bd1d56237e0c570899d0e842ca1"
meta                 = "kirkstone:26a878cbfbb3bc7a6e892e105577ebf8138ce150"

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@robwoolley
Copy link
Collaborator Author

Hi @whni,

It's actually based on "kirkstone", however "kirkstone" and "kirkstone-next" both have the same commit at the moment, which is why both are listed under the "Signed-off-by" line on this page: 9a857af

The -next branches contain commits that are pending being merged into their corresponding unsuffixed branches. The commit history on these branches may get rewritten as patches are tested and revised. The -next branches are essentially a preview or a staging area for merging work where it can go through automated builds, etc before being merged in. Once I merge into the main branches (eg. kirkstone) I do not rewrite commits or do anything that would stop a fast forward merge from happening if someone did "git pull".

The error you saw was related to me failing to submit the ogre recipe for 1.12.12. I have added it to the PR: 602fa71

Hopefully that fixes the problem you saw. Thanks for reporting it!

Regards,
Rob

@whni
Copy link

whni commented May 21, 2024

Hi @robwoolley

Thanks for the quick fix!

Other than the ogre issue, I also need these patches to get the build correctly working on raspberry pi 4:

  1. ignition-cmake2-vendor_%.bbappend
    ROS_EXEC_DEPENDS:remove = "${ROS_UNRESOLVED_DEP-ignition-cmake2}"
  2. slam-toolbox_%.bbappend
    ROS_EXEC_DEPENDS:remove = "ceres-solver"
  3. urdf_%.bbappend
    ROS_EXEC_DEPENDS:append = " urdf-parser-plugin"

1 and 2 resolve errors during rootfs build step, while 3 resolves some runtime error such as:

[robot_state_publisher-1] terminate called after throwing an instance of 'pluginlib::ClassLoaderException'
[robot_state_publisher-1]   what():  package 'urdf_parser_plugin' not found, searching: [/usr]

@whni
Copy link

whni commented May 22, 2024

Btw, did you ever test bitbake usb-cam?

I am seeing the error like this:

/src/ros2/usb_cam_node.cpp.o -c /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/src/ros2/usb_cam_node.cpp
| In file included from /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/include/usb_cam/usb_cam.hpp:50,
|                  from /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/include/usb_cam/usb_cam_node.hpp:45,
|                  from /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/src/ros2/usb_cam_node.cpp:34:
| /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/include/usb_cam/formats/mjpeg.hpp: In constructor 'usb_cam::formats::MJPEG2RGB::MJPEG2RGB(const usb_cam::formats::format_arguments_t&)':
| /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/usb-cam/0.8.0-1-r0/git/include/usb_cam/formats/mjpeg.hpp:88:35: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
|    88 |     m_avcodec(avcodec_find_decoder(AVCodecID::AV_CODEC_ID_MJPEG)),
|       |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|       |                                   |
|       |                                   const AVCodec*
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.

Remove the runtime dependency on ignition-cmake2-vendor.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Remove runtime dependency on ceres-solver.  It provides source code
which is not required at runtime.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The urdf package needs the urdf-parser-plugin at runtime.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The AVCodec type is const in newer releases of ffmpeg.  Backporting
an upstream fix to usb-cam resolves a build failure.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@robwoolley
Copy link
Collaborator Author

@whni I have made the changes you suggested. Let me know if you would like me to give you credit for the fixes. If so, please let me know what name and email address to use.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
These recipes are dependencies for build tools used to build ignition.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The libdeflate library is needed for ignition-common4-native.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The branches listed in the generated recipes have been deleted upstream.
This means that the commit ids are orphaned and don't have an associated
branch.

However, a duplicate repository named game_controller_spl-release still
has the branches intact. Using bbappend to set the SRC_URI allows the
do_fetch task to succeed.

Missing build dependencies are also added to
game-controller-spl-interfaces matching the fix required for other
interface recipes.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@whni
Copy link

whni commented May 24, 2024

@whni I have made the changes you suggested. Let me know if you would like me to give you credit for the fixes. If so, please let me know what name and email address to use.

Hi @robwoolley it's fine. So glad that I can contribute to this project. Btw, we are planning a new project so hope we could cooperate in a long term :)

@whni
Copy link

whni commented May 26, 2024

Hi @robwoolley

Reporting another issue when bitbake moveit package. Please see the attached moveit_build_fail.log
for full log

For the rosidl-adapter error, we can add it to build dependency of moveit-setup-framework recipe. However, I have no idea on the following errors. Thanks a lot if you could take a look

| -- rviz_ogre_vendor::RenderSystem_GL for IMPORTED_LOCATION_RELEASE: _render_system_gl_static_library_abs-NOTFOUND
| -- rviz_ogre_vendor::RenderSystem_GL for IMPORTED_LOCATION_DEBUG: _render_system_gl_static_library_abs-NOTFOUND
| CMake Warning at /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/lib/cmake/Qt5/Qt5Config.cmake:7 (message):
|   SkippingbecauseOE_QMAKE_PATH_EXTERNAL_HOST_BINSisnotdefined
| Call Stack (most recent call first):
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_common/cmake/rviz_common-extras.cmake:30 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_common/cmake/rviz_commonConfig.cmake:41 (include)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/moveit_ros_visualizationConfig.cmake:41 (include)
|   CMakeLists.txt:13 (find_package)
| 
| 
| CMake Warning at /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/lib/cmake/Qt5/Qt5Config.cmake:7 (message):
|   SkippingbecauseOE_QMAKE_PATH_EXTERNAL_HOST_BINSisnotdefined
| Call Stack (most recent call first):
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_rendering/cmake/rviz_rendering-extras.cmake:30 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_rendering/cmake/rviz_renderingConfig.cmake:41 (include)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_common/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_common/cmake/rviz_commonConfig.cmake:41 (include)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/moveit_ros_visualizationConfig.cmake:41 (include)
|   CMakeLists.txt:13 (find_package)
| 
| 
| CMake Warning at /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/lib/cmake/Qt5/Qt5Config.cmake:7 (message):
|   SkippingbecauseOE_QMAKE_PATH_EXTERNAL_HOST_BINSisnotdefined
| Call Stack (most recent call first):
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_default_plugins/cmake/rviz_default_plugins-extras.cmake:30 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/rviz_default_plugins/cmake/rviz_default_pluginsConfig.cmake:41 (include)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
|   /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/share/moveit_ros_visualization/cmake/moveit_ros_visualizationConfig.cmake:41 (include)
|   CMakeLists.txt:13 (find_package)
| 
| 
| CMake Warning at /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:6 (message):
|   SkippingbecauseOE_QMAKE_PATH_EXTERNAL_HOST_BINSisnotdefined
| Call Stack (most recent call first):
|   CMakeLists.txt:14 (find_package)
| 
| 
| CMake Warning at /home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/recipe-sysroot/usr/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:6 (message):
|   SkippingbecauseOE_QMAKE_PATH_EXTERNAL_HOST_BINSisnotdefined
| Call Stack (most recent call first):
|   CMakeLists.txt:15 (find_package)
| 
| 
| CMake Error at CMakeLists.txt:25 (qt5_wrap_cpp):
|   Unknown CMake command "qt5_wrap_cpp".
| 
| 
| -- Configuring incomplete, errors occurred!
| See also "/home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/build/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/weihengni/Projects/robotpi/build/../layers/meta-ros/meta-ros2-humble/generated-recipes/moveit/moveit-setup-framework_2.5.5-1.bb:do_configure) failed with exit code '1'

@whni
Copy link

whni commented May 27, 2024

For the moveit-setup-framework issue,

I can resolved by adding these:

ROS_BUILDTOOL_DEPENDS += " \
    rosidl-cmake-native \
"

EXTRA_OECMAKE += "-DOE_QMAKE_PATH_EXTERNAL_HOST_BINS='${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}'"

inherit qmake5

However, inherit qmake5 has to be placed before inherit ros_${ROS_BUILD_TYPE} in the original recipe. Otherwise it will throw an error like

| ls: cannot access '/home/weihengni/Projects/robotpi/build/BUILD-robotpi-humble-kirkstone/work/cortexa72-robotpi-linux/moveit-setup-framework/2.5.5-1-r0/git/*.pro': No such file or directory

@robwoolley do you know how to let inherit qmake5 take effect in the bbappend file before inherit ros_${ROS_BUILD_TYPE} in the original recipe? Otherwise, we may need you to directly patch the original recipe. Thank you so much!

@whni
Copy link

whni commented May 27, 2024

I also see some build error about moveit-setup-srdf-plugins. You could try to build moveit package then can find all the errors

|   Could not find a package configuration file provided by "ament_cmake_ros"
|   with any of the following names:
| 
|     ament_cmake_rosConfig.cmake
|     ament_cmake_ros-config.cmake

Update:
these recipes all have the similar issues:
1. moveit-setup-app-plugins_2.5.5-1.bb
2. moveit-setup-assistant_2.5.5-1.bb
3. moveit-setup-controllers_2.5.5-1.bb
4. moveit-setup-core-plugins_2.5.5-1.bb
5. moveit-setup-framework_2.5.5-1.bb
6. moveit-setup-srdf-plugins_2.5.5-1.bb

All need the above patch:

EXTRA_OECMAKE += "-DOE_QMAKE_PATH_EXTERNAL_HOST_BINS='${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}'"

inherit qmake5

and add some missing ROS_BUILDTOOL_DEPENDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants