Skip to content

feat(nebula_sample): add sample sensor package as template#382

Merged
mojomex merged 73 commits intotier4:mainfrom
drwnz:feat/sample_sensor
Mar 31, 2026
Merged

feat(nebula_sample): add sample sensor package as template#382
mojomex merged 73 commits intotier4:mainfrom
drwnz:feat/sample_sensor

Conversation

@drwnz
Copy link
Copy Markdown
Collaborator

@drwnz drwnz commented Dec 3, 2025

PR Type

  • Feature

Related Links

  • N/A

Description

Add a new nebula_sample package that serves as a vendor-agnostic template for integrating new sensors into Nebula.

Goals

This package achieves three main objectives:

  1. Faster onboarding: Provides a working example that developers can copy and modify to add support for new sensors.
  2. Clear architecture: Demonstrates the modular structure of Nebula with separate packages for common, decoders, hardware interfaces, and ROS wrapper.
  3. Documentation: Includes a simple integration guide with step-by-step instructions and implementation details.

Package Structure

The sample sensor consists of four packages:

  • nebula_sample_common - Common definitions and configuration structures
  • nebula_sample_decoders - Packet decoder and driver implementation
  • nebula_sample_hw_interfaces - Hardware interface for sensor communication
  • nebula_sample - ROS 2 wrapper and launch files

Key Features

  • ✅ Compiles and runs without errors
  • ✅ Empty/stub implementations for required classes
  • ✅ Integration guide included in the tutorial documentation (integration_guide.md)
  • ✅ Based on Hesai implementation structure
  • ✅ Passes all pre-commit checks

Documentation

  • README.md - Quick overview and package structure
  • INTEGRATION_GUIDE.md - Simple integration instructions covering:
    • Cloning and renaming the package
    • Implementation details for each component
    • Verification steps
    • Checklist for developers

Pre-Review Checklist for the PR Author

  • Assign PR to reviewer
  • All files pass pre-commit checks
  • Package builds successfully
  • Launch file works correctly

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • PR title describes the changes
  • Documentation is clear and comprehensive

Post-Review Checklist for the PR Author

  • All open points are addressed and tracked via issues or tickets

