Adding ROS to Petalinux - which recipes to include?
Adding ROS to Petalinux - which recipes to include?
Hi,
For those who don't know petalinux is a xilinx tool that uses yocto and OpenEmbedded as base to generate embedded linux images.
I am having trouble adding ros melodic to my petalinux image. What i did so far was:
- downloaded the zeus branch of meta-ros from the github repo to <petalinux-directory>/project-spec/meta-ros
- renamed the following directories to match the layer.conf dependencies:
- meta-ros-common -> ros-common-layer
- meta-ros1 -> ros1-layer
- meta-ros1-melodic -> ros1-melodic-layer
- Run petalinux-config → Yocto Settings → User Layers.
- Enter the following:
- ${proot}/project-spec/meta-ros/ros-common-layer
- ${proot}/project-spec/meta-ros/ros1-layer
- ${proot}/project-spec/meta-ros/ros1-melodic-layer
- Save and exit.
- Add the following line in <plnx-proj-root>/project-spec/meta-user/conf/user-rootfsconfig.
- CONFIG_ros_1.14.8-1
- Run petalinux-config -c rootfs. Select user packages → ros. Enable it, save and exit.
- Run petalinux-build.
- Move the generated image to a SD card and boot.
With the previous procedure, i included the ros_1.14.8-1.bb recipe which only has some of ros functionalities (it doesn't have roscore for example - see attachment for the contents of /opt/ros/melocic).
So, my question is which is the correct recipe to include? Is any of the steps mentioned wrong?
Note: i tried other recipes like: packagegroup-ros-world, packagegroup-ros1-comm, packagegroup-ros-turtlebot3-core, packagegroup-ros1-industrial-core, packagegroup-ros-turtlebot3-extended, packagegroup-ros-world-melodic.
But this recipes returned errors like:
ERROR: Nothing PROVIDES 'mesa' (but /home/simon/Workspace/Dev/MarsEB1XU3/Linux/Images/SD_BSP_RD_grayTDC_UIO_ROS/project-spec/meta-ros/ros1-melodic-layer/generated-recipes/moveit/moveit-ros-perception_1.0.2-1.bb DEPENDS on or otherwise requires it)
mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
NOTE: Runtime target 'industrial-trajectory-filters' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']
NOTE: Runtime target 'packagegroup-ros1-industrial-core' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-ros1-industrial-core', 'industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-ros1-industrial-core', 'industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project
ERROR: Nothing RPROVIDES 'python-pycryptodomex' (but /home/simon/Workspace/Dev/MarsEB1XU3/Linux/Images/SD_BSP_RD_grayTDC_UIO_ROS/project-spec/meta-ros/ros1-melodic-layer/generated-recipes/ros-comm/rosbag_1.14.5-1.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'python-pycryptodomex' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python-pycryptodomex']
NOTE: Runtime target 'rosnode' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']
NOTE: Runtime target 'packagegroup-ros1-comm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-ros1-comm', 'rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-ros1-comm', 'rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project
LINUX BOOT:
root@EB1_MA-XU3-3EG-2I-D11:~# source /opt/ros/melodic/setup.bash
root@EB1_MA-XU3-3EG-2I-D11:~# which roscore
root@EB1_MA-XU3-3EG-2I-D11:~# which ros
root@EB1_MA-XU3-3EG-2I-D11:~# rospack
[rospack] Error: no command given. Try 'rospack help'
root@EB1_MA-XU3-3EG-2I-D11:~# rospack help
USAGE: rospack <command> [options] [package]
Allowed commands:
help
cflags-only-I [--deps-only] [package]
cflags-only-other ...