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 support in standard SDK #1215

Draft
wants to merge 2 commits into
base: kirkstone-next
Choose a base branch
from
Draft

Conversation

jiaxshi
Copy link
Contributor

@jiaxshi jiaxshi commented Aug 26, 2024

ROS2 support in standard SDK.
Refer to #988

Generate SDK

bitbake xxx-image -c populate_sdk
For example:
bitbake ros-image-core -c populate_sdk

Build ROS package

Set up SDK env before below steps.

ROS env set up

export AMENT_PREFIX_PATH="${OECORE_NATIVE_SYSROOT}/usr:${OECORE_TARGET_SYSROOT}/usr"

export PYTHONPATH=${OECORE_NATIVE_SYSROOT}/usr/lib/python3.10/site-packages/:${OECORE_TARGET_SYSROOT}/usr/lib/python3.10/site-packages/

colcon build --cmake-args -DCMAKE_TOOLCHAIN_FILE=${OE_CMAKE_TOOLCHAIN_FILE} \
-DBUILD_TESTING=OFF \
-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
-DPYTHON_SOABI=cpython-310-aarch64-linux-gnu

Build examples

git clone https://github.com/ros2/examples.git -b humble
cd examples
git clone https://github.com/ros2/example_interfaces.git -b humble

colcon build --cmake-args -DCMAKE_TOOLCHAIN_FILE=${OE_CMAKE_TOOLCHAIN_FILE} \
-DBUILD_TESTING=OFF \
-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
-DPYTHON_SOABI=cpython-310-aarch64-linux-gnu
---
Finished <<< examples_rclcpp_wait_set [32.5s]

Summary: 23 packages finished [1min 12s]

Issues

A discussion is created for discussing ROS support in SDK #1204

Build warning: stderr: python setup.py install is deprecated

--- stderr: examples_rclpy_minimal_client
/local/mnt3/workspace/jiaxshi/projects/sdk/ws4/sysroots/x86_64-qcomsdk-linux/usr/lib/python3.10/site-packages/setuptools/command/instal
l.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

host path is included

setup script

vi install/setup.sh
 _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/local/mnt3/workspace/jiaxshi/projects/sdk/ws4/examples/install

###python shebang

vi install/examples_rclpy_executors/lib/examples_rclpy_executors/talker
 1 #!/local/mnt3/workspace/jiaxshi/projects/sdk/ws4/sysroots/x86_64-qcomsdk-linux/usr/bin/python3
  2 # EASY-INSTALL-ENTRY-SCRIPT: 'examples-rclpy-executors==0.15.1','console_scripts','talker'

@jiaxshi jiaxshi marked this pull request as draft August 26, 2024 08:59
@sgstreet
Copy link

@jiaxshi What KAS configuration did you use so I match up with this PR?

@jiaxshi
Copy link
Contributor Author

jiaxshi commented Sep 25, 2024

@jiaxshi What KAS configuration did you use so I match up with this PR?

I didn't use kas for this PR. The PR can be applied on latest kirkstone-next

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.

2 participants