-
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
a184a2c
commit d879031
Showing
9 changed files
with
133 additions
and
119 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,60 @@ | ||
name: Build/Publish Docker Image | ||
name: Build/Publish ROS Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
build_type: | ||
description: "Is it a \"development\" or a \"stable\" release?" | ||
required: true | ||
default: 'development' | ||
type: choice | ||
options: | ||
- development | ||
- stable | ||
target_distro: | ||
description: "In case of \"stable\" release specify the ROS distro of the existing docker image (eg. humble)" | ||
type: string | ||
default: "ardent" | ||
target_release: | ||
description: "In case of \"stable\" release specify the version of the existing docker image (eg. 1.0.12)" | ||
type: string | ||
default: "0.0.0" | ||
target_date: | ||
description: "In case of \"stable\" release specify the date of the existing docker image in format YYYYMMDD (eg. 20220124)" | ||
type: string | ||
default: "20131206" | ||
repository_dispatch: | ||
types: [rebuild] | ||
pull_request: | ||
types: | ||
- closed | ||
- opened | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platforms: "linux/amd64, linux/arm64" | ||
ros_distro: "humble" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build and push base tag | ||
uses: docker/build-push-action@v2 | ||
- name: Build Docker Image | ||
uses: husarion-ci/ros-docker-img-action@v0.5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/arm64, linux/amd64 | ||
push: true | ||
tags: husarion/ouster:melodic | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} | ||
main_branch_name: ros2 | ||
build_type: ${{ inputs.build_type }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
ros_distro: ${{ matrix.ros_distro }} | ||
platforms: ${{ matrix.platforms }} | ||
# variables important only for stable release | ||
target_distro: ${{ inputs.target_distro }} | ||
target_release: ${{ inputs.target_release }} | ||
target_date: ${{ inputs.target_date }} |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
ARG ROS_DISTRO=melodic | ||
ARG ROS_DISTRO=humble | ||
|
||
FROM ros:${ROS_DISTRO}-ros-core | ||
FROM husarnet/ros:${ROS_DISTRO}-ros-core | ||
|
||
# select bash as default shell | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
debhelper \ | ||
dpkg-dev \ | ||
fakeroot \ | ||
python-bloom \ | ||
python-rosdep \ | ||
python-rospkg | ||
|
||
WORKDIR /ros_ws | ||
|
||
RUN git clone --recurse-submodules https://github.com/ouster-lidar/ouster-ros.git src/ouster-ros | ||
|
||
# RUN apt-get update && \ | ||
RUN rosdep init && \ | ||
rosdep update --rosdistro=$ROS_DISTRO && \ | ||
rosdep install --from-paths src --ignore-src -y && \ | ||
source /opt/ros/$ROS_DISTRO/setup.bash && \ | ||
catkin_make -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release && \ | ||
apt clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
WORKDIR /ros2_ws | ||
|
||
COPY ./ros_entrypoint.sh / | ||
|
||
ENTRYPOINT ["/ros_entrypoint.sh"] | ||
|
||
CMD ["bash"] | ||
# install everything needed | ||
RUN apt-get update && apt-get install -y \ | ||
python3-pip \ | ||
python3-colcon-common-extensions \ | ||
python3-rosdep \ | ||
python3-vcstool \ | ||
git && \ | ||
apt-get upgrade -y && \ | ||
source "/opt/ros/$ROS_DISTRO/setup.bash" && \ | ||
git clone -b ros2 --recurse-submodules https://github.com/ouster-lidar/ouster-ros.git /ros2_ws/src/ouster-ros && \ | ||
rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \ | ||
rosdep init && \ | ||
rosdep update --rosdistro $ROS_DISTRO && \ | ||
rosdep install -i --from-path /ros2_ws/src --rosdistro $ROS_DISTRO -y && \ | ||
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release && \ | ||
export SUDO_FORCE_REMOVE=yes && \ | ||
apt-get remove -y \ | ||
python3-colcon-common-extensions \ | ||
python3-rosdep \ | ||
python3-vcstool \ | ||
git && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo $(cat /ros2_ws/src/ouster-ros/ouster-ros/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') > /version.txt |
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
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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
services: | ||
x-net-config: | ||
&net-config | ||
network_mode: host | ||
ipc: host | ||
env_file: net.env | ||
|
||
x-cpu-config: | ||
&cpu-config | ||
environment: | ||
- DISPLAY=${DISPLAY:?err} | ||
- LIBGL_ALWAYS_SOFTWARE=1 | ||
|
||
services: | ||
rviz: | ||
image: husarion/rviz:noetic | ||
container_name: rviz | ||
restart: on-failure | ||
network_mode: host | ||
ipc: host | ||
image: husarion/rviz2:humble | ||
<<: [ *net-config, *cpu-config ] | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix:rw | ||
- ./config/default.rviz:/root/.rviz/default.rviz | ||
environment: | ||
- DISPLAY | ||
- LIBGL_ALWAYS_SOFTWARE=1 | ||
- ROS_IP=10.15.20.3 | ||
- ROS_MASTER_URI=http://10.15.20.2:11311 | ||
- ./config/default.rviz:/root/.rviz2/default.rviz |
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
# ======================================= | ||
# Network config options (uncomment one) | ||
# ======================================= | ||
|
||
# 1. Fast DDS + LAN | ||
# RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
|
||
# 2. Cyclone DDS + LAN | ||
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
|
||
# 3. Fast DDS + VPN | ||
# RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
# FASTRTPS_DEFAULT_PROFILES_FILE=/husarnet-fastdds.xml | ||
|
||
# 4. Cyclone DDS + VPN | ||
# RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
# FASTRTPS_DEFAULT_PROFILES_FILE=/husarnet-fastdds.xml | ||
# CYCLONEDDS_URI=file:///husarnet-cyclonedds.xml |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.