Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
893e49d
Implement nebula's Ouster port as a submodule
Samahu Apr 12, 2026
b4ef2ac
ci(pre-commit): autofix
pre-commit-ci[bot] Apr 12, 2026
56dfd0f
Address cpplint complaints
Samahu Apr 13, 2026
60a5dd2
Update to a working branch
Samahu Apr 13, 2026
3b9c37b
Revert back to master branch on OusterSDK side and correct default pa…
Samahu Apr 13, 2026
d4de693
Support retrieving ouster-sdk from an external dependency_ws directory
Samahu Apr 17, 2026
c716333
Test out adding zipcmp as a dependency
Samahu Apr 18, 2026
7b1cab2
fix libzip dependency and curl
Samahu Apr 18, 2026
ddc13a1
Fix stringop-overflow error
Samahu Apr 18, 2026
0480e96
Fix stringop-overflow error
Samahu Apr 18, 2026
c1d6467
Supress spelling error
Samahu Apr 18, 2026
b2f016c
Merge pull request #3 from Samahu/add-ouster-lidar-support-via-submod…
Samahu Apr 18, 2026
1edc9ce
ci(pre-commit): autofix
github-actions[bot] Apr 18, 2026
d7bfe2b
Switch to using git submodules instead of the vcs import + Update rel…
Samahu Apr 18, 2026
c994c51
ci(pre-commit): autofix
github-actions[bot] Apr 18, 2026
b7b24bf
Bump version numbers
Samahu Apr 18, 2026
22ed451
Add ouster-sdk submodule ref
Samahu Apr 18, 2026
d43fb71
Add Ouster coverage flags and hw_interface unit tests
Copilot Apr 20, 2026
aacde34
Address code review: add error checking in test helpers
Copilot Apr 20, 2026
8363961
Use configured IP address in the test and set REUSEADDR and REUSEPORT…
Samahu Apr 21, 2026
751e137
Merge pull request #5 from Samahu/copilot/fix-coverage-drop-in-lidar-…
Samahu Apr 21, 2026
f2810f3
ci(pre-commit): autofix
pre-commit-ci[bot] Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build_depends-humble.repos
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ repositories:
type: git
url: https://github.com/tier4/agnocast
version: 2.3.1

ouster-sdk:
type: git
url: https://github.com/ouster-lidar/ouster-sdk.git
version: master
5 changes: 5 additions & 0 deletions build_depends-jazzy.repos
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ repositories:
type: git
url: https://github.com/tier4/sync_tooling_msgs.git
version: main

ouster-sdk:
type: git
url: https://github.com/ouster-lidar/ouster-sdk.git
version: master
76 changes: 76 additions & 0 deletions src/nebula_ouster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Nebula ouster sensor package

A minimal template sensor package for the Nebula LiDAR driver framework.

## Purpose

This package is a starting point for adding new sensor support to Nebula. It compiles, launches,
and exercises the ROS packet/pointcloud pipeline with intentionally minimal behavior.

The ouster decoder does not invent fake sensor geometry. It only counts packets, reports a scan
boundary every 10 packets, and emits an empty pointcloud for that scan. Replace that logic with
real packet parsing and scan-cutting for your sensor.

## Package structure

The ouster sensor consists of four packages:

- **nebula_ouster_common** - Common definitions and configuration structures
- **nebula_ouster_decoders** - Packet decoder and driver implementation
- **nebula_ouster_hw_interfaces** - Hardware interface for sensor communication
- **nebula_ouster** - ROS 2 wrapper and launch files

## Building

```bash
colcon build --packages-up-to nebula_ouster
```

## Running

```bash
# Online mode (with hardware)
ros2 launch nebula_ouster nebula_ouster.launch.xml
# Offline mode (replay from rosbag)
ros2 launch nebula_ouster nebula_ouster.launch.xml launch_hw:=false
```

## Using as a template

For detailed instructions on how to use this package as a template for adding a new sensor, please refer to the [Integration guide](../../docs/integration_guide.md).

The guide covers:

1. Cloning and renaming the package
2. Implementing sensor-specific logic
3. Verifying the new implementation

## Key components

### Configuration (`*_common`)

- `OusterSensorConfiguration` - Minimal sensor-specific settings for an IP-based sensor

### Decoder (`*_decoders`)

- `OusterDecoder` - Minimal decoder stub with packet counting and scan-boundary callbacks
- `PacketDecodeResult` - Decoder output containing metadata/error and performance counters
- `DecodeError` - Decoder error codes for packet handling failures

### Hardware interface (`*_hw_interfaces`)

- `OusterHwInterface` - Sensor communication interface

### ROS wrapper

- `OusterRosWrapper` - ROS 2 node wrapping the driver
- Point cloud publisher on `/points`
- Packet publish/replay topic on `/packets` (`nebula_msgs/msg/NebulaPackets`) depending on
runtime mode (`launch_hw` parameter)

## Reference implementation

This package provides a template structure for adding new sensor support. For complete examples,
refer to existing sensor packages like `nebula_hesai` or `nebula_velodyne`.

