-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to work with Ubuntu 20.04 and ROS2 Foxy. (#24)
* Update to work with Ubuntu 20.04 and ROS2 Foxy. * Change CMake to use ament_export_targets instead of ament_export_interfaces. This likely breaks support for ROS2 Eloquent. * Switch Actions CI from 18.04/Eloquent to 20.04/Foxy. * Change launch file instances of node-name to name. * Fix for installing tzdata to accept default option. * Switch CI to use ROS Docker image instead of Ubuntu Docker image. * Remove rosdep init since it is already done in ROS image. * Remove install of packages included in ROS Docker image. * Revert schedule for CI runs. * Enable CI on push. * Remove unused CI environment variable. * Revert CI distribution variable. * Fix yaml error for CI. Simplify env variables. * Remove DEBIAN_FRONTENT. * Switch scipy use of factorial from misc module to special module. * More robust way to import factorial. * Rename all node_* variables in python so that the node_ prefix is removed. * Switch CI from using Gazebo 9 to 11. * Updated thruster default axis value * Launch files now use a topic / param to load the robot description * Updated thruster_manager to parse an urdf from a string instead of a file to get the thrust axes * Updated tests to load the robot description from a topic / param * Updated CI to use both Gazebo 9 and 11 * Fixed syntax error * Updates about sim time request * Updated changelog and readme Co-authored-by: Thomas Denewiler <thomas.denewiler@navy.mil> Co-authored-by: jpliquid <65894393+jpliquid@users.noreply.github.com>
- Loading branch information
1 parent
7693fdb
commit d3f5417
Showing
132 changed files
with
521 additions
and
627 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,132 +1,86 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
on: # NOLINT | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '0 0 */2 * *' # Every 2 days at midnight | ||
# push: | ||
# branches: [ master ] | ||
# pull_request: | ||
# branches: [ master ] | ||
- cron: '0 0 */2 * *' # Every 2 days at midnight | ||
|
||
jobs: | ||
test_docker: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ros_distribution: | ||
- eloquent | ||
|
||
build_path: | ||
- ros_ws/src | ||
gazebo-version: [9, 11] | ||
# Define the Docker image(s) associated with each ROS distribution. | ||
# The include syntax allows additional variables to be defined, like | ||
# docker_image in this case. See documentation: | ||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build | ||
# | ||
|
||
# Platforms are defined in REP 3, and REP 2000: | ||
# https://ros.org/reps/rep-0003.html | ||
# https://ros.org/reps/rep-2000.html | ||
include: | ||
# Eloquent Elusor (November 2019 - November 2020) | ||
- docker_image: ubuntu:bionic | ||
ros_distribution: eloquent | ||
ros_version: 2 | ||
|
||
container: | ||
image: ${{ matrix.docker_image }} | ||
# Foxy Fitzroy (May 2020 - May 2023) | ||
- docker_image: ros:foxy | ||
ros_distribution: foxy | ||
|
||
steps: | ||
- name: sudo | ||
run: | | ||
apt-get update | ||
apt-get install --no-install-recommends --quiet --yes sudo | ||
container: ${{ matrix.docker_image }} | ||
|
||
# Base packages + killall (for killing gazebo) | ||
- name: base | ||
run: | | ||
apt-get update | ||
apt-get install build-essential clang cmake git wget libasio-dev libtinyxml2-dev lcov -y | ||
apt-get install psmisc | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
# action/setup-ros is not used yet as it installs pytest > 6.0 which leads to syntax errors... | ||
- name: install ros | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: src/plankton | ||
|
||
- name: Install Tools | ||
run: | | ||
apt update && apt install locales | ||
locale-gen en_US en_US.UTF-8 | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | ||
export LANG=en_US.UTF-8 | ||
bash -c echo 'Etc/UTC' > /etc/timezone | ||
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
apt install tzdata -y | ||
apt update && apt install curl gnupg2 lsb-release -y | ||
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - | ||
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list' | ||
apt update | ||
apt install ros-${{ matrix.ros_distribution }}-desktop -y | ||
apt install python3-rosdep -y | ||
rosdep init | ||
sudo apt update | ||
sudo apt install -y build-essential clang cmake git wget libasio-dev libtinyxml2-dev lcov psmisc | ||
rosdep update | ||
apt install python3-colcon-common-extensions python3-colcon-coveragepy-result python3-colcon-lcov-result python3-colcon-library-path python3-colcon-metadata python3-colcon-mixin -y | ||
#- name: setup ROS environment | ||
# uses: ros-tooling/setup-ros@0.0.25 | ||
# with: | ||
# required-ros-distributions: ${{ matrix.ros_distribution }} | ||
sudo apt install -y python3-colcon-coveragepy-result | ||
sudo apt install -y python3-colcon-lcov-result | ||
#install Gazebo, install eloquent specific packages, create src directory | ||
- name: prepare | ||
- name: Install Gazebo | ||
run: | | ||
apt-get -qq update | ||
apt-get -qq upgrade -y | ||
echo Installing Gazebo ${{ matrix.gazebo-version }} | ||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' | ||
wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - | ||
apt-get install gazebo9 -y | ||
apt-get install libgazebo9-dev -y | ||
apt install ros-${{ matrix.ros_distribution }}-gazebo-ros-pkgs -y | ||
apt install ros-eloquent-launch-xml -y | ||
apt install ros-eloquent-launch-yaml -y | ||
mkdir -p ${{ matrix.build_path }} | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ${{ matrix.build_path }} | ||
|
||
- name: rosdep | ||
run: DEBIAN_FRONTEND=noninteractive rosdep update && rosdep install --from-paths ${{ matrix.build_path }} --ignore-src --rosdistro ${{ matrix.ros_distribution }} -y | ||
sudo apt update | ||
sudo apt install -y gazebo${{ matrix.gazebo-version }} | ||
sudo apt install -y libgazebo${{ matrix.gazebo-version }}-dev | ||
sudo apt install -y ros-${{ matrix.ros_distribution }}-gazebo-ros-pkgs | ||
- name: build | ||
run: . /opt/ros/${{ matrix.ros_distribution }}/setup.sh && colcon build --packages-up-to plankton --merge-install | ||
- name: Install Dependencies | ||
run: | | ||
rosdep update | ||
rosdep install --from-paths src --ignore-src --rosdistro ${{ matrix.ros_distribution }} -y | ||
- name: Build Packages | ||
run: | | ||
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh | ||
colcon build --packages-up-to plankton --merge-install | ||
- name: run tests | ||
- name: Run Unit Tests | ||
id: action_ros_ci_step | ||
run: . /opt/ros/${{ matrix.ros_distribution }}/setup.sh && colcon test --merge-install --packages-up-to plankton --event-handlers console_cohesion+ | ||
|
||
- name: echo results | ||
run: . /opt/ros/${{ matrix.ros_distribution }}/setup.sh && colcon test-result --all --verbose | ||
|
||
- name: upload Logs | ||
run: | | ||
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh | ||
colcon test --merge-install --packages-up-to plankton --event-handlers console_cohesion+ | ||
- name: Unit Test Results | ||
run: | | ||
echo Results for Gazebo ${{ matrix.gazebo-version }} | ||
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh | ||
colcon test-result --all --verbose | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: colcon-logs-linux | ||
path: log/ | ||
if: always() | ||
|
||
# This workflow contains a single job called "build" | ||
#build: | ||
# The type of runner that the job will run on | ||
# runs-on: ubuntu-18.04 | ||
|
||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: ros-tooling/setup-ros@0.0.25 | ||
# with: | ||
# required-ros-distributions: eloquent | ||
# - uses: ros-tooling/action-ros-ci@0.0.19 | ||
# with: | ||
# package-name: plankton | ||
# target-ros2-distro: eloquent | ||
|
||
|
||
|
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
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
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,4 +1,4 @@ | ||
<launch> | ||
<node node-name="publish_footprints" pkg="uuv_assistants" exec="publish_footprints.py" output="screen"/> | ||
<node name="publish_footprints" pkg="uuv_assistants" exec="publish_footprints.py" output="screen"/> | ||
</launch> | ||
|
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
Oops, something went wrong.