Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertWilbrandt committed Nov 22, 2024
0 parents commit 8d5a0a7
Show file tree
Hide file tree
Showing 72 changed files with 8,227 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
IncludeBlocks: Preserve
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++20
TabWidth: 2
UseTab: Never
...
166 changes: 166 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
---
Checks: '
bugprone-*,
clang-analyzer-*,
clang-diagnostic-*,
modernize-*,
performance-*,
readability-*,
-modernize-use-trailing-return-type,
-readability-avoid-const-params-in-decls,
-readability-implicit-bool-conversion,
-readability-magic-numbers,
'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- {key: readability-identifier-naming.ClassCase, value: CamelCase}
- {key: readability-identifier-naming.ClassPrefix, value: ''}
- {key: readability-identifier-naming.ClassSuffix, value: ''}
- {key: readability-identifier-naming.ClassConstantCase, value: UPPER_CASE}
- {key: readability-identifier-naming.ClassConstantPrefix, value: ''}
- {key: readability-identifier-naming.ClassConstantSuffix, value: ''}
- {key: readability-identifier-naming.ClassMemberCase, value: lower_case}
- {key: readability-identifier-naming.ClassMemberPrefix, value: 'm_'}
- {key: readability-identifier-naming.ClassMemberSuffix, value: ''}
- {key: readability-identifier-naming.ClassMethodCase, value: camelBack}
- {key: readability-identifier-naming.ClassMethodPrefix, value: ''}
- {key: readability-identifier-naming.ClassMethodSuffix, value: ''}

- {key: readability-identifier-naming.ConstantCase, value: UPPER_CASE}
- {key: readability-identifier-naming.ConstantPrefix, value: ''}
- {key: readability-identifier-naming.ConstantSuffix, value: ''}
- {key: readability-identifier-naming.ConstantMemberCase, value: UPPER_CASE}
- {key: readability-identifier-naming.ConstantMemberPrefix, value: ''}
- {key: readability-identifier-naming.ConstantMemberSuffix, value: 'm_'}
- {key: readability-identifier-naming.ConstantParameterCase, value: lower_case}
- {key: readability-identifier-naming.ConstantParameterPrefix, value: ''}
- {key: readability-identifier-naming.ConstantParameterSuffix, value: ''}
- {key: readability-identifier-naming.ConstexprFunctionCase, value: camelBack}
- {key: readability-identifier-naming.ConstexprFunctionPrefix, value: ''}
- {key: readability-identifier-naming.ConstexprFunctionSuffix, value: ''}
- {key: readability-identifier-naming.ConstexprMethodCase, value: camelBack}
- {key: readability-identifier-naming.ConstexprMethodPrefix, value: ''}
- {key: readability-identifier-naming.ConstexprMethodSuffix, value: ''}
- {key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE}
- {key: readability-identifier-naming.ConstexprVariablePrefix, value: ''}
- {key: readability-identifier-naming.ConstexprVariableSuffix, value: ''}

- {key: readability-identifier-naming.EnumCase, value: CamelCase}
- {key: readability-identifier-naming.EnumPrefix, value: ''}
- {key: readability-identifier-naming.EnumSuffix, value: ''}
- {key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE}
- {key: readability-identifier-naming.EnumConstantPrefix, value: ''}
- {key: readability-identifier-naming.EnumConstantSuffix, value: ''}

- {key: readability-identifier-naming.FunctionCase, value: camelBack}
- {key: readability-identifier-naming.FunctionPrefix, value: ''}
- {key: readability-identifier-naming.FunctionSuffix, value: ''}

- {key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE}
- {key: readability-identifier-naming.GlobalConstantPrefix, value: ''}
- {key: readability-identifier-naming.GlobalConstantSuffix, value: ''}
- {key: readability-identifier-naming.GlobalFunctionCase, value: camelBack}
- {key: readability-identifier-naming.GlobalFunctionPrefix, value: ''}
- {key: readability-identifier-naming.GlobalFunctionSuffix, value: ''}
- {key: readability-identifier-naming.GlobalVariableCase, value: lower_case}
- {key: readability-identifier-naming.GlobalVariablePrefix, value: 'g_'}
- {key: readability-identifier-naming.GlobalVariableSuffix, value: ''}

- {key: readability-identifier-naming.InlineNamespaceCase, value: lower_case}
- {key: readability-identifier-naming.InlineNamespacePrefix, value: ''}
- {key: readability-identifier-naming.InlineNamespaceSuffix, value: ''}

- {key: readability-identifier-naming.LocalConstantCase, value: lower_case}
- {key: readability-identifier-naming.LocalConstantPrefix, value: ''}
- {key: readability-identifier-naming.LocalConstantSuffix, value: ''}
- {key: readability-identifier-naming.LocalVariableCase, value: lower_case}
- {key: readability-identifier-naming.LocalVariablePrefix, value: ''}
- {key: readability-identifier-naming.LocalVariableSuffix, value: ''}

- {key: readability-identifier-naming.MethodCase, value: camelBack}
- {key: readability-identifier-naming.MethodPrefix, value: ''}
- {key: readability-identifier-naming.MethodSuffix, value: ''}

- {key: readability-identifier-naming.NamespaceCase, value: lower_case}
- {key: readability-identifier-naming.NamespacePrefix, value: ''}
- {key: readability-identifier-naming.NamespaceSuffix, value: ''}

- {key: readability-identifier-naming.ParameterCase, value: lower_case}
- {key: readability-identifier-naming.ParameterPrefix, value: ''}
- {key: readability-identifier-naming.ParameterSuffix, value: ''}
- {key: readability-identifier-naming.ParameterPackCase, value: lower_case}
- {key: readability-identifier-naming.ParameterPackPrefix, value: ''}
- {key: readability-identifier-naming.ParameterPackSuffix, value: ''}

- {key: readability-identifier-naming.PrivateMemberCase, value: lower_case}
- {key: readability-identifier-naming.PrivateMemberPrefix, value: 'm_'}
- {key: readability-identifier-naming.PrivateMemberSuffix, value: ''}
- {key: readability-identifier-naming.PrivateMethodCase, value: camelBack}
- {key: readability-identifier-naming.PrivateMethodPrefix, value: ''}
- {key: readability-identifier-naming.PrivateMethodSuffix, value: ''}

- {key: readability-identifier-naming.ProtectedMemberCase, value: lower_case}
- {key: readability-identifier-naming.ProtectedMemberPrefix, value: 'm_'}
- {key: readability-identifier-naming.ProtectedMemberSuffix, value: ''}
- {key: readability-identifier-naming.ProtectedMethodCase, value: camelBack}
- {key: readability-identifier-naming.ProtectedMethodPrefix, value: ''}
- {key: readability-identifier-naming.ProtectedMethodSuffix, value: ''}

- {key: readability-identifier-naming.PublicMemberCase, value: lower_case}
- {key: readability-identifier-naming.PublicMemberPrefix, value: ''}
- {key: readability-identifier-naming.PublicMemberSuffix, value: ''}
- {key: readability-identifier-naming.PublicMethodCase, value: camelBack}
- {key: readability-identifier-naming.PublicMethodPrefix, value: ''}
- {key: readability-identifier-naming.PublicMethodSuffix, value: ''}

- {key: readability-identifier-naming.StaticConstantCase, value: UPPER_CASE}
- {key: readability-identifier-naming.StaticConstantPrefix, value: ''}
- {key: readability-identifier-naming.StaticConstantSuffix, value: '_'}
- {key: readability-identifier-naming.StaticVariableCase, value: lower_case}
- {key: readability-identifier-naming.StaticVariablePrefix, value: ''}
- {key: readability-identifier-naming.StaticVariableSuffix, value: ''}

- {key: readability-identifier-naming.StructCase, value: CamelCase}
- {key: readability-identifier-naming.StructPrefix, value: ''}
- {key: readability-identifier-naming.StructSuffix, value: ''}

- {key: readability-identifier-naming.TemplateParameterCase, value: CamelCase}
- {key: readability-identifier-naming.TemplateParameterPrefix, value: ''}
- {key: readability-identifier-naming.TemplateParameterSuffix, value: 'T'}
- {key: readability-identifier-naming.TemplateTemplateParameterCase, value: CamelCase}
- {key: readability-identifier-naming.TemplateTemplateParameterPrefix, value: ''}
- {key: readability-identifier-naming.TemplateTemplateParameterSuffix, value: 'T'}

- {key: readability-identifier-naming.TypeTemplateParameterCase, value: CamelCase}
- {key: readability-identifier-naming.TypeTemplateParameterPrefix, value: ''}
- {key: readability-identifier-naming.TypeTemplateParameterSuffix, value: 'T'}
- {key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp, value: 'T|Ts'}

- {key: readability-identifier-naming.TypedefCase, value: camelBack}
- {key: readability-identifier-naming.TypedefPrefix, value: ''}
- {key: readability-identifier-naming.TypedefSuffix, value: ''}

- {key: readability-identifier-naming.UnionCase, value: CamelCase}
- {key: readability-identifier-naming.UnionPrefix, value: ''}
- {key: readability-identifier-naming.UnionSuffix, value: ''}

- {key: readability-identifier-naming.ValueTemplateParameterCase, value: CamelCase}
- {key: readability-identifier-naming.ValueTemplateParameterPrefix, value: ''}
- {key: readability-identifier-naming.ValueTemplateParameterSuffix, value: ''}

- {key: readability-identifier-naming.VariableCase, value: lower_case}
- {key: readability-identifier-naming.VariablePrefix, value: ''}
- {key: readability-identifier-naming.VariableSuffix, value: ''}
- {key: readability-identifier-naming.VariableIgnoredRegexp, value: "^[A-Z]{1,2}(_.{1,3})?$"}

- {key: readability-identifier-naming.VirtualMethodCase, value: camelBack}
- {key: readability-identifier-naming.VirtualMethodPrefix, value: ''}
- {key: readability-identifier-naming.VirtualMethodSuffix, value: ''}

- {key: readability-identifier-length.MinimumVariableNameLength, value: 0}
- {key: readability-identifier-length.MinimumParameterNameLength, value: 0}
- {key: readability-identifier-length.MinimumLoopCounterNameLength, value: 0}
- {key: readability-identifier-length.MinimumExceptionNameLength, value: 0}
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
exclude: "kuka_rsi_driver/krl/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: fix-byte-order-marker # Forbid UTF-8 byte-order markers
- repo: https://github.com/pocc/pre-commit-hooks.git
rev: v1.3.5
hooks:
- id: clang-format
- id: clang-tidy
args:
- --version=18
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# kuka_rsi_driver

This repository provides a [ros2_control](https://control.ros.org) based driver for kuka industrial
robot arms using the RSI protocol.

---
**NOTE**

This driver was tested on a limited set of robots (see [Tested with](#tested-with) section), but has to be considered experimental. In particular, the chosen communication structure should be more robust against disturbances, but is not thoroughly vetted.

---

## Packages in the Repository

- `kuka_rsi_driver`: The `ros2_control` hardware interface for communicating with the robot.
- `kuka_rsi_controllers`: Controllers for interfacing with vendor-specific functions of the robot.
- `kuka_rsi_interfaces`: Interface definitions used in `kuka_rsi_controllers`.

## Getting Started

This driver only provides an implementation of the robot realtime communication, but no specific robot support package. Take a look at [the documentation](kuka_rsi_driver/doc/index.rst) for informations on how to get started and integrate it into an existing setup.

## Features

This driver provides the following features:
- Joint position control and feedback.
- Publishing of joint torques.
- Publishing of Cartesian TCP pose.
- Speed scaling using slider on teach pendant (see KRL `$OV_PRO` variable).
- Robust fully asynchronous real-time communication.

## Tested With

So far, the driver was tested with the following robot models:
* **Agilus KR 10 R900 sixx** (KR C4 Controller)
* **IONTEC KR50 R2100** (KR C5 Controller)

## Acknowledgements

Development of this driver was in parts supported by the project "GANResilRob - Generative Adversarial Networks and Semantics for Resilient, Flexible Production Robots", funded by the German Federal Ministry for Economic Affairs and Climate Action.
Loading

0 comments on commit 8d5a0a7

Please sign in to comment.