-
Notifications
You must be signed in to change notification settings - Fork 44
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
ROS2: Add samples and other fixups #109
Merged
Merged
Conversation
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
Change `sample_capture` to capture from yaml settings
Extract methods and cleanup formatting. Remove some less important error checks for readability. Make 2d capture samples loop, like the capture samples. Better align behavior of C++ and Python samples.
Replace `ament_lint_common` with individual linters. Added each linter from common except: `ament_cmake_copyright`. The full list for `ament_lint_common` is found here: https://github.com/ament/ament_lint/blob/master/ament_lint_common/package.xml Add a `pyproject.toml` so that the Black formatting is compatible with the `ament_flake8` linter.
For consistency with our public `zivid-cpp-samples`.
In particular, clang-format provides a lot more stable output for some given input, and typically works better with IDEs. Replace `ament_lint_common` with the same individual linters, with the following exceptions: - Replace `ament_cmake_uncrustify` with `ament_cmake_clang_format`. - Remove `cament_cpp_lint` with the intention of later adding `ament_clang_tidy`. Additionally, run clang-format during code analysis instead of during testing.
This version is not available on the Ubuntu toolchain test apt repository, and will cause failures when trying to build with it.
The flag `CMAKE_CXX_COMPILER` was not previously passed to CMake due to the double quotes in the `build.sh` script. This implies that we didn't previously build with clang. Building with clang started emitting some warnings, causing errors. These warnings have been addressed here as well. Also removed warning `return-std-move-in-c++11` as this was removed in Clang 13 and now causing a compile error: https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html
Only run clang-tidy on Jazzy, as earlier versions cause issues.
apartridge
reviewed
Jul 17, 2024
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.
Overall changes looking good, I will do some testing tomorrow.
zivid_samples/scripts/sample_capture_with_settings_from_file.py
Outdated
Show resolved
Hide resolved
RFNR @apartridge |
…ting parameters in all samples AsyncParameterClient appears not to be available on ROS2 Humble.
apartridge
reviewed
Jul 18, 2024
apartridge
reviewed
Jul 18, 2024
…hen setting parameters in all samples
apartridge
reviewed
Jul 18, 2024
apartridge
reviewed
Jul 18, 2024
apartridge
reviewed
Jul 18, 2024
apartridge
reviewed
Jul 18, 2024
apartridge
reviewed
Jul 18, 2024
Consistent with Python sample.
apartridge
reviewed
Jul 19, 2024
apartridge
approved these changes
Jul 19, 2024
also changes logging from INFO to DEBUG, since setParametersCallback is invoked for a lot of different parameters, not just the ones defined by zivid (coming from ros image_transport etc).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please see individual commits.