Skip to content

Commit

Permalink
Migrate github action to rolling (#10)
Browse files Browse the repository at this point in the history
* Adapt launch syntax (get rid of 'node_' prefix)

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Migrating CI action to rolling

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* License and updated CI build badge

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
  • Loading branch information
norro authored Apr 1, 2021
1 parent 3df2aec commit f2886f1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 52 deletions.
49 changes: 20 additions & 29 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,27 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
container:
image: docker://ros:foxy-ros-base-focal
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
ros_distribution: [ rolling ]
steps:
- name: Setup workspace
run: mkdir -p watchdogs_ws/src
- name: checkout
uses: actions/checkout@v2
with:
path: watchdogs_ws/src/watchdogs
- name: ros-deps
working-directory: watchdogs_ws
run: |
sudo apt-get update
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro foxy -yr
- name: build
shell: bash
working-directory: watchdogs_ws
run: |
source /opt/ros/foxy/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE
# - name: Test
# working-directory: ${{runner.workspace}}/build
# shell: bash
# run: |
# colcon test
# colcon test-result --verbose
# colcon test-result --all
- uses: actions/checkout@v2
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- uses : ros-tooling/[email protected]
with:
package-name: "sw_watchdog"
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: ""
colcon-mixin-name: coverage-gcc
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- uses: codecov/codecov-action@v1
with:
file: ros_ws/lcov/total_coverage.info
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SW Watchdog

![](https://github.com/ros-safety/software_watchdogs/workflows/CI/badge.svg)
[![License](https://img.shields.io/badge/License-Apache%202-blue.svg)](https://github.com/micro-ROS/system_modes/blob/master/LICENSE)
[![Build status](https://github.com/ros-safety/software_watchdogs/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/ros-safety/software_watchdogs/actions)

A library of (software) watchdogs based on DDS Quality of Service (QoS) policies and ROS 2 [lifecycle nodes](https://github.com/ros2/demos/blob/master/lifecycle/README.rst).

Expand Down Expand Up @@ -52,12 +53,10 @@ To use the `heartbeat_composition.launch.py` example, the `ros-*-demo-nodes-cpp`

This code is built and tested under:

* [ROS 2 Dashing Diademata](https://index.ros.org/doc/ros2/Installation/Dashing/) with [Ubuntu 18.04.4](http://releases.ubuntu.com/18.04/)
_**Note:** Ouptut may be delayed / buffered in Dashing when using `ros2 launch` (see https://answers.ros.org/question/332829/no-stdout-logging-output-in-ros2-using-launch/)_
* [ROS 2 Foxy Fitzroy](https://index.ros.org/doc/ros2/Installation/Foxy/) with [Ubuntu 20.04](http://releases.ubuntu.com/20.04/)
* [ROS 2 Rolling Ridley](https://index.ros.org/doc/ros2/Installation/Rolling/) with [Ubuntu 20.04](http://releases.ubuntu.com/20.04/)

The following DDS `rmw` [implementations](https://index.ros.org/doc/ros2/Concepts/DDS-and-ROS-middleware-implementations/) were tested in both environments (via the default Ubuntu packages that ship with the Dashing and Foxy releases):
* [Fast DDS](https://www.eprosima.com/index.php/products-all/eprosima-fast-dds)
The following DDS `rmw` [implementations](https://index.ros.org/doc/ros2/Concepts/DDS-and-ROS-middleware-implementations/) were tested in both environments (via the default Ubuntu packages that ship with the Rolling releases):
* [Fast DDS](https://www.eprosima.com/index.php/products-all/eprosima-fast-dds)
_**Note:** In Dashing you must use Fast DDS, rather than the default Fast RTPS (which is a prior version of Fast DDS). Fast RTPS does not implement QoS._
* [Connext DDS](https://www.rti.com/products/) v5.3.1
* [Cyclone DDS](https://projects.eclipse.org/projects/iot.cyclonedds)
Expand Down
15 changes: 7 additions & 8 deletions sw_watchdog/launch/heartbeat_composition.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@ def group_stop(context, *args, **kwargs):
gid = os.getpgid(os.getpid())
subprocess.call(['kill', '-INT', '--', f"-{gid}"])

# Note: syntax has changed in foxy (removal of 'node_' prefixes)
def generate_launch_description():
"""Generate launch description with multiple components."""
container = ComposableNodeContainer(
node_name='my_container',
node_namespace='my_namespace',
name='my_container',
namespace='my_namespace',
package='rclcpp_components',
node_executable='component_container',
executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='demo_nodes_cpp',
node_plugin='demo_nodes_cpp::Talker',
node_name='talker'),
plugin='demo_nodes_cpp::Talker',
name='talker'),
ComposableNode(
package='sw_watchdog',
node_plugin='sw_watchdog::SimpleHeartbeat',
node_name='heartbeat',
plugin='sw_watchdog::SimpleHeartbeat',
name='heartbeat',
parameters=[{'period': 200}],
extra_arguments=[{'use_intra_process_comms': True}]),
],
Expand Down
6 changes: 3 additions & 3 deletions sw_watchdog/launch/watchdog_in_docker.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def generate_launch_description():
# Watchdog node
watchdog_node = LifecycleNode(
package='sw_watchdog',
node_executable='simple_watchdog',
node_namespace='',
node_name='simple_docker_watchdog',
executable='simple_watchdog',
namespace='',
name='simple_docker_watchdog',
output='screen',
arguments=['220', '--publish', '--activate']
#arguments=['__log_level:=debug']
Expand Down
6 changes: 3 additions & 3 deletions sw_watchdog/launch/watchdog_lifecycle.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def generate_launch_description():
set_tty_launch_config_action = launch.actions.SetLaunchConfiguration("emulate_tty", "True")
watchdog_node = LifecycleNode(
package='sw_watchdog',
node_executable='simple_watchdog',
node_namespace='',
node_name='simple_watchdog',
executable='simple_watchdog',
namespace='',
name='simple_watchdog',
output='screen',
arguments=['220', '--publish', '--activate']
#arguments=['__log_level:=debug']
Expand Down
6 changes: 3 additions & 3 deletions sw_watchdog/launch/windowed_watchdog_lifecycle.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def generate_launch_description():
set_tty_launch_config_action = launch.actions.SetLaunchConfiguration("emulate_tty", "True")
watchdog_node = LifecycleNode(
package='sw_watchdog',
node_executable='windowed_watchdog',
node_namespace='',
node_name='windowed_watchdog',
executable='windowed_watchdog',
namespace='',
name='windowed_watchdog',
output='screen',
arguments=['220', '3', '--publish', '--activate']
#arguments=['__log_level:=debug']
Expand Down

0 comments on commit f2886f1

Please sign in to comment.