Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/poetry
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Oct 21, 2023
2 parents e0cc4af + cf80f86 commit 8e6eab7
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 160 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
boost_geometry_util,
color_names,
data_buffer,
detic_onnx_ros2,
dynamixel_hardware_interface,
geographic_conversion,
geographic_info,
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/docker/vrx/DockerFile.copy
Original file line number Diff line number Diff line change
@@ -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"]
76 changes: 50 additions & 26 deletions .github/workflows/docker/vrx/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

# Expose port used to communiate with gzserver
EXPOSE 11345

# setup entrypoint
COPY ./vrx_entrypoint.sh /

COPY ./run_vrx_gazebo.bash /

ENTRYPOINT ["/vrx_entrypoint.sh"]
4 changes: 2 additions & 2 deletions .github/workflows/docker/vrx/config/component_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ wamv_ball_shooter:
pitch: ${radians(-20)}
yaw: 0.0
wamv_pinger:
- name: pinger
position: 1.0 0 -1.0
- sensor_name: reciever
position: 1.0 0 -1.0
5 changes: 5 additions & 0 deletions .github/workflows/docker/vrx/run_vrx_gazebo.bash
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .github/workflows/docker/vrx/vrx_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
2 changes: 1 addition & 1 deletion .github/workflows/docker/yolox/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/generate_rosdep_yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand Down
7 changes: 7 additions & 0 deletions ansible/roles/jetson/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
64 changes: 0 additions & 64 deletions ansible/roles/ml_pipeline/tasks/main.yml

This file was deleted.

7 changes: 0 additions & 7 deletions ansible/setup_ml_pipeline.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
@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)

0 comments on commit 8e6eab7

Please sign in to comment.