drwnz added 3 commits December 3, 2025 22:10
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
@drwnz drwnz requested review from Copilot and mojomex December 3, 2025 14:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a vendor-agnostic nebula_sample package template to accelerate integration of new sensors into the Nebula LiDAR driver framework. It provides a complete working example with stub implementations that compile successfully and can serve as a copy-and-modify starting point for developers.

  • Implements four-package modular structure (common, decoders, hw_interfaces, ROS wrapper)
  • Includes comprehensive integration guide with step-by-step instructions
  • Provides stub implementations that demonstrate the required architecture

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/nebula_sample/nebula_sample_common/* Common configuration structures and dependencies
src/nebula_sample/nebula_sample_decoders/* Decoder interface and driver with stub packet parsing
src/nebula_sample/nebula_sample_hw_interfaces/* Hardware interface for sensor communication setup
src/nebula_sample/nebula_sample/* ROS 2 wrapper node with point cloud publisher and launch file
src/nebula_sample/README.md Package overview and quick-start documentation
src/nebula_sample/INTEGRATION_GUIDE.md Detailed step-by-step integration instructions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/nebula_sample/nebula_sample/CMakeLists.txt Outdated
Copy link
Copy Markdown
Collaborator

@mojomex mojomex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think it's already close to what we want!

I left some smaller feedback about overly Hesai-specific examples and style.
Maybe comments in the code to make the role of each of the function stubs more understandable would be nice.

As for the integration guide, I think it would need to contain sections about what building blocks Nebula provides (UDP socket handling, diagnostic helpers, etc.), and also about the required behavior on startup, reconfiguration, connection loss, etc.
I alos think that the guide shall be moved to the docs and rendered with Mkdocs to have everything in one place.

Comment thread src/nebula_sample/nebula_sample_common/package.xml Outdated
Comment thread src/nebula_sample/nebula_sample_common/package.xml Outdated
Comment thread src/nebula_sample/nebula_sample/CMakeLists.txt Outdated
Comment thread src/nebula_sample/nebula_sample_decoders/src/sample_driver.cpp Outdated
drwnz added 3 commits December 9, 2025 13:14
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
@drwnz drwnz force-pushed the feat/sample_sensor branch from 2144e77 to d61f787 Compare December 9, 2025 05:30
pre-commit-ci Bot and others added 3 commits December 9, 2025 05:30
…dor-neutral guidance

Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.31%. Comparing base (da35f1f) to head (baaea9c).
⚠️ Report is 1 commits behind head on main.

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
- Coverage   48.34%   48.31%   -0.03%     
==========================================
  Files         156      157       +1     
  Lines       12996    13003       +7     
  Branches     6901     6901              
==========================================
  Hits         6283     6283              
- Misses       5326     5333       +7     
  Partials     1387     1387              
Flag Coverage Δ
nebula_core_common 61.00% <0.00%> (?)
nebula_core_hw_interfaces 61.00% <0.00%> (?)
nebula_core_ros 61.00% <0.00%> (?)
nebula_sample 61.00% <0.00%> (?)
nebula_sample_common 61.00% <0.00%> (?)
nebula_sample_decoders 61.00% <0.00%> (?)
nebula_sample_hw_interfaces 61.00% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

drwnz added 3 commits December 9, 2025 21:08
Signed-off-by: David Wong <david.wong@tier4.jp>
… and titles

Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
@drwnz
Copy link
Copy Markdown
Collaborator Author

drwnz commented Dec 9, 2025

Thanks! I think it's already close to what we want!

I left some smaller feedback about overly Hesai-specific examples and style. Maybe comments in the code to make the role of each of the function stubs more understandable would be nice.

As for the integration guide, I think it would need to contain sections about what building blocks Nebula provides (UDP socket handling, diagnostic helpers, etc.), and also about the required behavior on startup, reconfiguration, connection loss, etc. I alos think that the guide shall be moved to the docs and rendered with Mkdocs to have everything in one place.

Thanks for the review! I moved the integration guide to https://github.com/tier4/nebula/blob/3f235db56c121c587c7dec41f272ae7001fbdc05/docs/integration_guide.md and added a lot more information to it.

@drwnz drwnz force-pushed the feat/sample_sensor branch from cde75c4 to 3f235db Compare December 9, 2025 13:19
@drwnz drwnz requested review from Copilot and mojomex December 9, 2025 13:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

drwnz and others added 6 commits December 10, 2025 17:42
…mode

Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
Signed-off-by: David Wong <david@lifecyclist.co.nz>
@mojomex
Copy link
Copy Markdown
Collaborator

mojomex commented Feb 17, 2026

@codex Please review.

  • Is the intent of the PR clear?
  • What would you do differently?
  • Are docs and code consistent, easily understandable, and bloat-free?

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2c3c95d92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/nebula_core/nebula_core_ros/examples/point_types_usage_example.cpp Outdated
Comment thread src/nebula_sample/README.md Outdated
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
…nd decoder interfaces

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
…nd order of operations

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b08432e38d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/nebula_sample/nebula_sample/src/sample_ros_wrapper.cpp Outdated
mojomex and others added 6 commits February 19, 2026 09:43
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
…leHwInterface

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
…pleRosWrapper

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: David Wong <david.wong@tier4.jp>
drwnz added 2 commits March 24, 2026 00:51
# Conflicts:
#	src/nebula_continental/nebula_continental_hw_interfaces/include/nebula_continental_hw_interfaces/continental_srr520_hw_interface.hpp
#	src/nebula_core/nebula_core_hw_interfaces/include/nebula_core_hw_interfaces/connections/can.hpp
#	src/nebula_core/nebula_core_hw_interfaces/include/nebula_core_hw_interfaces/connections/http_client.hpp
#	src/nebula_core/nebula_core_hw_interfaces/include/nebula_core_hw_interfaces/connections/socket_utils.hpp
#	src/nebula_core/nebula_core_hw_interfaces/include/nebula_core_hw_interfaces/connections/tcp.hpp
#	src/nebula_hesai/nebula_hesai/tests/hesai_ros_scan_cutting_test_main.cpp
#	src/nebula_velodyne/nebula_velodyne_hw_interfaces/include/nebula_velodyne_hw_interfaces/velodyne_hw_interface.hpp
…es for closeness to main branch

Signed-off-by: David Wong <david.wong@tier4.jp>
@drwnz drwnz requested a review from mojomex March 24, 2026 07:40
…ced in integration guide

Signed-off-by: David Wong <david.wong@tier4.jp>
Copy link
Copy Markdown
Collaborator

@badai-nguyen badai-nguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drwnz
From a Nebula newcomer’s point of view, this PR is LGTM. The integration_guide is easy to understand and follow.

Comment thread src/nebula_sample/nebula_sample_decoders/src/sample_decoder.cpp Outdated
@drwnz
Copy link
Copy Markdown
Collaborator Author

drwnz commented Mar 28, 2026

@mojomex I think this is ready for merge now. Looks like you have more lines in this PR than I do now, but can you please give it a once-over and approve if all is well? Thanks!

Copy link
Copy Markdown
Collaborator

@mojomex mojomex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Thanks for the perseverance!!

@mojomex mojomex merged commit cac9401 into tier4:main Mar 31, 2026
65 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants