Skip to content

Commit

Permalink
Support for ROS 2
Browse files Browse the repository at this point in the history
This commit updates the zivid driver to support ROS2.

See the CHANGELOG.md for user-facing changes and see the README.md
for a general description of the ROS2 driver.

Co-authored-by: Michael R. P. Ragazzon <[email protected]>
  • Loading branch information
apartridge and micragz committed Jul 24, 2024
1 parent 55b878e commit aef677f
Show file tree
Hide file tree
Showing 73 changed files with 3,270 additions and 4,033 deletions.
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Based on https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
# Style from `ament_clang_format` linter.
# https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
---
Language: Cpp
BasedOnStyle: Google
Expand All @@ -18,3 +19,4 @@ 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 aef677f

Please sign in to comment.