**For detailed integration instructions, see the [Integration guide](../../docs/integration_guide.md) in the documentation.**
105 changes: 105 additions & 0 deletions src/nebula_ouster/nebula_ouster/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
cmake_minimum_required(VERSION 3.20)
project(nebula_ouster)

find_package(autoware_cmake REQUIRED)
autoware_package()

# Ouster
add_library(
ouster_ros_wrapper SHARED
src/ouster_ros_wrapper.cpp)

set(_nebula_ouster_sdk_candidates
"${CMAKE_CURRENT_SOURCE_DIR}/../../../ouster-sdk"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../dependency_ws/ouster-sdk"
Comment thread
Samahu marked this conversation as resolved.
Outdated
)

set(_nebula_ouster_sdk "")
foreach(_candidate IN LISTS _nebula_ouster_sdk_candidates)
if(EXISTS "${_candidate}/CMakeLists.txt")
set(_nebula_ouster_sdk "${_candidate}")
break()
endif()
endforeach()

if(_nebula_ouster_sdk STREQUAL "")
message(FATAL_ERROR
"nebula_ouster_decoders: ouster-sdk is missing. Checked: ${_nebula_ouster_sdk_candidates}")
endif()

set(BUILD_SENSOR ON CACHE BOOL "Ouster SDK: sensor module" FORCE)
set(BUILD_PCAP OFF CACHE BOOL "Ouster SDK: pcap" FORCE)
set(BUILD_OSF OFF CACHE BOOL "Ouster SDK: osf" FORCE)
set(BUILD_VIZ OFF CACHE BOOL "Ouster SDK: visualizer" FORCE)
set(BUILD_MAPPING OFF CACHE BOOL "Ouster SDK: mapping" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "Ouster SDK: tests" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "Ouster SDK: examples" FORCE)
set(BUILD_PYTHON_MODULE OFF CACHE BOOL "Ouster SDK: python" FORCE)

add_subdirectory("${_nebula_ouster_sdk}" "${CMAKE_CURRENT_BINARY_DIR}/ouster-sdk-build")

if(TARGET ouster_client)
target_compile_options(ouster_client PRIVATE -Wno-pedantic)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(ouster_client PRIVATE -Wno-error=stringop-overflow) # cspell:ignore stringop
endif()
endif()
if(TARGET ouster_sensor)
target_compile_options(ouster_sensor PRIVATE -Wno-pedantic)
endif()

target_include_directories(
ouster_ros_wrapper
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${_nebula_ouster_sdk}/ouster_client/include/optional-lite>
$<BUILD_INTERFACE:${_nebula_ouster_sdk}/ouster_sensor/include>
$<INSTALL_INTERFACE:include>)

target_link_libraries(
ouster_ros_wrapper
PUBLIC diagnostic_updater::diagnostic_updater
nebula_ouster_decoders::nebula_ouster_decoders
nebula_ouster_hw_interfaces::nebula_ouster_hw_interfaces
nebula_core_ros::nebula_core_ros
PRIVATE ouster_client
ouster_sensor)
ament_target_dependencies(
ouster_ros_wrapper
PUBLIC
diagnostic_msgs
nebula_msgs
rclcpp
rclcpp_components
sensor_msgs
std_msgs)

rclcpp_components_register_node(ouster_ros_wrapper PLUGIN "nebula::ros::OusterRosWrapper"
EXECUTABLE ouster_ros_wrapper_node)

install(
TARGETS ouster_ros_wrapper
EXPORT export_ouster_ros_wrapper
LIBRARY DESTINATION lib)
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION include/${PROJECT_NAME})

install(DIRECTORY config launch DESTINATION share/${PROJECT_NAME})

ament_export_include_directories("include/${PROJECT_NAME}")
ament_export_targets(export_ouster_ros_wrapper)

ament_export_dependencies(
diagnostic_msgs
diagnostic_updater
nebula_core_common
nebula_ouster_common
nebula_core_decoders
nebula_ouster_decoders
nebula_core_hw_interfaces
nebula_ouster_hw_interfaces
nebula_core_ros
nebula_msgs
rclcpp_components
sensor_msgs
std_msgs)

ament_package()
40 changes: 40 additions & 0 deletions src/nebula_ouster/nebula_ouster/config/ouster_sensor.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Ouster Sensor ROS 2 Parameters
# This file contains example parameters for the Ouster LiDAR sensor.
# Copy and modify this file for your specific sensor model.

/**:
ros__parameters:
# ROS wrapper configuration
sensor_model: OS0-64
launch_hw: true
frame_id: ouster_lidar
use_sensor_extrinsics: false

# Network configuration
connection:
sensor_ip: 169.254.119.211
host_ip: 169.254.242.38
data_port: 7502
filter_sender_ip: true

# Decoder configuration
fov:
azimuth:
min_deg: 0.0
max_deg: 360.0
elevation:
min_deg: -90.0
max_deg: 90.0

# Diagnostics configuration
diagnostics:
pointcloud_publish_rate:
frequency_ok:
min_hz: 9.0
max_hz: 11.0
frequency_warn:
min_hz: 8.0
max_hz: 12.0
num_frame_transition: 1
packet_liveness:
timeout_ms: 1000
Loading