feat(Ouster): add ouster lidar support#456
Conversation
|
With regard to sample bag files, I already provided one for FW 3.2 in this comment: #436 (comment) I will upload one soon for FW 4.0 |
|
@Samahu Thank you! Given ROS buildfarm issues with submodules / .repos / FetchContent, the vendored SDK indeed seems like the best option. Just some very minor feedback before diving into the review:
Thank you for your continued cooperation! |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (24.22%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
===========================================
- Coverage 40.18% 24.22% -15.96%
===========================================
Files 132 9 -123
Lines 10293 454 -9839
Branches 5402 139 -5263
===========================================
- Hits 4136 110 -4026
+ Misses 3799 340 -3459
+ Partials 2358 4 -2354
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
At @mojomex I have resolved all the above comments. |
|
Note that I went back to the moment before |
mojomex
left a comment
There was a problem hiding this comment.
Thank you! I think this is already really close to what we imagined. I left a few small comments and will test behavior once they are addressed. Please also add an Ouster section to docs/ - just supported sensors and their params, similar to the other vendors are enough.
Please let me know if anything is unclear about Nebula's internal interfaces etc.
|
I have resolved 70-80% of the comments .. The CI fails due to spell-check, the majority of these spell checks stems from ouster-sdk code .. but we decided to minimize edits to ouster-sdk code.. The Github workflow pulls the spell-check rules from an external URL (in autoware) .. how should I approach this problem? |
|
@Samahu Thank you for addressing the feedback! For spell-check, don't worry about it - I'll PR a fix to your branch. |
|
Ok, I pushed another update wiring OusterCalibrationData between ouster-ros-wrapper package and the decoder. The http sensor communication is now done completely outside of the decoder code. |
There was a |
a07d7b3 to
17e16c2
Compare
|
I have resolved the failing codecov checks by adding |
|
any update |
|
Hi @Samahu thanks for this. We're also interested in this Feature and are willing to test it in our setup. |
The CI build failed because find_package(libzip REQUIRED) was resolving to the system libzip-config.cmake, which references /usr/bin/zipcmp (from the libzip-tools package, not installed in CI). Fix: prepend the ouster-sdk cmake directory to CMAKE_MODULE_PATH before the find_package call so that the bundled Findlibzip.cmake (which uses pkg-config to find libzip and avoids the broken targets) is used instead.
… minor syntax suggestions
…hout tests - Add explicit patch status (target: 80%, threshold: 5%) to prevent default patch check from failing on new code - Add src/nebula_ouster/.* to ignore list since ouster packages don't have CI test infrastructure yet
- Add test_ouster_decoder.cpp with tests for: - Empty packet error handling - Callback not set error handling - Invalid packet size error handling - Valid lidar packet decode - Set/replace pointcloud callback - Lidar packet size getter - DecodeError to_cstr conversion - Performance counters recording - Move construction - Add test_ouster_calibration_data.cpp with tests for: - Load from string (success and empty) - Load from file (success, not found, empty) - Save to file (success and invalid path) - Update CMakeLists.txt for both packages to register tests - Add test dependencies to package.xml files - Fix BUILD_TESTING save/restore around ouster-sdk subdirectory - Revert nebula_ouster exclusion from .codecov.yml
1ab3019 to
0d9b29e
Compare
|
resolved codecov complaints and rebased again |
|
Can we run the CI one more time to confirm the codecov has been fixed? |
There was a problem hiding this comment.
Apologies for the long wait and thank you for your patience! We were quite swamped internally 🙇
Code is looking really good, no new feedback!
One small build change I'd like to request:
In CI, we're using colcon build --packages-up-to to build Nebula, which works for this PR. However, many projects using Nebula are just using colcon build, and that fails:
Starting >>> ouster-sdk
--- stderr: ouster-sdk
CMake Error at CMakeLists.txt:92 (add_subdirectory):
add_subdirectory given source "ouster_pcap" which is not an existing
directory.
CMake Error at CMakeLists.txt:96 (add_subdirectory):
add_subdirectory given source "ouster_osf" which is not an existing
directory.
CMake Error at CMakeLists.txt:97 (add_subdirectory):
add_subdirectory given source "thirdparty/zpng" which is not an existing
directory.
CMake Error at CMakeLists.txt:102 (add_subdirectory):
add_subdirectory given source "ouster_viz" which is not an existing
directory.
CMake Error at CMakeLists.txt:106 (add_subdirectory):
add_subdirectory given source "ouster_mapping" which is not an existing
directory.
---
Failed <<< ouster-sdk [0.79s, exited with code 1]
Upon closer inspection, the src/nebula_ouster/vendor/ouster-sdk/CMakeLists.txt doesn't seem to be used at all. Instead, nebula_ouster_decoders etc. point to the SDK paths they need.
Possible fixes are:
- remove the CMakeLists.txt so Colcon doesn't recognize it as a package
- place a COLCON_IGNORE file in
src/nebula_ouster/vendor/ - make the package buildable and link
nebula_ouster_...against the built SDK
Also, since there's no default calibration data, I was not able to test on the packets from #436 (comment) . I saw that the unit tests are using ouster::sdk::core::default_sensor_info(ouster::sdk::core::LidarMode::_512x10) to get some generic data. Is it possible to make this an official fallback when no calibration data exists?
| max_hz: 12.0 | ||
| num_frame_transition: 1 | ||
| packet_liveness: | ||
| timeout_ms: 1000 |
There was a problem hiding this comment.
(nit) I think this is fine not to expose to users. We usually know that the min. frequency of the sensor is e.g. 10Hz (100ms period), so any threshold at or below that is fine. Too low and we run into scheduling effects, so I'd set it to 100ms for now.
There was a problem hiding this comment.
I found this same issue, building the package fails due to the subfolders missing.
Even if I change the lines in the CMakeLists.txt to disable those options I get a large list of additional errors regarding the ouster_json.hpp
...
--- stderr: ouster-sdk
In file included from /workspaces/autoware_iv/src/sensor_component/external/nebula/src/nebula_ouster/vendor/ouster-sdk/ouster_client/src/sensor_info.cpp:14:
/workspaces/autoware_iv/src/sensor_component/external/nebula/src/nebula_ouster/vendor/ouster-sdk/thirdparty/ouster_json.hpp:102:25: error: ‘is_same_vz’ is not a member of ‘std’; did you mean ‘is_same’?
102 | !std::is_same_vz<std::decay_t<T>, json> &&
| ^~~~~~~~~~
| is_same
....
|
@marioney Hey, that's awesome to hear! It would mean a lot to us if you could test this PR with your Ouster sensor and comment if it was successful, or if there were any issues that need addressing. |
|
@Samahu Not for this PR, but has Ouster previously looked into packaging Ouster SDK for ROS buildfarm? There's quite a few |
I don't see it happening in the near term. Unfortunately. |
PR Type
Related Links
Closes #212
Replaces #433
Replaces #436
Replaces #440
Description
The PR resolves all the complaints around the previous attempts, #422, #436, #440. It reduces the number of files required to add support to ouster from 500+ to less than 200 files including the decoders code
In addition, this PR update to ouster-sdk 0.16.2 which adds support for REV8 hardware and color lidar support.
The being said, the driver doesn't yet parse and publish color information even when the sensor supports it.
Review Procedure
sensor_model.param.yamland set thesensor_ipanddest_ipto match your environmentRemarks
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks