Skip to content

Commit 883c7c3

Browse files
authored
Merge branch 'master' into demo_diff_drive_controller
2 parents 9e56d01 + f5d821c commit 883c7c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1775
-256
lines changed

.clang-format

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
---
22
Language: Cpp
33
BasedOnStyle: Google
4+
5+
ColumnLimit: 100
6+
AccessModifierOffset: -2
7+
AlignAfterOpenBracket: AlwaysBreak
8+
BreakBeforeBraces: Allman
9+
ConstructorInitializerIndentWidth: 0
10+
ContinuationIndentWidth: 2
11+
DerivePointerAlignment: false
12+
PointerAlignment: Middle
13+
ReflowComments: false
14+
IncludeBlocks: Preserve
415
...
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Binary Build
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
# Run every day to detect flakiness and broken dependencies
9+
- cron: '23 1 * * *'
10+
11+
jobs:
12+
binary:
13+
name: binary build
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
env:
18+
- {ROS_DISTRO: foxy, ROS_REPO: main}
19+
- {ROS_DISTRO: foxy, ROS_REPO: testing}
20+
env:
21+
UPSTREAM_WORKSPACE: ros2_control_demos.repos
22+
steps:
23+
- uses: actions/checkout@v1
24+
- uses: 'ros-industrial/industrial_ci@master'
25+
env: ${{matrix.env}}

.github/workflows/ci.yml renamed to .github/workflows/ci-build-coverage.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,39 @@
1-
name: CI
1+
name: Coverage Build
22
on:
33
pull_request:
44
push:
55
branches:
66
- master
77
schedule:
8-
# Run every morning to detect flakiness and broken dependencies
9-
- cron: '28 6 * * *'
8+
# Run every day to detect flakiness and broken dependencies
9+
- cron: '54 1 * * *'
1010

1111
jobs:
12-
ci_binary:
13-
name: Foxy binary job
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
env:
18-
- {ROS_DISTRO: foxy, ROS_REPO: main}
19-
- {ROS_DISTRO: foxy, ROS_REPO: testing}
20-
env:
21-
UPSTREAM_WORKSPACE: ros2_control_demos/ros2_control_demos.repos
22-
steps:
23-
- uses: actions/checkout@v1
24-
- uses: 'ros-industrial/industrial_ci@master'
25-
env: ${{matrix.env}}
26-
27-
ci_source:
28-
name: Foxy source job
12+
coverage:
13+
name: coverage build
2914
runs-on: ubuntu-20.04
3015
strategy:
3116
fail-fast: false
3217
steps:
3318
- uses: ros-tooling/[email protected]
3419
with:
3520
required-ros-distributions: foxy
36-
- uses: ros-tooling/action-ros-ci@0.1.0
21+
- uses: ros-tooling/action-ros-ci@v0.2
3722
with:
3823
target-ros2-distro: foxy
3924
# build all packages listed in the meta package
4025
package-name:
41-
ros2_control_demo_hardware
26+
ros2_control_demo_hardware
4227
ros2_control_demo_robot
4328
ros2_control_demos
4429
vcs-repo-file-url: |
45-
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_control_demos/ros2_control_demos.repos
46-
colcon-mixin-name: coverage-gcc
30+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_control_demos.repos
31+
colcon-defaults: |
32+
{
33+
"build": {
34+
"mixin": ["coverage-gcc"]
35+
}
36+
}
4737
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
4838
- uses: codecov/[email protected]
4939
with:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Source Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
schedule:
7+
# Run every day to detect flakiness and broken dependencies
8+
- cron: '43 1 * * *'
9+
10+
jobs:
11+
source:
12+
name: source build
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: false
16+
steps:
17+
- uses: ros-tooling/[email protected]
18+
- uses: ros-tooling/[email protected]
19+
with:
20+
target-ros2-distro: foxy
21+
# build all packages listed in the meta package
22+
package-name:
23+
ros2_control_demo_hardware
24+
ros2_control_demo_robot
25+
ros2_control_demos
26+
vcs-repo-file-url: |
27+
https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
28+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_control_demos.repos
29+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
30+
- uses: actions/upload-artifact@v1
31+
with:
32+
name: colcon-logs-${{ matrix.os }}
33+
path: ros_ws/log

.github/workflows/ci-format.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This is a format job. Pre-commit has a first-party GitHub action, so we use
2+
# that: https://github.com/pre-commit/action
3+
4+
name: Format
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
push:
10+
branches:
11+
- master
12+
13+
jobs:
14+
pre-commit:
15+
name: Format
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
20+
- name: Install clang-format-10
21+
run: sudo apt-get install clang-format-10 cppcheck
22+
- uses: pre-commit/[email protected]
23+
with:
24+
extra_args: --all-files --hook-stage manual

.github/workflows/ci-ros-lint.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ROS Lint
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
ament_lint:
7+
name: ament_${{ matrix.linter }}
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
linter: [copyright, cppcheck, lint_cmake]
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: ros-tooling/[email protected]
16+
- uses: ros-tooling/[email protected]
17+
with:
18+
distribution: foxy
19+
linter: ${{ matrix.linter }}
20+
package-name:
21+
ros2_control_demo_hardware
22+
ros2_control_demo_robot
23+
ros2_control_demos
24+
25+
ament_lint_cpplint:
26+
name: ament_${{ matrix.linter }}
27+
runs-on: ubuntu-20.04
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
linter: [cpplint]
32+
steps:
33+
- uses: actions/checkout@v1
34+
- uses: ros-tooling/[email protected]
35+
- uses: ros-tooling/[email protected]
36+
with:
37+
distribution: foxy
38+
linter: cpplint
39+
arguments: "--filter=-whitespace/newline"
40+
package-name:
41+
ros2_control_demo_hardware
42+
ros2_control_demo_robot
43+
ros2_control_demos

