Cross-compile custom ROS2 package for Yocto #bitbake
Dear Sirs, I have a hard time to cross-compile and to properly include the custom ROS2 foxy package into the Yocto image. I properly added meta-ros layer and ROS2 foxy distro to our Yocto build by following instructions from here (Sanity Tests pass successfully). I wanted to use a I used tips and tricks from here to create ROS2 recipes with the
However, when I tried to build the package with the
The issue is around Thanks in advance for your time and efforts. Cheers,
|
|
Matthias Schoepfer
Hi Bojan, On 11/8/21 3:39 PM, bojankoce wrote:
I guess this is not the right address. Just saying.
You are missing a DEPENDS, ros_ament_cmake does not add it. Try adding ament-cmake-native to your DEPENDS and see if that works (or give you a different error message, since I guess you might be missing out more stuff).
Regards, Matthias
|
|
Hello, Matthias.
I added `amente-cmake-native` inti DEPENDS and, indeed, I got a different error this time: Initialising tasks: 100% |######################################################################################################| Time: 0:00:02I needed to append the following lines at the end of my-first-yocto-pkg_git.bb file in order to resolve it:
FILES_${PN} += "/usr/share/my_first_yocto_pkg/*"
|
|
In addition to the above changes, I also included instructions inside
conf/local.conf file to install my first ROS2 package:
After that, I was able to bitbake the complete Yocto image, put it on the SD card, and boot the Yocto on my devkit. After sourcing ros2_setup.sh script, I entered:ros2 pkg listcommand to list all available ROS2 packages on the system. my_first_yocto_pkg package was on the list so I was happy and excited! I wanted to do the final touch and launch the talker node from the packet with: ros2 run my_first_yocto_pkg talker However, I got the info that No executable is found ! What the heck! Do you have any idea what I did wrong in the whole process? Appreciate your efforts! Sincerely, Bojan.
|
|
Matthias Schoepfer
Hi Bojan, you do not need the additional FILES:${PN} if your package is properly named (i.e. cmake project name same as recipe same as package). I have no clue why the executable is not found, did you source the environment before?! Regards, Matthias
On 11/10/21 8:37 PM, bojankoce wrote:
In addition to the above changes, I also included instructions inside
|
|
Hello, Matthias.
It seems the issue was around naming. Now it works fine even without
FILES:${PN} at the end of .bb file. I am now good to move forward. Thank you very much for your assistance. It is really appreciated. Sincerely, Bojan.
|
|