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

fix: update edge_auto_launcher tasks #57

Merged
merged 12 commits into from
Sep 5, 2024
1 change: 1 addition & 0 deletions ansible/roles/artifacts/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
script_download_dir: /tmp

Check failure on line 1 in ansible/roles/artifacts/defaults/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

var-naming[no-role-prefix]

Variables names from within roles should use artifacts_ as a prefix. (vars: script_download_dir)
80 changes: 80 additions & 0 deletions ansible/roles/artifacts/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# tensorrt_yolox
- name: Create tensorrt_yolox directory inside {{ data_dir }}
ansible.builtin.file:
path: "{{ data_dir }}/tensorrt_yolox"
mode: "755"
state: directory

- name: Download tensorrt_yolox/yolox-tiny.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolox-tiny.onnx
dest: "{{ data_dir }}/tensorrt_yolox/yolox-tiny.onnx"
mode: "644"
checksum: sha256:471a665f4243e654dff62578394e508db22ee29fe65d9e389dfc3b0f2dee1255

- name: Download tensorrt_yolox/yolox-sPlus-opt.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolox-sPlus-opt.onnx
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt.onnx"
mode: "644"
checksum: sha256:36b0832177b01e6b278e00c7369f1de71e616c36261cbae50f0753d41289da01

- name: Download tensorrt_yolox/yolox-sPlus-opt.EntropyV2-calibration.table
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolox-sPlus-opt.EntropyV2-calibration.table
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt.EntropyV2-calibration.table"
mode: "644"
checksum: sha256:b9e9d7da33342262ccaea4469b4d02b8abb32b6d7bf737f9e0883fece1b8f580

- name: Download tensorrt_yolox/yolox-sPlus-T4-960x960-pseudo-finetune.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/object_detection_yolox_s/v1/yolox-sPlus-T4-960x960-pseudo-finetune.onnx
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-T4-960x960-pseudo-finetune.onnx"
mode: "644"
checksum: sha256:f5054e8a890c3be86dc1b4b89a5a36fb2279d4f6110b0159e793be062641bf65

- name: Download tensorrt_yolox/yolox-sPlus-T4-960x960-pseudo-finetune.EntropyV2-calibration.table
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/object_detection_yolox_s/v1/yolox-sPlus-T4-960x960-pseudo-finetune.EntropyV2-calibration.table
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-T4-960x960-pseudo-finetune.EntropyV2-calibration.table"
mode: "644"
checksum: sha256:cc378d327db5616b0b3a4d077bf37100c25a50ecd22d2b542f54098da100f34c

- name: Download tensorrt_yolox/label.txt
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/label.txt
dest: "{{ data_dir }}/tensorrt_yolox/label.txt"
mode: "644"
checksum: sha256:3540a365bfd6d8afb1b5d8df4ec47f82cb984760d3270c9b41dbbb3422d09a0c

- name: Download tensorrt_yolox/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/object_detection_semseg_yolox_s/v1/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.onnx
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.onnx"
mode: "644"
checksum: sha256:73b3812432cedf65cebf02ca4cb630542fc3b1671c4c0fbf7cee50fa38e416a8

- name: Download tensorrt_yolox/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.EntropyV2-calibration.table
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/object_detection_semseg_yolox_s/v1/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.EntropyV2-calibration.table
dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.EntropyV2-calibration.table"
mode: "644"
checksum: sha256:28cd6524d4bcdb2809592a225d28330433e58dc02c92169ea555b44c1a51a584

- name: Download tensorrt_yolox/semseg_color_map.csv

Check warning on line 72 in ansible/roles/artifacts/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (semseg)
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/object_detection_semseg_yolox_s/v1/semseg_color_map.csv
dest: "{{ data_dir }}/tensorrt_yolox/semseg_color_map.csv"

Check warning on line 76 in ansible/roles/artifacts/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (semseg)
mode: "644"
checksum: sha256:3d93ca05f31b63424d7d7246a01a2365953705a0ed3323ba5b6fddd744a4bfea


Check failure on line 80 in ansible/roles/artifacts/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

yaml[empty-lines]

Too many blank lines (2 > 0)
62 changes: 30 additions & 32 deletions ansible/roles/ros2/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@
ansible.builtin.apt:
name:
- nvidia-jetpack
- nvidia-opencv
- build-essential
- cmake
- git
- libbullet-dev
- libpython3-dev
- python3-wheel
- python3-colcon-common-extensions
# - python3-colcon-common-extensions
- python3-flake8
- python3-pip
- python3-numpy
- python3-pytest-cov
- python3-rosdep
# - python3-rosdep
- python3-setuptools
- python3-vcstool
- python3-rosinstall-generator
# - python3-vcstool
# - python3-rosinstall-generator
- libasio-dev
- libtinyxml2-dev
- libcunit1-dev
Expand Down Expand Up @@ -74,6 +75,10 @@
- pytest
- pybind11-global
- importlib_resources
- rosdep
- vcstool
- colcon-common-extensions
- rosinstall-generator
extra_args: -U
become: true # need to sudo privilege to install packages globally

Expand Down Expand Up @@ -209,26 +214,26 @@
path: "{{ source_build_dir }}/jetson-containers"
register: opencv_build_dir_exist

- name: Build and install OpenCV
block:
- name: "{{ block_name }}: Download install script"
ansible.builtin.git:
repo: https://github.com/dusty-nv/jetson-containers.git
dest: "{{ source_build_dir }}/jetson-containers"
version: L4T-R35.1.0
- name: "{{ block_name }}: install dependencies"
shell: ./opencv_install_deps.sh
args:
chdir: "{{ source_build_dir }}/jetson-containers/scripts"
become: true
- name: "{{ block_name }}: execute install script"
shell: ./opencv_install.sh https://nvidia.box.com/shared/static/5v89u6g5rb62fpz4lh0rz531ajo2t5ef.gz OpenCV-4.5.0-aarch64.tar.gz
args:
chdir: "{{ source_build_dir }}/jetson-containers/scripts"
become: true
vars:
block_name: OpenCV
when: not opencv_build_dir_exist.stat.exists
# - name: Build and install OpenCV
# block:
# - name: "{{ block_name }}: Download install script"
# ansible.builtin.git:
# repo: https://github.com/dusty-nv/jetson-containers.git
# dest: "{{ source_build_dir }}/jetson-containers"
# version: L4T-R35.1.0
# - name: "{{ block_name }}: install dependencies"
# shell: ./opencv_install_deps.sh
# args:
# chdir: "{{ source_build_dir }}/jetson-containers/scripts"
# become: true
# - name: "{{ block_name }}: execute install script"
# shell: ./opencv_install.sh https://nvidia.box.com/shared/static/5v89u6g5rb62fpz4lh0rz531ajo2t5ef.gz OpenCV-4.5.0-aarch64.tar.gz
# args:
# chdir: "{{ source_build_dir }}/jetson-containers/scripts"
# become: true
# vars:
# block_name: OpenCV
# when: not opencv_build_dir_exist.stat.exists

- name: Check YAML build directory existence
ansible.builtin.stat:
Expand Down Expand Up @@ -263,9 +268,9 @@

- name: Upgrade CMake
block:
# Follow drirections here: https://apt.kitware.com/
- name: "{{ block_name }}: update gpg key"
shell: wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
# Follow drirections here: https://apt.kitware.com/
- name: "{{ block_name }}: update repository info"
ansible.builtin.apt_repository:
repo: deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ {{ ansible_distribution_release }} main
Expand All @@ -274,13 +279,6 @@
ansible.builtin.apt:
update_cache: true
state: present
# - name: "{{ block_name }}: delete gpg key"
# ansible.builtin.file:
# path: /usr/share/keyrings/kitware-archive-keyring.gpg
# state: absent
- name: "{{ block_name }}: install kitware-arcyhive-keyring"
ansible.builtin.apt:
name: kitware-archive-keyring
- name: "{{ block_name }}: install newer cmake"
ansible.builtin.apt:
name: cmake
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/tier4_hdr_camera_driver/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
camera_driver_repo: https://api.github.com/repos/tier4/tier4_automotive_hdr_camera/releases/latest
camera_driver_repo: https://api.github.com/repos/tier4/tier4_automotive_hdr_camera/releases/142093397
camera_driver_download_dir: /tmp
exposure_time: 11000
13 changes: 7 additions & 6 deletions ansible/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
[Warning] Do you want to configure the network? This configuration may overwrite the IP address of the specific network interface [y/N]
private: false
roles:
- role: artifacts
- role: ptp4l_client
when: prompt_configure_network == 'y'
- role: enlarge_txqueue
when: prompt_configure_network == 'y'
- role: netplan
when: prompt_configure_network == 'y'
- role: autoware
- role: cuda
- role: cyclonedds
Expand All @@ -28,9 +35,3 @@
- role: tier4_hdr_camera_driver
when: prompt_install_camera_driver == 'y'
- role: ros2
- role: ptp4l_client
when: prompt_configure_network == 'y'
- role: enlarge_txqueue
when: prompt_configure_network == 'y'
- role: netplan
when: prompt_configure_network == 'y'
8 changes: 8 additions & 0 deletions autoware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ repositories:
type: git
url: https://github.com/tier4/tensorrt_cmake_module.git
version: main
demos:
type: git
url: https://github.com/ros2/demos.git
version: humble
autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: main
2 changes: 1 addition & 1 deletion setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Disable inactive apt repository
DISABLE_TARGET="/etc/apt/sources.list.d/roscube.list"
if [ -e ${DISABLE_TARGET} ]; then
sudo sed -i 's/.*neuron\.adlinktech\.com.*/# &/g' ${DISABLE_TARGET}

Check warning on line 16 in setup-dev-env.sh

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (adlinktech)
fi

# Install git
Expand Down Expand Up @@ -49,7 +49,7 @@
echo -e "\e[36mRunning ansible playbook to setup ECU.\e[0m"

# Run ansible
if ansible-playbook "${SCRIPT_DIR}"/ansible/setup.yaml --ask-become-pass; then
if ansible-playbook "${SCRIPT_DIR}"/ansible/setup.yaml --ask-become-pass --extra-vars data_dir=$HOME/autoware_data; then
echo -e "\e[32mCompleted.\e[0m"
exit 0
else
Expand Down
Loading