Skip to content

Commit

Permalink
REL.10.01.00.02. Compatible with: Processor SDK Linux for Edge AI 10.…
Browse files Browse the repository at this point in the history
…01.00.02
  • Loading branch information
junechul committed Dec 2, 2024
1 parent 70cacec commit 20a697d
Show file tree
Hide file tree
Showing 47 changed files with 835 additions and 65 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/docker-build-pc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
workflow_dispatch:

env:
# SDK_VER should match to the SDK_VER defined in docker/Makefile
SDK_VER: 10.1.0.1
SDK_DIR: ${{ github.workspace }}
GH_TOKEN: ${{ secrets.GHCR_PAT }}

Expand All @@ -30,10 +28,17 @@ jobs:
- name: Initial setup for the SDK repository
run: |
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_gscam.sh
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh 2
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh
# verify
ls -l $SDK_DIR/ros2/drivers
- name: Parse SDK_VER and set it as an env variable
run: |
OUTPUT=$(make info)
SDK_VER=$(echo "$OUTPUT" | grep 'SDK_VER:' | awk '{print $2}')
echo "Parsed SDK_VER: $SDK_VER"
echo "SDK_VER=$SDK_VER" >> $GITHUB_ENV
- name: Set up Docker build script
run: |
mkdir -p $HOME/j7ros_home
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/docker-build-stage1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
required: true

env:
# SDK_VER should match to the SDK_VER defined in docker/Makefile
SDK_VER: 10.1.0.1
SDK_DIR: ${{ github.workspace }}
GH_TOKEN: ${{ secrets.env_PAT }}

Expand Down Expand Up @@ -42,6 +40,13 @@ jobs:
- name: Verify the SDK repository
run: ls -l $SDK_DIR

- name: Parse SDK_VER and set it as an env variable
run: |
OUTPUT=$(make info)
SDK_VER=$(echo "$OUTPUT" | grep 'SDK_VER:' | awk '{print $2}')
echo "Parsed SDK_VER: $SDK_VER"
echo "SDK_VER=$SDK_VER" >> $GITHUB_ENV
- name: Set up Docker build script
run: |
mkdir -p $HOME/j7ros_home
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/docker-build-stage2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
required: true

env:
# SDK_VER should match to the SDK_VER defined in docker/Makefile
SDK_VER: 10.1.0.1
SDK_DIR: ${{ github.workspace }}
GH_TOKEN: ${{ secrets.env_PAT }}

Expand Down Expand Up @@ -42,10 +40,17 @@ jobs:
- name: Initial setup for the SDK repository
run: |
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_gscam.sh
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh 2
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh
# verify
ls -l $SDK_DIR/ros2/drivers
- name: Parse SDK_VER and set it as an env variable
run: |
OUTPUT=$(make info)
SDK_VER=$(echo "$OUTPUT" | grep 'SDK_VER:' | awk '{print $2}')
echo "Parsed SDK_VER: $SDK_VER"
echo "SDK_VER=$SDK_VER" >> $GITHUB_ENV
- name: Set up Docker build script
run: |
mkdir -p $HOME/j7ros_home
Expand Down
16 changes: 7 additions & 9 deletions docker/Dockerfile.arm64.ti_libs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ ARG EDGEAI_VER
ARG BASE_URL_VA
ARG BASE_URL_RT
ARG SDK_VER_MAJOR
ARG SDK_VER_STR

#=========================================================================
FROM --platform=linux/arm64 robotics-sdk:${SDK_VER}-${ROS_DISTRO}-base as base-0
Expand All @@ -64,7 +63,6 @@ ENV SOC=$SOC_NAME
ARG BASE_URL_VA
ARG BASE_URL_RT
ARG SDK_VER_MAJOR
ARG SDK_VER_STR

# setup proxy settings
RUN /root/setup_proxy.sh
Expand Down Expand Up @@ -95,27 +93,27 @@ RUN apt-get update && \

# git-clone edgeai-gst-apps
WORKDIR /opt
RUN git clone --single-branch --branch 10.01.00.01 https://github.com/TexasInstruments/edgeai-gst-apps.git
RUN git clone --single-branch --branch 10.01.00.02 https://github.com/TexasInstruments/edgeai-gst-apps.git

