diff --git a/.github/workflows/ansible.yaml b/.github/workflows/ansible.yaml index cea5f7814..eb95cac3c 100644 --- a/.github/workflows/ansible.yaml +++ b/.github/workflows/ansible.yaml @@ -51,61 +51,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - # setup_docker_testbench: - # name: setup_docker_testbench - # runs-on: ubuntu-22.04 - # steps: - # - name: Get current date - # id: date - # run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - # - uses: actions/checkout@v2-beta - # - uses: actions/cache@v2 - # if: ${{ github.event.label.name != 'clean_build' }} - # with: - # path: docker/docker_testbench/mount_point/ - # key: sd-card-image-${{ steps.date.outputs.date }} - # - name: basic install - # run: | - # sudo apt install make ansible - # - name: ansible version - # run: | - # ansible-playbook --version - # - name: run ansible and install docker - # run: | - # ansible-playbook -i ansible/hosts/localhost.ini ansible/setup_docker_testbench.yml --connection local --become -e ansible_user=ubuntu - # - name: Notify Slack - # uses: 8398a7/action-slack@v2 - # if: failure() - # with: - # status: ${{ job.status }} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - setup_ml_pipeline: - name: setup_ml_pipeline - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v2-beta - - uses: actions/setup-python@v4 - with: - python-version: 3.10.6 - - uses: abatilo/actions-poetry@v2 - with: - poetry-version: 1.15.1 - - name: install - run: poetry install --no-interaction - - name: run ansible and install docker - run: | - poetry run ansible-galaxy install -fr ansible/roles/requirements.yml - poetry run ansible-playbook -i ansible/hosts/localhost.ini ansible/setup_ml_pipeline.yml --connection local --become -e ansible_user=ubuntu - - name: Notify Slack - uses: 8398a7/action-slack@v2 - if: failure() - with: - status: ${{ job.status }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} setup_firmware: name: setup_firmware runs-on: ubuntu-22.04 diff --git a/.github/workflows/deploy_workflow.yaml b/.github/workflows/deploy_workflow.yaml index eb6d13802..8098b9d99 100644 --- a/.github/workflows/deploy_workflow.yaml +++ b/.github/workflows/deploy_workflow.yaml @@ -31,6 +31,7 @@ jobs: boost_geometry_util, color_names, data_buffer, + detic_onnx_ros2, dynamixel_hardware_interface, geographic_conversion, geographic_info, diff --git a/.github/workflows/docker/vrx/DockerFile.copy b/.github/workflows/docker/vrx/DockerFile.copy new file mode 100644 index 000000000..9a796ad15 --- /dev/null +++ b/.github/workflows/docker/vrx/DockerFile.copy @@ -0,0 +1,28 @@ +FROM npslearninglab/watery_robots:humble_current + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && \ + apt-get install -y git wget && \ + rm -rf /var/lib/apt/lists/* + +RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg +RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null +RUN apt-get update && apt-get install -y \ + python3-sdformat13 \ + gz-garden \ + && rm -rf /var/lib/apt/lists/* +RUN mkdir -p /home/vrx_ws/src +WORKDIR /home/vrx_ws/src +ADD https://api.github.com/repos/osrf/vrx/git/refs/heads/main vrx_version.json +RUN git clone https://github.com/osrf/vrx.git +ADD https://api.github.com/repos/gazebosim/ros_gz/git/refs/heads/humble ros_gz_version.json +RUN git clone https://github.com/gazebosim/ros_gz.git -b humble +ENV GZ_VERSION garden +WORKDIR /home/vrx_ws +RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.sh && apt-get update && rosdep update && rosdep install -iry --from-paths src && rm -rf /var/lib/apt/lists/*"] +RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release"] +ADD fuel.gazebosim.org /root/.gz/fuel/fuel.gazebosim.org +COPY config /home/config +ENV GZ_SIM_RESOURCE_PATH /home/vrx_ws/src/vrx/vrx_urdf:${GZ_SIM_RESOURCE_PATH} +RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source /home/vrx_ws/install/local_setup.bash && ros2 launch vrx_gazebo generate_wamv.launch.py component_yaml:=/home/config/component_config.yaml thruster_yaml:=/home/config/thruster_config.yaml wamv_target:=/home/config/wamv_target.urdf wamv_locked:=False"] +ENTRYPOINT ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source /home/vrx_ws/install/local_setup.bash && ros2 launch vrx_gz competition.launch.py world:=sydney_regatta headless:=true urdf:=/home/config/wamv_target.urdf"] \ No newline at end of file diff --git a/.github/workflows/docker/vrx/Dockerfile b/.github/workflows/docker/vrx/Dockerfile index 9a796ad15..374e6a8db 100644 --- a/.github/workflows/docker/vrx/Dockerfile +++ b/.github/workflows/docker/vrx/Dockerfile @@ -1,28 +1,52 @@ -FROM npslearninglab/watery_robots:humble_current - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && \ - apt-get install -y git wget && \ - rm -rf /var/lib/apt/lists/* - -RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null -RUN apt-get update && apt-get install -y \ - python3-sdformat13 \ - gz-garden \ - && rm -rf /var/lib/apt/lists/* -RUN mkdir -p /home/vrx_ws/src -WORKDIR /home/vrx_ws/src -ADD https://api.github.com/repos/osrf/vrx/git/refs/heads/main vrx_version.json -RUN git clone https://github.com/osrf/vrx.git -ADD https://api.github.com/repos/gazebosim/ros_gz/git/refs/heads/humble ros_gz_version.json -RUN git clone https://github.com/gazebosim/ros_gz.git -b humble -ENV GZ_VERSION garden -WORKDIR /home/vrx_ws -RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.sh && apt-get update && rosdep update && rosdep install -iry --from-paths src && rm -rf /var/lib/apt/lists/*"] -RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release"] +# reference : https://github.com/osrf/vrx-docker/blob/master/vrx_server/vrx-server/Dockerfile + +ARG BASEIMG=npslearninglab/watery_robots:vrx_base +FROM $BASEIMG + +# Set ROS distribution +ARG ROSDIST=humble + +# Create workspace +RUN mkdir -p ~/vrx_ws/src + +# TODO: restore version tag +RUN git clone --depth 1 -b 2.3.1 https://github.com/osrf/vrx.git \ +&& mv ./vrx ~/vrx_ws/src + +# Compile the VRX project. +RUN /bin/bash -c ". /opt/ros/${ROSDIST}/setup.bash && cd ~/vrx_ws && colcon build --merge-install" + +# Source all the needed environment files. +RUN /bin/sh -c 'echo ". /opt/ros/${ROSDIST}/setup.bash" >> ~/.bashrc' \ + && /bin/sh -c 'echo ". ~/vrx_ws/install/setup.sh" >> ~/.bashrc' +## END OF SECTION BASED ON vrx/docker/Dockerfile + +# Cache fuel resources +# RUN /bin/bash -c 'gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/post \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/antenna \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_red \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_black \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_green \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_white \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_orange \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_black \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/platypus \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/crocodile \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/turtle \ +# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/wam-v' ADD fuel.gazebosim.org /root/.gz/fuel/fuel.gazebosim.org + +# read wam-v sensors and thruster config COPY config /home/config -ENV GZ_SIM_RESOURCE_PATH /home/vrx_ws/src/vrx/vrx_urdf:${GZ_SIM_RESOURCE_PATH} -RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source /home/vrx_ws/install/local_setup.bash && ros2 launch vrx_gazebo generate_wamv.launch.py component_yaml:=/home/config/component_config.yaml thruster_yaml:=/home/config/thruster_config.yaml wamv_target:=/home/config/wamv_target.urdf wamv_locked:=False"] -ENTRYPOINT ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source /home/vrx_ws/install/local_setup.bash && ros2 launch vrx_gz competition.launch.py world:=sydney_regatta headless:=true urdf:=/home/config/wamv_target.urdf"] \ No newline at end of file + +# Expose port used to communiate with gzserver +EXPOSE 11345 + +# setup entrypoint +COPY ./vrx_entrypoint.sh / + +COPY ./run_vrx_gazebo.bash / + +ENTRYPOINT ["/vrx_entrypoint.sh"] \ No newline at end of file diff --git a/.github/workflows/docker/vrx/config/component_config.yaml b/.github/workflows/docker/vrx/config/component_config.yaml index 7c3366b76..2501c6ab0 100644 --- a/.github/workflows/docker/vrx/config/component_config.yaml +++ b/.github/workflows/docker/vrx/config/component_config.yaml @@ -60,5 +60,5 @@ wamv_ball_shooter: pitch: ${radians(-20)} yaw: 0.0 wamv_pinger: - - name: pinger - position: 1.0 0 -1.0 \ No newline at end of file + - sensor_name: reciever + position: 1.0 0 -1.0 diff --git a/.github/workflows/docker/vrx/run_vrx_gazebo.bash b/.github/workflows/docker/vrx/run_vrx_gazebo.bash new file mode 100755 index 000000000..071b8f3ce --- /dev/null +++ b/.github/workflows/docker/vrx/run_vrx_gazebo.bash @@ -0,0 +1,5 @@ +# generate wamv_target.urdf +ros2 launch vrx_gazebo generate_wamv.launch.py component_yaml:=/home/config/component_config.yaml thruster_yaml:=/home/config/thruster_config.yaml wamv_target:=/home/config/wamv_target.urdf wamv_locked:=False + +# launch vrx gazebo +ros2 launch vrx_gz competition.launch.py world:=sydney_regatta headless:=true urdf:=/home/config/wamv_target.urdf \ No newline at end of file diff --git a/.github/workflows/docker/vrx/vrx_entrypoint.sh b/.github/workflows/docker/vrx/vrx_entrypoint.sh new file mode 100755 index 000000000..31eb1cf8e --- /dev/null +++ b/.github/workflows/docker/vrx/vrx_entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +# setup ros environment. +source "/opt/ros/humble/setup.bash" > /dev/null + +# setup vrx environment +source ~/vrx_ws/install/setup.sh +echo "vrx entrypoint executed" + +# TODO: optionally disable this so a gzclient can be run on the host for development. +export GAZEBO_IP=127.0.0.1 +export GAZEBO_IP_WHITE_LIST=127.0.0.1 + +/run_vrx_gazebo.bash +exec "$@" \ No newline at end of file diff --git a/.github/workflows/docker/yolox/Dockerfile b/.github/workflows/docker/yolox/Dockerfile index af7be6a3a..ccbf551e5 100644 --- a/.github/workflows/docker/yolox/Dockerfile +++ b/.github/workflows/docker/yolox/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:11.4.0-cudnn8-devel-ubuntu20.04 +FROM nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04 ENV DEBIAN_FRONTEND noninteractive #RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub RUN apt-get update && \ diff --git a/.github/workflows/docker_push.yaml b/.github/workflows/docker_push.yaml index aa479b11d..c18bc3302 100644 --- a/.github/workflows/docker_push.yaml +++ b/.github/workflows/docker_push.yaml @@ -29,7 +29,7 @@ jobs: dev_container: name: build and push wamvtan/dev_container and wamvtan/dev_container_vnc runs-on: ubuntu-22.04 - timeout-minutes: 60 + timeout-minutes: 120 strategy: fail-fast: false max-parallel: 8 diff --git a/.github/workflows/document.yaml b/.github/workflows/document.yaml index e9dba91ef..204e83abd 100644 --- a/.github/workflows/document.yaml +++ b/.github/workflows/document.yaml @@ -15,6 +15,12 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2-beta + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.10.13" + - name: Install + run: pip3 install mkdocs mkdocs-material fontawesome_markdown mkdocs-mermaid2-plugin pymdown-extensions plantuml-markdown python-markdown-math python-github-api mkdocs-github-dashboard pandas markdown==3.3.0 - name: Set env run: echo "GITHUB_TOKEN=${{ secrets.WAMV_TAN_BOT_SECRET }}" >> $GITHUB_ENV - uses: actions/setup-python@v4 diff --git a/.github/workflows/generate_rosdep_yaml.yaml b/.github/workflows/generate_rosdep_yaml.yaml index e5b2c0e2d..acd756a4d 100644 --- a/.github/workflows/generate_rosdep_yaml.yaml +++ b/.github/workflows/generate_rosdep_yaml.yaml @@ -24,10 +24,11 @@ jobs: - name: ansible version run: | ansible-playbook --version - - name: Setup ROS2 galactic environment + - name: Setup ROS2 humble environment uses: ros-tooling/setup-ros@v0.2 with: - required-ros-distributions: galactic + required-ros-distributions: humble + - uses: actions/checkout@v2-beta - name: run ansible run: | ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos_full.yml --connection local --become -e ansible_user=ubuntu diff --git a/ansible/roles/jetson/tasks/main.yml b/ansible/roles/jetson/tasks/main.yml index 771eb7b57..5ff13470e 100644 --- a/ansible/roles/jetson/tasks/main.yml +++ b/ansible/roles/jetson/tasks/main.yml @@ -95,6 +95,13 @@ version: master accept_hostkey: yes +- name: clone detic_onnx_ros2 + git: + repo: https://github.com/OUXT-Polaris/detic_onnx_ros2.git + dest: "{{workspace_path}}/src/perception/detic_onnx_ros2" + version: master + accept_hostkey: yes + - name: remove old rosdep list file: path: /etc/ros/rosdep/sources.list.d/20-default.list diff --git a/ansible/roles/ml_pipeline/tasks/main.yml b/ansible/roles/ml_pipeline/tasks/main.yml deleted file mode 100644 index 5745af742..000000000 --- a/ansible/roles/ml_pipeline/tasks/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: install required packages - apt: - name: "{{ packages }}" - state: latest - update_cache: yes - vars: - packages: - - curl - - tar - - apt-transport-https - - awscli - become: true - -- name: download kubectl binary - become: yes - get_url: - url: https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/amd64/kubectl - checksum: sha256:94d686bb6772f6fb59e3a32beff908ab406b79acdfb2427abdc4ac3ce1bb98d7 - dest: /usr/local/bin/kubectl - mode: +x - -- name: download argo workflow binary - become: yes - get_url: - url: https://github.com/argoproj/argo/releases/download/v2.9.2/argo-linux-amd64 - checksum: sha256:88a95a00741455e22970517d9b6ca714307189814c74424408b956cdd36d8450 - dest: /usr/local/bin/argo - mode: +x - -- name: download helm binary - become: yes - get_url: - url: https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz - checksum: sha256:1484ffb0c7a608d8069470f48b88d729e88c41a1b6602f145231e8ea7b43b50a - dest: /tmp - -- name: untar helm binary - unarchive: - src: /tmp/helm-v3.9.0-linux-amd64.tar.gz - dest: /tmp - -- name: install binady - become: yes - copy: - src: /tmp/linux-amd64/helm - dest: /usr/local/bin/helm - mode: +x - -#- name: Install minio client -# get_url: -# url: https://dl.min.io/client/mc/release/linux-amd64/mc -# dest: /usr/local/bin/mc -# checksum: sha256:55140582f715d0eb174096207d9983d86369b634166fe8e7f74a9dfae0175943 -# mode: +x -# become: yes - -- name: Install kompose - get_url: - url: https://github.com/kubernetes/kompose/releases/download/v1.26.1/kompose-linux-amd64 - dest: /usr/local/bin/kompose - checksum: sha256:cd85b8c205dc63985e9bde4911b15c8556029e09671599919ed81bff8453a36f - mode: +x - become: yes \ No newline at end of file diff --git a/ansible/setup_ml_pipeline.yml b/ansible/setup_ml_pipeline.yml deleted file mode 100644 index 57cabc2be..000000000 --- a/ansible/setup_ml_pipeline.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Setup ml pipeline - hosts: all - roles: - - docker - - gantsign.minikube - - ml_pipeline \ No newline at end of file diff --git a/docs/docs/index.md b/docs/docs/index.md index af5dd0016..2f4ef1480 100755 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -4,7 +4,7 @@ ![ansible](https://github.com/OUXT-Polaris/ouxt_automation/workflows/ansible/badge.svg) #### Automation -![documentat](https://github.com/OUXT-Polaris/ouxt_automation/workflows/documentat/badge.svg) +[![document](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/document.yaml/badge.svg)](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/document.yaml) [![deploy_workflow](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/deploy_workflow.yaml/badge.svg)](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/deploy_workflow.yaml) [![check_workflow_deployment](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/check_workflow.yaml/badge.svg)](https://github.com/OUXT-Polaris/ouxt_automation/actions/workflows/check_workflow.yaml) diff --git a/docs/docs/packages.md b/docs/docs/packages.md index 7629a9d1d..f714ff022 100644 --- a/docs/docs/packages.md +++ b/docs/docs/packages.md @@ -2,4 +2,4 @@ ## dashboard -@github_dashboard(OUXT-Polaris/color_names,OUXT-Polaris/data_buffer,OUXT-Polaris/dynamixel_hardware_interface,OUXT-Polaris/geographic_conversion,OUXT-Polaris/geographic_info,OUXT-Polaris/hermite_path_planner,OUXT-Polaris/image_processing_utils,OUXT-Polaris/joy_to_twist,OUXT-Polaris/lua_vendor,OUXT-Polaris/message_synchronizer,OUXT-Polaris/miniv_control,OUXT-Polaris/miniv_description,OUXT-Polaris/navi_sim,OUXT-Polaris/nmea_gps_driver,OUXT-Polaris/nmea_hardware_interface,OUXT-Polaris/nmea_to_geopose,OUXT-Polaris/odom_frame_publisher,OUXT-Polaris/ouxt_common,OUXT-Polaris/pcl_apps,OUXT-Polaris/perception_bringup,OUXT-Polaris/playstation_controller_drivers,OUXT-Polaris/quaternion_operation,OUXT-Polaris/robotx_behavior_tree,OUXT-Polaris/robotx_communication,OUXT-Polaris/robotx_costmap_calculator,OUXT-Polaris/robotx_ekf,OUXT-Polaris/scan_segmentation,OUXT-Polaris/sol_vendor,OUXT-Polaris/tcp_sender,OUXT-Polaris/usv_controller) \ No newline at end of file +@github_dashboard(OUXT-Polaris/color_names,OUXT-Polaris/data_buffer,OUXT-Polaris/dynamixel_hardware_interface,OUXT-Polaris/geographic_conversion,OUXT-Polaris/geographic_info,OUXT-Polaris/hermite_path_planner,OUXT-Polaris/image_processing_utils,OUXT-Polaris/joy_to_twist,OUXT-Polaris/lua_vendor,OUXT-Polaris/message_synchronizer,OUXT-Polaris/miniv_control,OUXT-Polaris/miniv_description,OUXT-Polaris/navi_sim,OUXT-Polaris/nmea_gps_driver,OUXT-Polaris/nmea_hardware_interface,OUXT-Polaris/nmea_to_geopose,OUXT-Polaris/odom_frame_publisher,OUXT-Polaris/ouxt_common,OUXT-Polaris/pcl_apps,OUXT-Polaris/perception_bringup,OUXT-Polaris/playstation_controller_drivers,OUXT-Polaris/quaternion_operation,OUXT-Polaris/robotx_behavior_tree,OUXT-Polaris/robotx_communication,OUXT-Polaris/robotx_costmap_calculator,OUXT-Polaris/robotx_ekf,OUXT-Polaris/scan_segmentation,OUXT-Polaris/sol_vendor,OUXT-Polaris/tcp_sender,OUXT-Polaris/usv_controller,OUXT-Polaris/detic_onnx_ros2) \ No newline at end of file