Skip to content

Conversation

@kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Nov 19, 2025

Description

This PR integrates CUDA blackboard into the autoware_lidar_frnet package to optimize point cloud processing performance.

Main changes:

  • Modified to use CUDA blackboard for direct processing of point cloud data on GPU memory
  • Changed memory copy for input data:
    • Before: cudaMemcpyAsync(..., cudaMemcpyHostToDevice) - CPU→GPU transfer
    • After: cudaMemcpyAsync(..., cudaMemcpyDeviceToDevice, stream_) - GPU→GPU transfer
      This eliminates CPU↔GPU memory transfers, reducing latency and CPU load

This reduces latency and CPU load in the point cloud processing pipeline, improving efficiency especially in workflows centered around GPU processing.

Related links

Private Links:

How was this PR tested?

  • Ran the entire sensing module with /sensing/lidar/concatenated/pointcloud as input, operating in the same container
  • Played back actual rosbag data and verified that the "negotiation message has been received" log message was successfully obtained as follows:
image

Notes for reviewers

  • The input topic is subscribed via CUDA blackboard, so upstream nodes must also support CUDA blackboard
  • Important: The subscriber node must be in the same container as the publisher node. This is a prerequisite for CUDA blackboard to work correctly, as it relies on shared GPU memory within the same process/container
  • The output topic message type remains unchanged (sensor_msgs::msg::PointCloud2)
  • If the input point cloud size is large, you need to modify ml_package_frnet.param.yaml and regenerate the engine

Interface changes

Topic changes

Modifications

Version Topic Type Topic Name Message Type Description
Old Sub ~/input/pointcloud sensor_msgs::msg::PointCloud2 Input pointcloud (CPU memory)
New Sub ~/input/pointcloud/cuda sensor_msgs::msg::PointCloud2 (via CUDA blackboard) Input pointcloud (GPU memory via CUDA blackboard)

Note: The topic name for negotiation is now ~/input/pointcloud/cuda (with /cuda suffix added by CUDA blackboard), but the user-facing topic name remains ~/input/pointcloud. The message type remains unchanged, but the internal implementation now uses CUDA blackboard.

ROS Parameter Changes

None.

Effects on system behavior

  • Performance improvement: Reduced CPU↔GPU memory transfers, improving processing latency
  • CPU load reduction: Eliminated need for copying to host memory, reducing CPU load
  • Compatibility: Output topic interface remains unchanged, so there is no impact on downstream nodes

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Nov 19, 2025
@github-actions
Copy link

github-actions bot commented Nov 19, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kyoichi-sugahara kyoichi-sugahara added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 25, 2025
@kyoichi-sugahara kyoichi-sugahara marked this pull request as ready for review November 25, 2025 06:40
@kyoichi-sugahara kyoichi-sugahara force-pushed the feat/autoware_lidar_frnet/integrate_cuda_blackboard branch from 5c1f725 to 5a5aec9 Compare November 25, 2025 06:41
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.83%. Comparing base (9d55964) to head (9856c27).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tion/autoware_lidar_frnet/src/lidar_frnet_node.cpp 0.00% 6 Missing ⚠️
...r_frnet/include/autoware/lidar_frnet/ros_utils.hpp 0.00% 3 Missing ⚠️
...erception/autoware_lidar_frnet/lib/lidar_frnet.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11677      +/-   ##
==========================================
- Coverage   17.85%   17.83%   -0.02%     
==========================================
  Files        1746     1747       +1     
  Lines      122187   122319     +132     
  Branches    42890    42953      +63     
==========================================
  Hits        21818    21818              
- Misses      82086    82218     +132     
  Partials    18283    18283              
Flag Coverage Δ *Carryforward flag
daily 19.91% <ø> (ø) Carriedforward from 5a5aec9
daily-cuda 17.80% <ø> (+<0.01%) ⬆️ Carriedforward from 5a5aec9
differential-cuda 0.00% <0.00%> (?)
total-cuda 17.83% <ø> (+<0.01%) ⬆️ Carriedforward from 5a5aec9

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant