{humble} WIP: ros-image-world fixes for Humble Kirkstone
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.
@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!
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"
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: https://github.com/ros/meta-ros/commit/9a857afebc18e0f426d87226bd085727ea9ce4ae
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: 602fa71c2409f2a749703105f957082ecb924a94
Hopefully that fixes the problem you saw. Thanks for reporting it!
Regards, Rob
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:
- ignition-cmake2-vendor_%.bbappend
ROS_EXEC_DEPENDS:remove = "${ROS_UNRESOLVED_DEP-ignition-cmake2}" - slam-toolbox_%.bbappend
ROS_EXEC_DEPENDS:remove = "ceres-solver" - 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]
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.
@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.
@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 :)
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'
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!
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
Hi @robwoolley will these fix been merged to kirkstone?
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
Checking in this topic? Any update?
@robwoolley Please let us know whenever this is merged. Thank you!
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!
Looks like no one is looking at this pull request now? @robwoolley
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
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
@robwoolley Hi, we are still waiting for this pull request on humble. Could we expect this to happen soon?
Note to self: Refer to this thread for ogre and rviz_rendering fixes for Humble: https://github.com/ros/meta-ros/pull/1144#issuecomment-2625823671
Has anyone gotten Gazebo classic to run successfully on Humble? I have no problem building Gazebo and all deps using the recipe here, but I get the errors mentioned in this discussion with the shaders at runtime. It seems Gazebo classic was never made compatible with Ogre 1.12.
@graceagrace I haven't tried doing Gazebo Classic yet. I finished building Gazebo for Jazzy and Rolling: https://github.com/ros/meta-ros/tree/master-next
I am working on Humble now, however I will need to revisit the patches above. I'll keep you posted.
@graceagrace I have pushed my latest commits to build the perception and simulation variants for ROS 2 Humble and Yocto master branch to master-next: https://github.com/ros/meta-ros/tree/master-next I am still working on desktop and desktop-full for Humble.
The changes just add Ignition Fortress. I haven't tried Gazebo Classic yet, but I'm up for adding it. Out of curiosity, what is the use case for adding Gazebo Classic now that it is end-of-life? Is there anything we should be testing for to make sure it works?
Please let me know if there are any errors or omissions I have made in the patch sequence. I made sure to give you credit on the ogre fixes I merged from you. I tried to backport upstream fixes where I could. If there are any additional fixes I missed please point them out.
Thanks so much for your help with this. It is exciting to be close to having all the visualization and simulation tools working!
@robwoolley, many thanks for your effort on this! I'll find some time to test your branch in the next few days to double-check rviz builds and runs as expected, in particular.
The main use case for supporting running Gazebo Classic with ROS2 Humble is gazebo_ros2_control. With Gazebo Classic going EOL this January, this package isn't released to any ROS distro past Humble, but it is a very useful tool that we have recipes for in meta-ros. I am able to build the gazebo11 recipe on your branch in this PR without trouble, but I get the runtime errors mentioned above due to Gazebo Classic being incompatible with Ogre 1.12.12 (an issue admitted to by the maintainers, but never resolved - it seems the latest gazebo Debian packages are built against Ogre 1.9).
The annoyance here is that rviz requires Ogre 1.12.12, and maybe other viz packages (not sure). I spent a bit of time making a separate Ogre 1.9 recipe specifically for the purpose of building Gazebo Classic against it - I ran into a bunch of build annoyances with the newer, more aggressive compiler on scarthgap, but was eventually able to build the gazebo11 recipe on this branch. I started running into issues with the gazebo-ros recipes that have gazebo11 due to the outdated version of Ogre, though, and paused my effort there.
I see you had a patch for gazebo11 started that seems like it aimed to resolve some of the issues with the rendering system in the new version of Ogre, but I wasn't able to get the gazebo11 recipe building with that patch. My preference would be to get gazebo11 working with Ogre 1.12.12, but I wonder if the quickest path forward is to continue working with an Ogre 1.9 build and getting all the Gazebo recipes to build.
@graceagrace I spent some time trying to resolve some of the issues. I created a special "ogre19" recipe to allow one to build Gazebo Classic with the old version. You can see my PR here: https://github.com/ros/meta-ros/pull/1308
I did run into a problem with gazebo11 failing to build due to deprecated functions in Boost. Perhaps you already encountered that and have a fix?
Out of curiosity, have you considered using gz_ros2_control instead? (https://github.com/ros-controls/gz_ros2_control) I am not familiar with what differences may exist between gazebo_ros2_control and gz_ros2_control.
I just merged this patchset for Humble+Kirkstone into the kirkstone branch.
All supported combinations of Yocto (ie master (aka walnascar), styhead, scarthgap, and kirkstone) and ROS 2 (humble, jazzy, rolling) should allow desktop-full to build.