.github/workflows/linters.yaml

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

.pre-commit-config.yaml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
15+
repos:
16+
# Standard hooks
17+
- repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v3.4.0
19+
hooks:
20+
- id: check-added-large-files
21+
- id: check-ast
22+
- id: check-case-conflict
23+
- id: check-docstring-first
24+
- id: check-merge-conflict
25+
- id: check-symlinks
26+
- id: check-xml
27+
- id: check-yaml
28+
- id: debug-statements
29+
- id: end-of-file-fixer
30+
- id: mixed-line-ending
31+
- id: trailing-whitespace
32+
- id: fix-byte-order-marker
33+
34+
# Python hooks
35+
- repo: https://github.com/asottile/pyupgrade
36+
rev: v2.12.0
37+
hooks:
38+
- id: pyupgrade
39+
args: [--py36-plus]
40+
41+
- repo: https://github.com/psf/black
42+
rev: 20.8b1
43+
hooks:
44+
- id: black
45+
args: ["--line-length=99"]
46+
47+
# PEP 257
48+
- repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
49+
rev: v0.3.3
50+
hooks:
51+
- id: pep257
52+
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
53+
54+
- repo: https://github.com/pycqa/flake8
55+
rev: 3.9.0
56+
hooks:
57+
- id: flake8
58+
args: ["--ignore=E501"]
59+
60+
# CPP hooks
61+
- repo: local
62+
hooks:
63+
- id: clang-format
64+
name: clang-format
65+
description: Format files with ClangFormat.
66+
entry: clang-format-10
67+
language: system
68+
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
69+
args: ['-fallback-style=none', '-i']
70+
# The same options as in ament_cppcheck are used, but its not working...
71+
#- repo: https://github.com/pocc/pre-commit-hooks
72+
#rev: v1.1.1
73+
#hooks:
74+
#- id: cppcheck
75+
#args: ['--error-exitcode=1', '-f', '--inline-suppr', '-q', '-rp', '--suppress=internalAstError', '--suppress=unknownMacro', '--verbose']
76+
77+
- repo: local
78+
hooks:
79+
- id: ament_cppcheck
80+
name: ament_cppcheck
81+
description: Static code analysis of C/C++ files.
82+
stages: [commit]
83+
entry: ament_cppcheck
84+
language: system
85+
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
86+
87+
# Maybe use https://github.com/cpplint/cpplint instead
88+
- repo: local
89+
hooks:
90+
- id: ament_cpplint
91+
name: ament_cpplint
92+
description: Static code analysis of C/C++ files.
93+
stages: [commit]
94+
entry: ament_cpplint
95+
language: system
96+
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
97+
args: ["--linelength=100", "--filter=-whitespace/newline"]
98+
99+
# Cmake hooks
100+
- repo: local
101+
hooks:
102+
- id: ament_lint_cmake
103+
name: ament_lint_cmake
104+
description: Check format of CMakeLists.txt files.
105+
stages: [commit]
106+
entry: ament_lint_cmake
107+
language: system
108+
files: CMakeLists\.txt$
109+
110+
# Copyright
111+
- repo: local
112+
hooks:
113+
- id: ament_copyright
114+
name: ament_copyright
115+
description: Check if copyright notice is available in all files.
116+
stages: [commit]
117+
entry: ament_copyright
118+
language: system
119+
120+
# Docs - RestructuredText hooks
121+
- repo: https://github.com/PyCQA/doc8
122+
rev: 0.9.0a1
123+
hooks:
124+
- id: doc8
125+
args: ['--max-line-length=100', '--ignore=D001']
126+
exclude: CHANGELOG\.rst$
127+
128+
- repo: https://github.com/pre-commit/pygrep-hooks
129+
rev: v1.8.0
130+
hooks:
131+
- id: rst-backticks
132+
exclude: CHANGELOG\.rst$
133+
- id: rst-directive-colons
134+
- id: rst-inline-touching-normal
135+
136+
# Spellcheck in comments and docs
137+
# skipping of *.svg files is not working...
138+
- repo: https://github.com/codespell-project/codespell
139+
rev: v2.0.0
140+
hooks:
141+
- id: codespell
142+
args: ['--write-changes']
143+
exclude: \.(svg|pyc)$

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ information to effectively respond to your bug report or contribution.
1010
## Reporting Bugs/Feature Requests
1111
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
1212

13-
When filing an issue, please check [existing open][issues], or [recently closed][closed-issues], issues to make sure
13+
When filing an issue, please check [existing open][issues], or [recently closed][closed-issues], issues to make sure
1414
somebody else hasn't already reported the issue.
1515
Please try to include as much information as you can. Details like these are incredibly useful:
1616

@@ -45,7 +45,7 @@ GitHub provides additional documentation on [forking a repository](https://help.
4545
## Finding contributions to work on
4646
Looking at the existing issues is a great way to find something to contribute on.
4747
As this project, by default, uses the default GitHub issue labels
48-
(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'][help-wanted] issues
48+
(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'][help-wanted] issues
4949
is a great place to start.
5050

5151

0 commit comments

Comments
 (0)