-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor driver library to follow patterns from PickNikRobotics/ros2_epick_gripper #34
Merged
Merged
Changes from 46 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
6b782ba
Refactoring for testability.
kineticsystem d32b44e
Added simple test.
kineticsystem 1a8aeeb
Pre-commits.
kineticsystem ddda502
Added missing packages for testing.
kineticsystem 79dfec4
In the on_configure method we try to connect to the hardware.
kineticsystem f371468
Added missing package.
kineticsystem c11d657
Refactoring.
kineticsystem 76c5497
Removed not existing package.
kineticsystem 8788593
Removed ros-linter. Reformatted code as per Studio conventions.
kineticsystem d7cfc1b
Revert "Auxiliary commit to revert individual files from 878859365914…
kineticsystem 46b8b58
Linting packages.
kineticsystem 92eefce
Remove ros linting clashing with .clang-format.
kineticsystem 19569f8
Revert "Auxiliary commit to revert individual files from 92eefce7151f…
kineticsystem dad1114
Updated CMakeLists.txt
kineticsystem de63c83
Removed connection to the serial port in the contructor.
kineticsystem 312ab08
Refactoring for testing.
kineticsystem c1dc459
Pre-commits.
kineticsystem 4c3eafc
Added copyright.
kineticsystem e1089ad
Increased max line size to 120.
kineticsystem d283f18
Fixed ROS lints.
kineticsystem 2239dd9
Try to exclude tests from linting.
kineticsystem 011df4b
Removed cppcheck linter because it has problem recognizing macros in …
kineticsystem 7414c37
Trying to add ros2_control_test_assets to test CMakeLists.txt
kineticsystem 56ddcd4
Tryint to build everything on Ubuntu 22.04.
kineticsystem 51e98f8
Moved gripper_interface_test command into its own package.
kineticsystem dfe6f79
Some refactoring.
kineticsystem 21dc2c7
Some refactoring.
kineticsystem 6ccf695
Some refactoring.
kineticsystem 9691e54
Test command refactored.
kineticsystem 685fe55
Ongoing refactoring.
kineticsystem 5a5a62d
Ongoing refactoring.
kineticsystem 91a08d0
Removed bringup package.
kineticsystem 03e3701
Added fake driver for testing. config folder moved from robotiq_drive…
kineticsystem bcd5fe6
Hardware interface and driver refactoring.
kineticsystem 7301c64
Driver refactoring.
kineticsystem d719ed2
Fixed pre-commits.
kineticsystem a434edf
Update .github/workflows/prerelease-check.yml
kineticsystem fb01131
Update .github/workflows/prerelease-check.yml
kineticsystem a5a9468
Update .github/workflows/prerelease-check.yml
kineticsystem 21d1b4f
Update .github/workflows/prerelease-check.yml
kineticsystem c5819d8
Update .github/workflows/prerelease-check.yml
kineticsystem 1658cdf
Adding ros2_control_test_assets to CMakeLists.txt
kineticsystem 9f0a100
Removed unecessary dependencies.
kineticsystem 660eec5
Added CRC-16/MODBUS test.
kineticsystem 0f41ce9
Unit tests.
kineticsystem f5d7b7a
Update robotiq_driver/CMakeLists.txt
kineticsystem 4c3fd18
Removed version from CMakeLists.txt file.
kineticsystem b4b73e6
Merge branch 'main' into pr-refactoring
moriarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,74 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
ColumnLimit: 120 | ||
MaxEmptyLinesToKeep: 1 | ||
SortIncludes: false | ||
|
||
Standard: Auto | ||
IndentWidth: 2 | ||
TabWidth: 2 | ||
UseTab: Never | ||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
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 | ||
AfterEnum: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 100 | ||
ConstructorInitializerIndentWidth: 0 | ||
ContinuationIndentWidth: 2 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ReflowComments: false | ||
... | ||
AfterUnion: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,14 @@ on: | |
jobs: | ||
pre-commit: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Install system hooks | ||
run: sudo apt install -qq clang-format-14 cppcheck | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage manual | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
- name: Install system hooks | ||
run: sudo apt install -qq clang-format-14 cppcheck | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,41 +5,37 @@ on: | |
jobs: | ||
ament_lint: | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [cppcheck, copyright, lint_cmake] | ||
linter: [copyright, lint_cmake] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
linter: ${{ matrix.linter }} | ||
package-name: | ||
robotiq_driver | ||
robotiq_controllers | ||
robotiq_description | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
linter: ${{ matrix.linter }} | ||
package-name: robotiq_driver | ||
robotiq_controllers | ||
robotiq_description | ||
|
||
|
||
ament_lint_100: | ||
ament_lint_121: | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [cpplint] | ||
linter: [cpplint] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
linter: cpplint | ||
arguments: "--linelength=100 --filter=-whitespace/newline" | ||
package-name: | ||
robotiq_driver | ||
robotiq_controllers | ||
robotiq_description | ||
ros2_robotiq_gripper | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
linter: cpplint | ||
arguments: "--linelength=121 --filter=-whitespace/newline" | ||
package-name: robotiq_driver | ||
robotiq_controllers | ||
robotiq_description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,31 +4,27 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
ros_distro: | ||
description: 'Chose ROS distribution' | ||
description: "Chose ROS distribution" | ||
required: true | ||
default: 'rolling' | ||
default: "rolling" | ||
type: choice | ||
options: | ||
- foxy | ||
- galactic | ||
- humble | ||
- iron | ||
- rolling | ||
- humble | ||
- iron | ||
- rolling | ||
branch: | ||
description: 'Chose branch for distro' | ||
description: "Chose branch for distro" | ||
required: true | ||
default: 'master' | ||
default: "main" | ||
type: choice | ||
options: | ||
- foxy | ||
- galactic | ||
- humble | ||
- iron | ||
- master | ||
- humble | ||
- iron | ||
- master | ||
Comment on lines
+21
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be an old/outdated file or one that was autogenerated or accidentally copied while setting up this repo. This repo doesn't have humble/iron/master branches only |
||
|
||
jobs: | ||
pre_release: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this 121 ? that seems strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug in the clang formatter. Sometimes a line is cut at 121 and this causes this linter to fail.
I experienced this bug in one single line of code: hardware_interface.cpp line 73.
If you have any suggestions let me know, maybe I'm missing something.