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 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

@whni
Copy link

whni commented Jul 11, 2024

Hi @robwoolley will these fix been merged to kirkstone?

@robwoolley
Copy link
Collaborator Author

Hi @whni, yes I plan to merge the fixes to kirkstone after the work has been completed for rolling. That work is nearly complete, you can check out the notes from the working group meeting for details: https://docs.google.com/document/d/1LqUjcu6vdlqVJO62SreCyjzddNDZhfO2n-7qYghY_cQ/edit#heading=h.3vrwbu9vio04

@whni
Copy link

whni commented Jul 24, 2024

Checking in this topic? Any update?

@whni
Copy link

whni commented Jul 30, 2024

@robwoolley Please let us know whenever this is merged. Thank you!

@whni
Copy link

whni commented Aug 12, 2024

Hi @robwoolley could we know if this pull request will be merged soon? We need to decided if we can stick on humble. Thank you so much!

@whni
Copy link

whni commented Aug 22, 2024

Looks like no one is looking at this pull request now? @robwoolley

@robwoolley
Copy link
Collaborator Author

Hi @whni,

I think this PR still needs work before it can be merged. I haven't tried running anything on the hardware yet. My focus has been on the Rolling and Styhead combo first since it is expected to be "unstable" then will backport any work to the "stable" Humble and Kirkstone combination.

I have been short on free time over the summer to make progress, but we have been making headway on getting CI/CD builds going for regression testing of all combinations. (Check out the working group minutes for the latest status: https://docs.google.com/document/d/1LqUjcu6vdlqVJO62SreCyjzddNDZhfO2n-7qYghY_cQ/edit)

Have you been able to get graphics up and running on the Raspberry Pi hardware? It would be a huge help to know that the existing recipes were working on the hardware.

Regards,
Rob

@whni
Copy link

whni commented Aug 23, 2024

Hi @robwoolley

We didn't test all graphics components but just need those to be compiled successfully. On RPi 4, we are building our own image that includes ros-image-world. At least turtlebot bringup/cartographer are running good and rviz window is working

@whni
Copy link

whni commented Sep 18, 2024

@robwoolley Hi, we are still waiting for this pull request on humble. Could we expect this to happen soon?

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.

2 participants