Skip to content

Commit

Permalink
feat(aloha_ws): Clone moveit_visual_tools
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Sep 5, 2024
1 parent 6690a8b commit 76454ea
Show file tree
Hide file tree
Showing 29 changed files with 5,361 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aloha_ws/src/moveit_visual_tools/.ament_flake8.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,Q000
import-order-style = google
max-line-length = 99
show-source = true
statistics = true
75 changes: 75 additions & 0 deletions aloha_ws/src/moveit_visual_tools/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
BasedOnStyle: Google
ColumnLimit: 120
MaxEmptyLinesToKeep: 1
SortIncludes: false

Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
NamespaceIndentation: None
ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false

AlignEscapedNewlinesLeft: false
AlignTrailingComments: true

AllowAllParametersOfDeclarationOnNextLine: false
ExperimentalAutoDetectBinPacking: false
ObjCSpaceBeforeProtocolList: true
Cpp11BracedListStyle: false

AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortCaseLabelsOnASingleLine: false

AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true

BinPackParameters: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
PointerBindsToType: true

PenaltyExcessCharacter: 50
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 1000
PenaltyBreakFirstLessLess: 10
PenaltyBreakString: 100
PenaltyReturnTypeOnItsOwnLine: 50

SpacesBeforeTrailingComments: 2
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true

# Configure each individual brace in BraceWrapping
BreakBeforeBraces: Custom

# Control of individual brace wrapping cases
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
...
48 changes: 48 additions & 0 deletions aloha_ws/src/moveit_visual_tools/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
Checks: '-*,
performance-*,
llvm-namespace-comment,
modernize-redundant-void-arg,
modernize-use-nullptr,
modernize-use-default,
modernize-use-override,
readability-named-parameter,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-boolean-expr,
readability-container-size-empty,
'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
CheckOptions:
- key: llvm-namespace-comment.ShortNamespaceLines
value: '10'
- key: llvm-namespace-comment.SpacesBeforeComments
value: '2'
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
# type names
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
# method names
- key: readability-identifier-naming.MethodCase
value: camelBack
# variable names
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.ClassMemberSuffix
value: '_'
# const static or global variables are UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalVariableCase
value: UPPER_CASE
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)

name: Build and Test

on:
workflow_dispatch:
pull_request:
push:
branches:
- ros2

jobs:
industrial_ci:
strategy:
fail-fast: false
matrix:
env:
- IMAGE: humble-source
- IMAGE: rolling-source
CLANG_TIDY: true

env:
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: moveit_visual_tools.repos
AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src
AFTER_SETUP_UPSTREAM_WORKSPACE_EMBED: set +u && source ~/ws_moveit/install/setup.bash && set - u
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.IMAGE }}
CLANG_TIDY_BASE_REF: ${{ github.base_ref || github.ref }}

name: ${{ matrix.env.IMAGE }}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: cache upstream_ws
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.BASEDIR }}/upstream_ws
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit_visual_tools.repos') }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit_visual_tools.repos') }}
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: cache target_ws
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
- name: cache ccache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- name: industrial_ci
uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env }}
- name: prepare target_ws for cache
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws
21 changes: 21 additions & 0 deletions aloha_ws/src/moveit_visual_tools/.github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This is a format job. Pre-commit has a first-party GitHub action, so we use
# that: https://github.com/pre-commit/action

name: Formatting (pre-commit)

on:
workflow_dispatch:
pull_request:
push:
branches:
- ros2

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format-14
run: sudo apt-get install clang-format-14
- uses: pre-commit/action@v3.0.1
48 changes: 48 additions & 0 deletions aloha_ws/src/moveit_visual_tools/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black

- repo: local
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-14
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']
Loading

0 comments on commit 76454ea

Please sign in to comment.