forked from orbbec/OrbbecSDK_ROS2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83c4294
commit f5d37bd
Showing
5 changed files
with
206 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: ROS Humble Astra Control stack for Jetson Nano | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
OWNER: airesearchlab | ||
IMAGE_NAME: orbbec | ||
|
||
# https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
run: | | ||
docker login --username ${{ env.OWNER }} --password ${{ secrets.GH_PAT }} ghcr.io | ||
- name: Build and Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.jetson-nano | ||
platforms: linux/arm64 | ||
push: true | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:latest-j-nano | ||
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:humble-j-nano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
#--------------------------------------------------------------------------------------------------------------------------- | ||
#---- | ||
#---- Start base image | ||
#---- | ||
#--------------------------------------------------------------------------------------------------------------------------- | ||
|
||
FROM ghcr.io/kalanaratnayake/foxy-ros-pytorch:1-13-humble-core-r32.7.1 as base | ||
|
||
## Parameters | ||
ENV ROS_DISTRO=humble | ||
ENV WORKSPACE_ROOT=/boxmot | ||
|
||
############################################################################################################################# | ||
##### | ||
##### Install Dependencies | ||
##### | ||
############################################################################################################################# | ||
|
||
WORKDIR / | ||
|
||
RUN apt-get update -y | ||
|
||
RUN apt-get install -y --no-install-recommends ros-dev-tools \ | ||
libgflags-dev \ | ||
nlohmann-json3-dev \ | ||
libudev-dev \ | ||
libusb-dev \ | ||
udev \ | ||
pkg-config \ | ||
ninja-build \ | ||
doxygen \ | ||
clang \ | ||
python3 \ | ||
nasm \ | ||
libgl1-mesa-dev \ | ||
libsoundio-dev \ | ||
libvulkan-dev \ | ||
libx11-dev \ | ||
libxcursor-dev \ | ||
libxinerama-dev \ | ||
libxrandr-dev \ | ||
libusb-1.0-0-dev \ | ||
libssl-dev \ | ||
libudev-dev \ | ||
mesa-common-dev \ | ||
uuid-dev | ||
|
||
RUN apt-get clean | ||
|
||
############################################################################################################################# | ||
##### | ||
##### Install Orbbec packages | ||
##### | ||
############################################################################################################################# | ||
|
||
WORKDIR /SDK | ||
|
||
RUN git clone https://github.com/orbbec/OrbbecSDK.git | ||
|
||
RUN mkdir -p /etc/udev/rules.d/ | ||
|
||
RUN cp /SDK/OrbbecSDK/misc/scripts/99-obsensor-libusb.rules /etc/udev/rules.d/99-obsensor-libusb.rules | ||
|
||
WORKDIR /SDK/OrbbecSDK/build | ||
|
||
RUN cmake .. && \ | ||
make -j4 && \ | ||
make install | ||
|
||
############################################################################################################################# | ||
##### | ||
##### Install Orbbec ROS2 packages | ||
##### | ||
############################################################################################################################# | ||
|
||
WORKDIR ${WORKSPACE_ROOT}/src | ||
|
||
RUN git clone https://github.com/orbbec/OrbbecSDK_ROS2.git | ||
|
||
WORKDIR ${WORKSPACE_ROOT} | ||
|
||
RUN . /opt/ros/humble/setup.sh && colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
WORKDIR / | ||
|
||
RUN | ||
|
||
############################################################################################################################# | ||
##### | ||
##### Remove workspace source and build files that are not relevent to running the system | ||
##### | ||
############################################################################################################################# | ||
|
||
RUN rm -rf /SDK | ||
RUN rm -rf ${WORKSPACE_ROOT}/log | ||
RUN rm -rf ${WORKSPACE_ROOT}/build | ||
|
||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN rm -rf /tmp/* | ||
RUN apt-get clean | ||
|
||
|
||
#--------------------------------------------------------------------------------------------------------------------------- | ||
#---- | ||
#---- Start final release image | ||
#---- | ||
#--------------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
||
FROM ghcr.io/kalanaratnayake/foxy-ros-pytorch:1-13-humble-core-r32.7.1 as final | ||
|
||
## Parameters | ||
ENV WORKSPACE_ROOT=/orbbec | ||
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
ENV LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1 | ||
|
||
WORKDIR / | ||
|
||
COPY --from=base / / | ||
|
||
COPY docker/workspace_entrypoint.sh /workspace_entrypoint.sh | ||
RUN chmod +x /workspace_entrypoint.sh | ||
|
||
ENTRYPOINT [ "/workspace_entrypoint.sh" ] | ||
|
||
WORKDIR ${WORKSPACE_ROOT} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters