Skip to content

Commit 6d0d747

Browse files
committed
format the code and address #7
1 parent a729fb6 commit 6d0d747

File tree

112 files changed

+125030
-124641
lines changed

Some content is hidden

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

112 files changed

+125030
-124641
lines changed

.clang-format

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
BasedOnStyle: Google
3+
ColumnLimit: 120
4+
MaxEmptyLinesToKeep: 1
5+
SortIncludes: false
6+
7+
Standard: Auto
8+
IndentWidth: 4
9+
TabWidth: 4
10+
UseTab: Never
11+
AccessModifierOffset: -4
12+
ConstructorInitializerIndentWidth: 4
13+
NamespaceIndentation: None
14+
ContinuationIndentWidth: 4
15+
IndentCaseLabels: true
16+
IndentFunctionDeclarationAfterType: false
17+
18+
AlignEscapedNewlinesLeft: false
19+
AlignTrailingComments: true
20+
21+
AllowAllParametersOfDeclarationOnNextLine: false
22+
ExperimentalAutoDetectBinPacking: false
23+
ObjCSpaceBeforeProtocolList: true
24+
Cpp11BracedListStyle: false
25+
26+
AllowShortBlocksOnASingleLine: true
27+
AllowShortIfStatementsOnASingleLine: false
28+
AllowShortLoopsOnASingleLine: false
29+
AllowShortFunctionsOnASingleLine: None
30+
AllowShortCaseLabelsOnASingleLine: false
31+
32+
AlwaysBreakTemplateDeclarations: true
33+
AlwaysBreakBeforeMultilineStrings: false
34+
BreakBeforeBinaryOperators: false
35+
BreakBeforeTernaryOperators: false
36+
BreakConstructorInitializersBeforeComma: true
37+
38+
BinPackParameters: true
39+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
40+
DerivePointerBinding: false
41+
PointerBindsToType: true
42+
43+
PenaltyExcessCharacter: 50
44+
PenaltyBreakBeforeFirstCallParameter: 30
45+
PenaltyBreakComment: 1000
46+
PenaltyBreakFirstLessLess: 10
47+
PenaltyBreakString: 100
48+
PenaltyReturnTypeOnItsOwnLine: 50
49+
50+
SpacesBeforeTrailingComments: 2
51+
SpacesInParentheses: false
52+
SpacesInAngles: false
53+
SpaceInEmptyParentheses: false
54+
SpacesInCStyleCastParentheses: false
55+
SpaceAfterCStyleCast: false
56+
SpaceAfterControlStatementKeyword: true
57+
SpaceBeforeAssignmentOperators: true
58+
59+
# Configure each individual brace in BraceWrapping
60+
BreakBeforeBraces: Custom
61+
62+
# Control of individual brace wrapping cases
63+
BraceWrapping:
64+
AfterCaseLabel: true
65+
AfterClass: true
66+
AfterControlStatement: true
67+
AfterEnum: true
68+
AfterFunction: true
69+
AfterNamespace: true
70+
AfterStruct: true
71+
AfterUnion: true
72+
BeforeCatch: true
73+
BeforeElse: true
74+
IndentBraces: false
75+
...

.clang-tidy

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
Checks: '-*,
3+
performance-*,
4+
llvm-namespace-comment,
5+
modernize-redundant-void-arg,
6+
modernize-use-nullptr,
7+
modernize-use-default,
8+
modernize-use-override,
9+
modernize-loop-convert,
10+
readability-named-parameter,
11+
readability-redundant-smartptr-get,
12+
readability-redundant-string-cstr,
13+
readability-simplify-boolean-expr,
14+
readability-container-size-empty,
15+
readability-identifier-naming,
16+
'
17+
HeaderFilterRegex: ''
18+
AnalyzeTemporaryDtors: false
19+
CheckOptions:
20+
- key: llvm-namespace-comment.ShortNamespaceLines
21+
value: '10'
22+
- key: llvm-namespace-comment.SpacesBeforeComments
23+
value: '2'
24+
- key: readability-braces-around-statements.ShortStatementLines
25+
value: '2'
26+
# type names
27+
- key: readability-identifier-naming.ClassCase
28+
value: CamelCase
29+
- key: readability-identifier-naming.EnumCase
30+
value: CamelCase
31+
- key: readability-identifier-naming.UnionCase
32+
value: CamelCase
33+
# method names
34+
- key: readability-identifier-naming.MethodCase
35+
value: camelBack
36+
# variable names
37+
- key: readability-identifier-naming.VariableCase
38+
value: lower_case
39+
- key: readability-identifier-naming.ClassMemberSuffix
40+
value: '_'
41+
# const static or global variables are UPPER_CASE
42+
- key: readability-identifier-naming.EnumConstantCase
43+
value: UPPER_CASE
44+
- key: readability-identifier-naming.StaticConstantCase
45+
value: UPPER_CASE
46+
- key: readability-identifier-naming.ClassConstantCase
47+
value: UPPER_CASE
48+
- key: readability-identifier-naming.GlobalVariableCase
49+
value: UPPER_CASE
50+
...

.pre-commit-config.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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: v4.3.0
19+
hooks:
20+
- id: check-added-large-files
21+
- id: check-case-conflict
22+
- id: check-merge-conflict
23+
- id: check-symlinks
24+
- id: check-yaml
25+
- id: debug-statements
26+
- id: end-of-file-fixer
27+
- id: mixed-line-ending
28+
- id: trailing-whitespace
29+
30+
- repo: https://github.com/psf/black
31+
rev: 22.3.0
32+
hooks:
33+
- id: black
34+
35+
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
36+
rev: v1.0.1
37+
hooks:
38+
- id: rst-linter
39+
exclude: .*/doc/.*
40+
41+
- repo: local
42+
hooks:
43+
- id: misspelled-moveit
44+
name: misspelled-moveit
45+
description: MoveIt should be spelled exactly as MoveIt
46+
language: pygrep
47+
entry: Moveit\W|MoveIt!
48+
exclude: .pre-commit-config.yaml
49+
- id: clang-format
50+
name: clang-format
51+
description: Format files with ClangFormat.
52+
entry: clang-format-11
53+
language: system
54+
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
55+
args: ["-fallback-style=none", "-i"]
56+
- id: catkin_lint
57+
name: catkin_lint
58+
description: Check package.xml and cmake files
59+
entry: catkin_lint .
60+
language: system
61+
always_run: true
62+
pass_filenames: false

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
sudo: required
2-
dist: xenial
3-
language: generic
1+
sudo: required
2+
dist: xenial
3+
language: generic
44
compiler:
55
- gcc
66
notifications:
@@ -21,5 +21,5 @@ matrix:
2121
- env: ROS_DISTRO="melodic" PRERELEASE=true
2222
install:
2323
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
24-
script:
24+
script:
2525
- source .ci_config/travis.sh

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2020
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2121
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2222
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Robotiq 140mm 2-Finger-Adaptive-Gripper
1+
# Robotiq 140mm 2-Finger-Adaptive-Gripper
22

33
This package contains the URDF files describing the 140mm stroke gripper from robotiq, also known as series **C3**.
44

5-
To test the gripper URDF description type
5+
To test the gripper URDF description type
66

77
```
8-
roslaunch robotiq_2f_140_gripper_visualization test_2f_140_model.launch
8+
roslaunch robotiq_2f_140_gripper_visualization test_2f_140_model.launch
99
```
1010
## Robot Visual
1111
![140](https://user-images.githubusercontent.com/8356912/49428409-463f8580-f7a6-11e8-8278-5246acdc5c14.png)
1212

13-
## Robot Collision
13+
## Robot Collision
1414
![1402](https://user-images.githubusercontent.com/8356912/49428407-463f8580-f7a6-11e8-9c4e-df69e478f107.png)
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Robotiq 85mm 2-Finger-Adaptive-Gripper
1+
# Robotiq 85mm 2-Finger-Adaptive-Gripper
22

33
This package contains the URDF files describing the 85mm stroke gripper from robotiq, also known as series **C3**.
44

5-
To test the gripper URDF description type
5+
To test the gripper URDF description type
66

77
```
8-
roslaunch robotiq_2f_85_gripper_visualization test_2f_85_model.launch
8+
roslaunch robotiq_2f_85_gripper_visualization test_2f_85_model.launch
99
```
1010
## Robot Visual
1111
![85](https://user-images.githubusercontent.com/8356912/49428405-45a6ef00-f7a6-11e8-822b-c6870c39d445.png)
1212

13-
## Robot Collision
13+
## Robot Collision
1414
![852](https://user-images.githubusercontent.com/8356912/49428404-450e5880-f7a6-11e8-82a8-564247ebe7fc.png)
15-

robotiq_2f_85_gripper_visualization/launch/test_2f_85_model.launch

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<launch>
44
<arg name="gui" default="True" />
55
<param name="use_gui" value="$(arg gui)"/>
6-
7-
<param name="robot_description" command="$(find xacro)/xacro $(find robotiq_2f_85_gripper_visualization)/urdf/robotiq_arg2f_85_model.xacro" />
8-
6+
7+
<param name="robot_description" command="$(find xacro)/xacro $(find robotiq_2f_85_gripper_visualization)/urdf/robotiq_arg2f_85_model.xacro" />
8+
99
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
1010
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
1111

0 commit comments

Comments
 (0)