Skip to content

Commit

Permalink
Merge pull request #111 from zivid/ros2
Browse files Browse the repository at this point in the history
Support for ROS 2
  • Loading branch information
micragz authored Jul 24, 2024
2 parents 63fc60f + aef677f commit 6ecc347
Show file tree
Hide file tree
Showing 73 changed files with 3,436 additions and 4,340 deletions.
81 changes: 19 additions & 62 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,65 +1,22 @@
# Style from `ament_clang_format` linter.
# https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
---
BasedOnStyle: Google
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
PointerBindsToType: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1
PenaltyBreakFirstLessLess: 1000
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 90
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: false
Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
SortIncludes: false
SpaceAfterCStyleCast: false
Language: Cpp
BasedOnStyle: Google

# Configure each individual brace in BraceWrapping
AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterEnum: true
BreakBeforeBraces: Custom

# Control of individual brace wrapping cases
BraceWrapping: {
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
}
ColumnLimit: 100
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
PointerAlignment: Middle
ReflowComments: false
...
32 changes: 20 additions & 12 deletions .github/workflows/ROS-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
lfs: false
- name: Run code_analysis.sh
run: |
CI_TEST_OS=ros:noetic-ros-base-focal \
CI_TEST_OS=ros:humble-ros-base-jammy \
./continuous-integration/run_code_analysis_in_docker.sh
- name: Notify Teams
if: ${{ failure() && github.ref == 'refs/heads/master' }}
Expand All @@ -34,17 +34,25 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ros:noetic-ros-base-focal']
os: ['ros:humble-ros-base-jammy', 'ros:iron-ros-core-jammy', 'ros:jazzy-ros-core-noble']
compiler: ['g++', 'clang++']
include:
- os: 'ros:noetic-ros-base-focal'
compiler: 'g++-10'
- os: 'ros:noetic-ros-base-focal'
compiler: 'g++-11'
- os: 'ros:noetic-ros-base-focal'
compiler: 'clang++-11'
- os: 'ros:noetic-ros-base-focal'
compiler: 'clang++-12'
- os: 'ros:humble-ros-base-jammy'
compiler: 'g++-12'
- os: 'ros:humble-ros-base-jammy'
compiler: 'g++-13'
- os: 'ros:humble-ros-base-jammy'
compiler: 'clang++-15'
- os: 'ros:jazzy-ros-core-noble'
compiler: 'clang++-14'
- os: 'ros:jazzy-ros-core-noble'
compiler: 'clang++-15'
- os: 'ros:jazzy-ros-core-noble'
compiler: 'clang++-16'
- os: 'ros:jazzy-ros-core-noble'
compiler: 'clang++-17'
- os: 'ros:jazzy-ros-core-noble'
compiler: 'clang++-18'
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -68,7 +76,7 @@ jobs:
fail-fast: true
matrix:
zivid-version: ['2.9.0+4dbba385-1', '2.10.0+8ce7dae3-2', '2.10.1+50b274e8-7', '2.11.0+95829246-1', '2.11.1+de9b5dae-1', '2.12.0+6afd4961-1', '2.13.0+99a4ce9e-1']
ros-distro: ['ros:noetic-ros-base-focal']
ros-distro: ['ros:humble-ros-base-jammy']
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -78,7 +86,7 @@ jobs:
run: |
CI_TEST_ZIVID_VERSION=${{ matrix.zivid-version }} \
CI_TEST_OS=${{ matrix.ros-distro }} \
CI_TEST_COMPILER="g++-7" \
CI_TEST_COMPILER="g++" \
CI_TEST_DOWNLOAD_TELICAM=${{ (matrix.zivid-version == '2.12.0+6afd4961-1' || matrix.zivid-version == '2.13.0+99a4ce9e-1') && '0' || '1' }} \
./continuous-integration/run_build_and_test_in_docker.sh
- name: Notify Teams
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
install/
log/
.idea/
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

This project adheres to [Semantic Versioning](https://semver.org).

# 3.0.0

* Driver is updated with support for ROS 2. ROS 1 is no longer supported. If you need support
for ROS 1, check one of the earlier releases below, or use the branch `ros1-master`.
* Capture settings must be set via .yml files or YAML strings, which can be exported from
Zivid Studio or the Zivid SDK. The driver no longer supports changing individual Zivid
settings nodes directly from ROS. See the Configuration section of the [README](./README.md)
for more details.
* Service descriptions have been moved to a separate ROS package named `zivid_interfaces`.
* The `capture` and `capture_2d` services now use the standard `std_srvs/srv/Trigger` type.
* The `load_settings_from_file` and `load_settings_2d_from_file` services are removed. Settings
files must now be configured via parameters. See the Configuration section of the
[README](./README.md) for more details.
* The data type of the `rgba` field in the `points/xyzrgba` topic is changed from `FLOAT32` to
`UINT32`.

## 2.5.0

* Fixed an issue where the driver when running as a nodelet could not attach to a manager
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Any contribution that you make to this repository will
be under the 3-Clause BSD License, as dictated by that
[license](https://opensource.org/licenses/BSD-3-Clause).
Loading

0 comments on commit 6ecc347

Please sign in to comment.