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

{ros2} Add required ROS2 SDK environment variables #1261

Draft
wants to merge 152 commits into
base: master-next
Choose a base branch
from

Conversation

sgstreet
Copy link

@sgstreet sgstreet commented Nov 20, 2024

This PR adds the following environment variable when the SDK is setup:

PYTHON_SOABI required to avoid setup failures with python packages
PYTHON3_NUMPY_INCLUDE_DIR required to using python opencv binding
PYTHONWARNINGS to suppress setuptool warmings
AMENT_SKIP_SHELL_PATH to prevent ament from prepending $OECORE_TARGET_SYSROOT/opt/ros/$ROS_DISTRO/bin to glocal PATH variable
PYTHONPATH to include the target site-packages to the python environment

If the Yocto enviroment variable ROS_SDK_UNIFY is not empty, $OECORE_TARGET_SYSROOT/opt/ros/$ROS_DISTRO/setup.bash or friends is source during SDK setup.

Ensure that the previous value of PYTHONPATH is preserved when
the ROS opt prefix Python site-packages directory is added.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The prefix-path file contains references to TMPDIR which causes
package QA warnings.  Disable the generation of the prefix-path files
as we presently are not using them to build on the target.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Duplicate workaround in setuptools3_legacy.bbclass but
customized for the ROS opt prefix.

Resolves problems in setuptools3 packages which add a redundant
directory (eg. /opt/ros/rolling/share/ament_package/ament_package)

Substitute mv for cp and rm to avoid condition where mv failed
when there was an existing directory with the same name.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add libfyaml recipe needed as a dependency for mrpt2.

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 optional dependency on octomap is necessary for building moveit.

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>
Add new recipes for suitesparse, leaving the older recipes if needed
by older ROS 2 distros.

Update the WORKDIR variable for old recipes to use git directory name.

The suitesparse-cholmod and suitesparse-spqr recipes had incorrect
version numbers that were ahead of the latest versions.  Reset the
versions to correspond to CMakeLists.txt in the latest releases.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
This removes suitesparse-metis as it is reportedly broken in the latest
version of ceres-solver in meta-openembedded.

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 new recipe for backward-ros and gz-tools2.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add new recipe as needed dependency for ipopt.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
New recipe required for libtiff, openexr, and gdal.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Add gts recipe for gz-common5.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Recipe was moved to meta-ros-common.

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>
robwoolley and others added 24 commits November 9, 2024 03:57
Add new Yocto releases Styhead and Walnascar and new ROS 2 Jazzy Distro.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
The original code used EXTRA_OECMAKE:prepend multiple times to define
CMAKE_PREFIX_PATH and CMAKE_INSTALL_PATH. This led to incorrect values
as only the last value was selected.

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
This ensures that the colcon-core Python module sets the correct
Python executable when building scripts with setuptools.

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Jiaxing Shi <quic_jiaxshi@quicinc.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Jiaxing Shi <quic_jiaxshi@quicinc.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Jiaxing Shi <quic_jiaxshi@quicinc.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
ros2-image-sdktest: Add a new image recipe for testing ROS 2 SDKs
ros1-image-sdktest: Rename and move the image recipe for testing ROS SDKs

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The PyKDL.so file is being stripped by the build system.  Add a
temporary workaround to ignore the QA warning.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The dependencies Boost and Flann use absolute paths to specify where to
find the headers and libraries.  Remove the host recipe sysroot prefix
from these paths to remove the QA warning about buildpaths.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
When building nativesdk packages the base_prefix value is set
to SDKPATHNATIVE.  This prevents ros_prefix from being used
to extend STAGING_DIR_NATIVE.  Create ros_base_prefix for
this purpose.

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Use TinyXML2 from the target sysroot directory.

Signed-off-by: Romain Gimenez <romain.gimenez@protonmail.ch>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Use TinyXML2 from the target sysroot directory.

Signed-off-by: Romain Gimenez <romain.gimenez@protonmail.ch>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Use TinyXML2 from the target sysroot directory.

Signed-off-by: Romain Gimenez <romain.gimenez@protonmail.ch>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
We should not set the PATH or LD_LIBRARY_PATH when using an SDK.

This provides the option AMENT_SKIP_SHELL_PATH to allow us to
skip setting the variables.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
The 'master' branch appears to no longer be present on github, switch to
'main'.

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@sgstreet sgstreet marked this pull request as draft November 25, 2024 22:13
@sgstreet
Copy link
Author

Still verifying this on master-next and styhead-next

@sgstreet
Copy link
Author

sgstreet commented Nov 25, 2024

@robwoolley I verify this by building examples, demos and example-interfaces with master-next and styhead-next. We still have the issue of PYTHON_SOABI verses _PYTHON_SYSCONFIGDATA_NAME. I have been unable to make the latter work.

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
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.

7 participants