# install apps-utils
RUN /opt/edgeai-gst-apps/scripts/install_apps_utils.sh -b 10.01.00.01 && \
RUN /opt/edgeai-gst-apps/scripts/install_apps_utils.sh -b 10.01.00.02 && \
rm -rf /opt/edgeai-apps-utils

# install dl-inferer
RUN git clone --single-branch --branch 10.01.00.01 https://git.ti.com/cgit/edgeai/edgeai-dl-inferer && \
RUN git clone --single-branch --branch 10.01.00.02 https://git.ti.com/cgit/edgeai/edgeai-dl-inferer && \
/opt/edgeai-dl-inferer/scripts/build_dl_inferer.sh && \
rm -rf /opt/edgeai-dl-inferer

# install edgeai-tiovx-kernels
RUN /opt/edgeai-gst-apps/scripts/install_tiovx_kernels.sh -b 10.01.00.01 && \
RUN /opt/edgeai-gst-apps/scripts/install_tiovx_kernels.sh -b 10.01.00.02 && \
rm -rf /opt/edgeai-tiovx-kernels

# install edgeai-tiovx-modules
RUN /opt/edgeai-gst-apps/scripts/install_tiovx_modules.sh -b 10.01.00.01 && \
RUN /opt/edgeai-gst-apps/scripts/install_tiovx_modules.sh -b 10.01.00.02 && \
rm -rf /opt/edgeai-tiovx-modules

# install edgeai-gst-plugins
RUN /opt/edgeai-gst-apps/scripts/install_gst_plugins.sh -b 10.01.00.01 && \
RUN /opt/edgeai-gst-apps/scripts/install_gst_plugins.sh -b 10.01.00.02 && \
rm -rf /opt/edgeai-gst-plugins

# install python modules for DL RT
Expand All @@ -124,7 +122,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3 -m pip install --no-cache-dir PyYAML

# install ti-gpio-cpp
RUN /opt/edgeai-gst-apps/scripts/install_ti_gpio_libs.sh -b 10.01.00.01
RUN /opt/edgeai-gst-apps/scripts/install_ti_gpio_libs.sh -b 10.01.00.02

# build perf_stats tool
RUN cd /opt/edgeai-gst-apps/scripts/perf_stats && \
Expand Down
23 changes: 11 additions & 12 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ ROS_VER ?= 2
GPUS ?= n

# Robotics SDK version
SDK_VER ?= 10.1.0.1
EDGEAI_VER ?= 10.1.0.1
SDK_VER ?= 10.1.0.2
EDGEAI_VER ?= 10.1.0.2
TIVA_LIB_VER ?= 10.1.0
RPMSG_LIB_VER ?= 0.6.7

# Used in install_vision_apps_lib.sh, install_osrt_libs.sh, install_tidl_libs.sh
LIB_REL_TAG ?= 10.01.00.01
LIB_REL_TAG ?= 10.01.00.02
SDK_VER_MAJOR ?= 10.1.0
SDK_VER_STR ?= 10000005

# Set the operating variables based on the ROS version specified
ROS_DISTRO = humble
Expand Down Expand Up @@ -104,12 +103,14 @@ ip_show:
@echo "$(J7_IP_ADDR)"

info:
$(info PLATFORM = $(PLATFORM))
$(info WORK_DIR = $(WORK_DIR))
$(info REPO_NAME = $(REPO_NAME))
$(info WORK_PATH_HOST = $(WORK_PATH_HOST))
$(info SDK_DIR = $(SDK_DIR))
$(info DATA_DIR = $(DATA_DIR))
$(info SDK_VER: $(SDK_VER))
$(info EDGEAI_VER: $(EDGEAI_VER))
$(info PLATFORM: $(PLATFORM))
$(info WORK_DIR: $(WORK_DIR))
$(info REPO_NAME: $(REPO_NAME))
$(info WORK_PATH_HOST: $(WORK_PATH_HOST))
$(info SDK_DIR: $(SDK_DIR))
$(info DATA_DIR: $(DATA_DIR))

## Docker
# generate "docker build" script
Expand Down Expand Up @@ -148,7 +149,6 @@ ifeq ($(PLATFORM), j7)
@echo ": \"\$${BASE_URL_VA:=$(LIB_BASE_URL_VA)}\"" >> $(TGT_NAME)
@echo ": \"\$${BASE_URL_RT:=$(LIB_BASE_URL_RT)}\"" >> $(TGT_NAME)
@echo "SDK_VER_MAJOR=$(SDK_VER_MAJOR)" >> $(TGT_NAME)
@echo "SDK_VER_STR=$(SDK_VER_STR)" >> $(TGT_NAME)
endif
@echo "bash \$$DOCKER_DIR/scripts/prepare_docker_build.sh \$$DST_DIR" >> $(TGT_NAME)
@echo "cd $(WORK_PATH_HOST)" >> $(TGT_NAME)
Expand Down Expand Up @@ -186,7 +186,6 @@ ifeq ($(PLATFORM), j7)
@echo " --build-arg BASE_URL_VA=\$$BASE_URL_VA \\" >> $(TGT_NAME)
@echo " --build-arg BASE_URL_RT=\$$BASE_URL_RT \\" >> $(TGT_NAME)
@echo " --build-arg SDK_VER_MAJOR=\$$SDK_VER_MAJOR \\" >> $(TGT_NAME)
@echo " --build-arg SDK_VER_STR=\$$SDK_VER_STR \\" >> $(TGT_NAME)
@echo " -f \$$DOCKER_DIR/Dockerfile.$(ARCH).ti_libs ./docker_src" >> $(TGT_NAME)
@echo " echo \"Docker build -t \$$DOCKER_TAG2 completed!\"" >> $(TGT_NAME)
@echo "fi" >> $(TGT_NAME)
Expand Down
20 changes: 8 additions & 12 deletions docker/install_osrt_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,14 @@ else
echo "BASE_URL_RT=$BASE_URL_RT"
fi

if [ -z "$SDK_VER_STR" ]; then
echo "Error: BASE_URL_RT is not defined."
exit 1
else
echo "SDK_VER_STR=$SDK_VER_STR"
fi

# package names
ONNX_RT_WHL=onnxruntime_tidl-1.14.0+${SDK_VER_STR}-cp310-cp310-linux_aarch64.whl
ONNX_PKG=onnx-1.14.0+${SDK_VER_STR}-ubuntu22.04_aarch64
ONNX_RT_WHL=onnxruntime_tidl-1.15.0-cp310-cp310-linux_aarch64.whl
ONNX_PKG=onnx-1.15.0-ubuntu22.04_aarch64
ONNX_LIB=libonnxruntime.so.1.15.0
TFLITE_RT_WHL=tflite_runtime-2.12.0-cp310-cp310-linux_aarch64.whl
TFLITE_PKG=tflite-2.12-ubuntu22.04_aarch64
TFLITE_DIR=tflite_2.12
TFLITE_LIB=libtensorflow-lite.a
DLR_WHL=dlr-1.13.0-py3-none-any.whl

# python dist-packages path
Expand Down Expand Up @@ -118,16 +114,16 @@ install_libs() {
if [ ! -d /usr/include/tensorflow ]; then
extract_pkg $TFLITE_PKG.tar.gz
mv "$TFLITE_PKG/tensorflow" /usr/include
mv "$TFLITE_PKG/tflite_2.12" /usr/lib/
cp "$TFLITE_PKG/libtensorflow-lite.a" /usr/lib/
mv "$TFLITE_PKG/${TFLITE_DIR}" /usr/lib/
cp "$TFLITE_PKG/${TFLITE_LIB}" /usr/lib/
else
echo "skipping tensorflow setup: found /usr/include/tensorflow"
fi

if [ ! -d /usr/include/onnxruntime ]; then
extract_pkg $ONNX_PKG.tar.gz
cp -r $ONNX_PKG/libonnxruntime.so* /usr/lib/
ln -s "/usr/lib/libonnxruntime.so.1.14.0+${SDK_VER_STR}" /usr/lib/libonnxruntime.so
ln -s "/usr/lib/${ONNX_LIB}" /usr/lib/libonnxruntime.so
mv "$ONNX_PKG/onnxruntime" /usr/include/
else
echo "skipping onnxruntime setup: found /usr/include/onnxruntime"
Expand Down
2 changes: 1 addition & 1 deletion init_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fi

# Install TI mmWave radar driver node
if [[ -f "$SDK_DIR/scripts/install_mmwave_rospkg.sh" ]]; then
bash $SDK_DIR/scripts/install_mmwave_rospkg.sh 2
bash $SDK_DIR/scripts/install_mmwave_rospkg.sh
fi

# Setup $WORK_DIR
Expand Down
13 changes: 0 additions & 13 deletions scripts/install_gscam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ fi

CURRENT_DIR=$(pwd)

# install gscam (for ROS1) and apply a patch
WORK_PATH=$SDK_DIR/ros1/drivers
cd $WORK_PATH
if [[ ! -d "gscam" ]]; then
git clone --single-branch --branch master https://github.com/ros-drivers/gscam.git
cd gscam
git checkout -b ti_nv12 tags/1.0.1
git apply $WORK_PATH/patches/gscam_ti_nv12.patch
git add .
git add config/* launch/*
git commit -m "Customized for TI Jacinto Robotics SDK: Added pipleline that uses TI GStreamer plugins, and added NV12 encoding mode."
fi

# install gscam2 (for ROS2) and apply a patch
WORK_PATH=$SDK_DIR/ros2/drivers
cd $WORK_PATH
Expand Down
13 changes: 3 additions & 10 deletions scripts/install_mmwave_rospkg.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
ROS_VER=${1:-"2"}
ROS_WS=$HOME/j7ros_home/ros_ws
ARCH=$(arch)
if [[ -z "$SDK_DIR" ]]; then
Expand All @@ -17,14 +16,7 @@ fi
REPO_URL="https://git.ti.com/git/mmwave_radar/mmwave_ti_ros.git"
COMMIT="3cfb96e29db1a5728a9c45f968ae2739d370f58f"
BRANCH="master"
if [ "$ROS_VER" == "1" ]; then
WORK_PATH=$SDK_DIR/ros1/drivers
elif [ "$ROS_VER" == "2" ]; then
WORK_PATH=$SDK_DIR/ros2/drivers
else
echo "ROS_VER=$ROS_VER not supported"
exit 1
fi
WORK_PATH=$SDK_DIR/ros2/drivers

CURRENT_DIR=$(pwd)
cd $WORK_PATH
Expand All @@ -42,8 +34,9 @@ if [[ ! -d "ti_mmwave_rospkg" ]]; then
exit 1
fi
cd ..
cp -r mmwave_ti_ros/ros${ROS_VER}_driver/src/* .
cp -r mmwave_ti_ros/ros2_driver/src/* .
rm -rf mmwave_ti_ros
echo "[ti_mmwave_rospkg] Done"
fi

cd $CURRENT_DIR
Binary file added tools/camera_info/C920_HD_LUT.bin
Binary file not shown.
31 changes: 31 additions & 0 deletions tools/camera_info/C920_HD_camera_info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
%YAML:1.0
---
image_width: 1280
image_height: 720
camera_name: camera
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 9.3797299601201667e+02, 0., 6.4110167315102080e+02, 0.,
9.3981016471195335e+02, 3.8512990806142415e+02, 0., 0., 1. ]
distortion_model: plumb_bob
distortion_coefficients: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [ 7.3934261699576093e-02, -4.1542678753901879e-01,
1.4128959036683215e-03, 9.4384360282255390e-04,
5.9913436641201279e-01 ]
rectification_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
projection_matrix: !!opencv-matrix
rows: 3
cols: 4
dt: d
data: [ 9.3797299601201667e+02, 0., 6.4110167315102080e+02, 0., 0.,
9.3981016471195335e+02, 3.8512990806142415e+02, 0., 0., 0., 1.,
0. ]
1 change: 1 addition & 0 deletions tools/camera_info/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* SN5867575.conf: ZED1 camera used in zed1_2020-11-09-18-01-08.bag
Loading

0 comments on commit 20a697d

Please sign in to comment.