Skip to content

Commit 5359d23

Browse files
authored
Merge latest dev to master (#55)
Version 0.4.2 * Mode inference now capable of detecting deviation between intended and targeted system state/mode (needs minor fixes) * Mode manager checking for system deviation after each change (transition, mode change, parameter change) * Mode handling successfully parses rules from SMH file * Documentation of rules and rules example #13
1 parent c904e2b commit 5359d23

File tree

14 files changed

+94
-81
lines changed

14 files changed

+94
-81
lines changed

.github/workflows/ci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Build action: Foxy + Rolling"
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master, dev ]
8+
schedule:
9+
# Run once per day to detect broken dependencies.
10+
- cron: '17 6 * * *'
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ ubuntu-20.04 ]
19+
ros_distribution: [ foxy, rolling ]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: ros-tooling/setup-ros@0.0.26
23+
with:
24+
required-ros-distributions: ${{ matrix.ros_distribution }}
25+
- uses : ros-tooling/action-ros-ci@0.1.0
26+
with:
27+
package-name: "system_modes system_modes_examples"
28+
target-ros2-distro: ${{ matrix.ros_distribution }}
29+
colcon-mixin-name: coverage-gcc
30+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
31+
- uses: codecov/codecov-action@v1
32+
with:
33+
file: ros_ws/lcov/total_coverage.info

.github/workflows/lint.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# ROS 2 System Modes
22

3+
[![License](https://img.shields.io/badge/License-Apache%202-blue.svg)](https://github.com/micro-ROS/system_modes/blob/master/LICENSE)
4+
[![Build status](https://build.ros2.org/job/Ddev__system_modes__ubuntu_bionic_amd64/badge/icon?subject=Build%20farm%3A%20Dashing)](https://build.ros2.org/job/Ddev__system_modes__ubuntu_bionic_amd64/)
5+
[![Build status](http://build.ros2.org/job/Edev__system_modes__ubuntu_bionic_amd64/badge/icon?subject=Build%20farm%3A%20Eloquent)](http://build.ros2.org/job/Edev__system_modes__ubuntu_bionic_amd64/)
6+
[![Build status](http://build.ros2.org/job/Fdev__system_modes__ubuntu_focal_amd64/badge/icon?subject=Build%20farm%3A%20Foxy)](http://build.ros2.org/job/Fdev__system_modes__ubuntu_focal_amd64/)
7+
[![Build status](http://build.ros2.org/job/Rdev__system_modes__ubuntu_focal_amd64/badge/icon?subject=Build%20farm%3A%20Rolling)](http://build.ros2.org/job/Rdev__system_modes__ubuntu_focal_amd64/)
8+
[![Build status](https://github.com/micro-ROS/system_modes/workflows/Build%20action%3A%20Foxy%20%2B%20Rolling/badge.svg)](https://github.com/micro-ROS/system_modes/actions)
9+
[![Code coverage](https://codecov.io/gh/micro-ROS/system_modes/branch/master/graph/badge.svg)](https://codecov.io/gh/micro-ROS/system_modes)
10+
311
This repository explores a system modes concept that is implemented for ROS 2 in two packages:
412
* [system_modes](./system_modes/) provides a library for system mode inference, a mode manager, and a mode monitor
513
* [system_modes_examples](./system_modes_examples/) implements a simple example
@@ -32,6 +40,12 @@ ROS 2 System Modes are open-sourced under the Apache-2.0 license. See the
3240
For a list of other open-source components included in ROS 2 system_modes,
3341
see the file [3rd-party-licenses.txt](3rd-party-licenses.txt).
3442

43+
## Quality assurance
44+
45+
The colcon_test tool is used for quality assurances, which includes cpplint, uncrustify, flake8, xmllint and various other tools.
46+
47+
Unit tests based on [gtest](https://github.com/google/googletest) are located in the [./system_modes/test](system_modes/test) folder.
48+
3549
## Known Issues/Limitations
3650

3751
Please notice the following issues/limitations:

system_modes/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ include_directories(../../build/system_modes/rosidl_generator_cpp/)
6161
link_directories(../../build/system_modes/)
6262
target_link_libraries(mode system_modes__rosidl_typesupport_cpp)
6363

64-
# Causes the visibility macros to use dllexport rather than dllimport,
64+
# Causes the visibility macros to use dllexport rather than dllimport,
6565
# which is appropriate when building the dll but not consuming it.
6666
target_compile_definitions(mode PRIVATE "SYSTEMMODES_BUILDING_LIBRARY")
6767

@@ -106,9 +106,6 @@ if(BUILD_TESTING)
106106
# the following line skips the linter which checks for copyrights
107107
# remove the line when a copyright and license is present in all source files
108108
set(ament_cmake_copyright_FOUND TRUE)
109-
# the following line skips cpplint (only works in a git repo)
110-
# remove the line when this package is a git repo
111-
set(ament_cmake_cpplint_FOUND TRUE)
112109
ament_lint_auto_find_test_dependencies()
113110

114111
set(MODE_FILE_CORRECT ${CMAKE_CURRENT_SOURCE_DIR}/test/test_modes.yaml)

system_modes/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog for package system_modes_examples
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.4.2 (2020-12-17)
6+
-----------
7+
* Error handling and rules feature no longer experimental
8+
* Fixed bugs in monitor and tests
9+
510
0.4.1 (2020-10-29)
611
-----------
712
* Include experimental error handling and rules feature

system_modes/include/system_modes/mode.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "system_modes/mode_impl.hpp"
1818

19+
#include <rclcpp/macros.hpp>
1920
#include <rclcpp/node_interfaces/node_parameters.hpp>
2021
#include <rclcpp/parameter_map.hpp>
2122

@@ -46,6 +47,7 @@ class ModeBase
4647
public:
4748
explicit ModeBase(const std::string & mode_name);
4849
virtual ~ModeBase() = default;
50+
// cppcheck-suppress unknownMacro
4951
RCLCPP_DISABLE_COPY(ModeBase)
5052

5153
std::string get_name() const;
@@ -74,6 +76,7 @@ class DefaultMode : public ModeBase
7476
public:
7577
DefaultMode();
7678
explicit DefaultMode(const std::string & mode_name) = delete;
79+
// cppcheck-suppress unknownMacro
7780
RCLCPP_DISABLE_COPY(DefaultMode)
7881

7982
virtual void set_parameter(const rclcpp::Parameter & parameter);
@@ -89,6 +92,7 @@ class Mode : public ModeBase
8992
public:
9093
explicit Mode(const std::string & mode_name) = delete;
9194
Mode(const std::string & mode_name, const DefaultModePtr default_mode);
95+
// cppcheck-suppress unknownMacro
9296
RCLCPP_DISABLE_COPY(Mode)
9397

9498
virtual ~Mode() = default;

system_modes/include/system_modes/mode_handling.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class ModeHandling
5151
{
5252
public:
5353
explicit ModeHandling(const std::string & model_path);
54+
// cppcheck-suppress unknownMacro
5455
RCLCPP_DISABLE_COPY(ModeHandling)
5556

5657
virtual ~ModeHandling() = default;

system_modes/include/system_modes/mode_inference.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ModeInference
4040
{
4141
public:
4242
explicit ModeInference(const std::string & model_path);
43+
// cppcheck-suppress unknownMacro
4344
RCLCPP_DISABLE_COPY(ModeInference)
4445

4546
virtual const std::vector<std::string> get_all_parts() const;

system_modes/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>system_modes</name>
5-
<version>0.4.1</version>
5+
<version>0.4.2</version>
66
<description>
77
The system modes concept assumes that a robotics system is built
88
from components with a lifecycle. It adds a notion of (sub-)systems,

0 commit comments

Comments
 (0)