ros / meta-ros

OpenEmbedded Layers for ROS 1 and ROS 2
MIT License
382 stars 251 forks source link

Python packages missing #1172

Closed andy9a9 closed 2 months ago

andy9a9 commented 3 months ago

Dear community!

I've found some missing packages during ROS (iron) integration. I built the Yocto's SDK with ROS layer and installed it on Ubuntu 22.04 with the same ROS version.

I've just fixed it explicitly installing a nativesdk- packages' variants, but I don't think so, that's a good way.

# nativesdk-packagegroup-sdk-host.bbappend
RDEPENDS:${PN} += " \
    nativesdk-python3-catkin-pkg \
    nativesdk-python3-empy \
    nativesdk-python3-lark-parser \
    nativesdk-python3-pyparsing \
"

Now the question is, why this happened. From the callstack I can see, that the the correct python interpreter is used /home/project/ros/sdk/sysroots/x86_64-oesdk-linux/usr/bin/python3.10, but he should search in site-packages of target sysroot, nope?

So what's really wrong here? Thanks

robwoolley commented 3 months ago

There has been a lot of good work around building Yocto SDKs. Most of the people involved have used BBCLASSEXTEND = "native nativesdk" to ensure that all necessary packages are included.

I suspect that the SDK intentionally avoids using the Python modules for the target (and possibly avoids the host Python modules as well). Definitely something worth looking into. It is the direction I want to go next once I get ros-image-world building regularly with CI.