Skip to content
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

feat(autoware_pointcloud_preprocessor): cuda-accelerated pointcloud concatenation #9455

Draft
wants to merge 120 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
306d8a2
chore: rebase main
vividf Sep 19, 2024
946365a
chore: solve conflicts
vividf Sep 19, 2024
d4978f7
chore: fix cpp check
vividf Aug 1, 2024
63a870b
chore: add diagnostics readme
vividf Aug 1, 2024
c8cca1f
chore: update figure
vividf Aug 1, 2024
89650a2
chore: upload jitter.png and add old design link
vividf Aug 2, 2024
d423a22
chore: add the link to the tool for analyzing timestamp
vividf Aug 2, 2024
3d21b6c
fix: fix bug that timer didn't cancel
vividf Sep 4, 2024
542ce97
chore: fix logic for logging
vividf Sep 5, 2024
77a3a79
Update sensing/autoware_pointcloud_preprocessor/docs/concatenate-data.md
vividf Sep 18, 2024
52030a7
Update sensing/autoware_pointcloud_preprocessor/src/concatenate_data/…
vividf Sep 18, 2024
3ddf249
Update sensing/autoware_pointcloud_preprocessor/schema/cocatenate_and…
vividf Sep 18, 2024
d679736
Update sensing/autoware_pointcloud_preprocessor/schema/cocatenate_and…
vividf Sep 18, 2024
1f9d24c
Update sensing/autoware_pointcloud_preprocessor/src/concatenate_data/…
vividf Sep 18, 2024
09452e7
Update sensing/autoware_pointcloud_preprocessor/src/concatenate_data/…
vividf Sep 18, 2024
d900d3f
chore: remove distortion corrector related changes
vividf Sep 19, 2024
bcbe94a
feat: add managed tf buffer
vividf Sep 19, 2024
22b654a
chore: fix filename
vividf Sep 20, 2024
076bfaa
chore: add explanataion for maximum queue size
vividf Sep 20, 2024
0e59f48
chore: add explanation for timeout_sec
vividf Sep 20, 2024
8e79976
chore: fix schema's explanation
vividf Sep 20, 2024
66b4092
chore: fix description for twist and odom
vividf Sep 20, 2024
10d83ee
chore: remove license that are not used
vividf Sep 20, 2024
fbb5fe9
chore: change guard to prama once
vividf Sep 20, 2024
3f0732e
chore: default value change to string
vividf Sep 20, 2024
c19250b
Update sensing/autoware_pointcloud_preprocessor/test/test_concatenate…
vividf Sep 20, 2024
089e108
Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…
vividf Sep 20, 2024
5ec228c
Update sensing/autoware_pointcloud_preprocessor/test/test_concatenate…
vividf Sep 20, 2024
f4c869e
Update sensing/autoware_pointcloud_preprocessor/test/test_concatenate…
vividf Sep 20, 2024
4cca6c1
Update sensing/autoware_pointcloud_preprocessor/test/test_concatenate…
vividf Sep 20, 2024
53279b5
style(pre-commit): autofix
pre-commit-ci[bot] Sep 20, 2024
853b8fe
chore: clang-tidy style for static constexpr
vividf Sep 20, 2024
d32dfbc
chore: remove unused vector header
vividf Sep 20, 2024
07cb753
chore: fix naming concatenated_cloud_publisher
vividf Sep 20, 2024
490b15c
chore: fix namimg diagnostic_updater_
vividf Sep 20, 2024
8f16896
chore: specify parameter in comment
vividf Sep 20, 2024
1d89cdd
chore: change RCLCPP_WARN to RCLCPP_WARN_STREAM_THROTTLE
vividf Sep 20, 2024
651c666
chore: add comment for cancelling timer
vividf Sep 20, 2024
0aae2ec
chore: merge remote branch
vividf Sep 20, 2024
370483c
chore: Simplify loop structure for topic-to-cloud mapping
vividf Sep 23, 2024
4c0b585
chore: fix spell errors
vividf Sep 23, 2024
2decb65
chore: fix more spell error
vividf Sep 23, 2024
eeb310d
chore: rename mutex and lock
vividf Sep 25, 2024
9a85a52
chore: const reference for string parameter
vividf Sep 25, 2024
1114898
chore: add explaination for RclcppTimeHash_
vividf Sep 25, 2024
84b547c
chore: change the concatenate node to parent node
vividf Sep 25, 2024
e49d521
chore: clean processOdometry and processTwist
vividf Sep 25, 2024
5ae681c
chore: change twist shared pointer queue to twist queue
vividf Sep 26, 2024
3a8ff07
chore: refactor compensate pointcloud to function
vividf Sep 26, 2024
49b54d4
chore: reallocate memory for concatenate_cloud_ptr
vividf Sep 26, 2024
de94fa6
chore: remove new to make shared
vividf Sep 26, 2024
7979153
chore: dis to distance
vividf Sep 26, 2024
b344427
chore: refacotr poitncloud_sub
vividf Sep 26, 2024
b0c8a7c
chore: return early return but throw runtime error
vividf Sep 26, 2024
fa0c4dc
chore: replace #define DEFAULT_SYNC_TOPIC_POSTFIX with member variable
vividf Sep 26, 2024
66a62d1
chore: fix spell error
vividf Sep 26, 2024
67bfa26
chore: remove redundant function call
vividf Sep 26, 2024
bafaea1
chore: replace conplex tuple to structure
vividf Sep 26, 2024
c1a4001
chore: use reference instead of a pointer to conveys node
vividf Sep 26, 2024
7ebd332
chore: fix camel to snake case
vividf Sep 26, 2024
52ed5ed
chore: fix logic of publish synchronized pointcloud
vividf Sep 27, 2024
b863d49
chore: fix cpp check
vividf Sep 27, 2024
92d69a4
chore: remove logging and throw error directly
vividf Sep 30, 2024
edb0610
chore: fix clangd warnings
vividf Sep 30, 2024
b6700a9
chore: fix json schema
vividf Sep 30, 2024
130bcb8
chore: fix clangd warning
vividf Sep 30, 2024
31500f8
chore: remove unused variable
vividf Sep 30, 2024
000c890
chore: fix launcher
vividf Oct 1, 2024
55e0d24
chore: fix clangd warning
vividf Oct 1, 2024
0611bb9
Merge branch 'main' into feature/redesign_concatenate_and_time_sync_node
vividf Oct 4, 2024
9199a3d
chore: ensure thread safety
vividf Oct 4, 2024
d6c7a48
style(pre-commit): autofix
pre-commit-ci[bot] Oct 4, 2024
4815917
chore: clean code
vividf Oct 7, 2024
40fe11e
chore: add parameters for handling rosbag replay in loops
vividf Oct 7, 2024
3433bf0
chore: fix diagonistic
vividf Oct 7, 2024
09b8ce3
chore: reduce copy operation
vividf Oct 21, 2024
782228f
chore: reserve space for concatenated pointcloud
vividf Oct 21, 2024
3606114
chore: fix clangd error
vividf Oct 21, 2024
6ed7537
chore: fix pipeline latency
vividf Oct 21, 2024
0248a24
chore: add debug mode
vividf Oct 21, 2024
76d3b4c
chore: refactor convert_to_xyzirc_cloud function
vividf Oct 22, 2024
e709d37
chore: fix json schema
vividf Oct 22, 2024
fcdb989
chore: fix logging output
vividf Oct 22, 2024
460b467
chore: fix the output order of the debug mode
vividf Oct 22, 2024
798cbd6
chore: fix pipeline latency output
vividf Oct 23, 2024
a2e8b77
chore: clean code
vividf Oct 24, 2024
2562d6e
chore: set some parameters to false in testing
vividf Oct 24, 2024
a970f79
chore: fix default value for schema
vividf Oct 24, 2024
4d95a01
Merge branch 'main' into feature/redesign_concatenate_and_time_sync_node
vividf Oct 25, 2024
4e39bbc
chore: fix diagnostic msgs
vividf Oct 28, 2024
fe2e5c2
Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…
vividf Oct 28, 2024
50036b5
Merge branch 'main' into feature/redesign_concatenate_and_time_sync_node
vividf Oct 29, 2024
afa000d
chore: fix parameter for sample ros bag
vividf Oct 29, 2024
19170a1
chore: autoware point type namespace
vividf Nov 7, 2024
e4dea9f
Merge branch 'main' into feature/redesign_concatenate_and_time_sync_node
vividf Nov 7, 2024
d0d5b51
Merge branch 'main' into feature/redesign_concatenate_and_time_sync_node
vividf Nov 11, 2024
3123849
chore: update readme
vividf Nov 13, 2024
ce2119b
Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…
vividf Nov 13, 2024
4c2fd67
Merge remote-tracking branch 'awf/main' into feature/redesign_concate…
knzo25 Nov 21, 2024
1b2f2b2
Merge branch 'autowarefoundation:main' into feature/redesign_concaten…
vividf Nov 22, 2024
414db5d
Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…
knzo25 Nov 25, 2024
4f7b536
feat: implemented a cuda accelerated pointcloud concatenation and int…
knzo25 Nov 22, 2024
7fc85e9
chore: updated schemaand tests
knzo25 Nov 25, 2024
e6aa697
Merge remote-tracking branch 'awf/main' into feat/cuda_blackboard_con…
knzo25 Dec 23, 2024
e9df5bf
Merge branch 'main' into feat/cuda_blackboard_concatenated_pointcloud
knzo25 Jan 28, 2025
b2f1bd5
feat: reducing duplicated code. checkpoint before a class-wide refactor
knzo25 Feb 6, 2025
e1f29af
feat: made the node class itself a template
knzo25 Feb 6, 2025
0f20d49
chore: removed unnecessary code and some refactor
knzo25 Feb 6, 2025
2d968fe
chore: reverting some methods order to reduce PR divergence
knzo25 Feb 6, 2025
8251de6
chore: reduced more divergence of the branch with main
knzo25 Feb 6, 2025
61e7126
feat: completed the template + traits approach
knzo25 Feb 7, 2025
330ac55
chore: removed unused headers
knzo25 Feb 10, 2025
55e355c
chore: got rid of a pesky warning in the cpu concat
knzo25 Feb 10, 2025
0d17b01
chore: removed debug code and updated copyrights
knzo25 Feb 10, 2025
a09a88a
chore: moved the cuda concat into the cuda preprocessing package
knzo25 Feb 10, 2025
eb489ed
chore: added config/launch/schema for the concat in the cuda package
knzo25 Feb 13, 2025
ef2e198
chore: removed unused packages
knzo25 Feb 13, 2025
46d6b80
chore: added a doc file
knzo25 Feb 13, 2025
2e7271a
chore: added the concat to the list of filters in the cuda package
knzo25 Feb 13, 2025
8be2045
chore: deleted unused imports and updated the year in one file
knzo25 Feb 13, 2025
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
94 changes: 94 additions & 0 deletions sensing/autoware_cuda_pointcloud_preprocessor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_cuda_pointcloud_preprocessor)

find_package(ament_cmake_auto REQUIRED)
find_package(CUDA)

if(NOT ${CUDA_FOUND})
message(WARNING "cuda was not found, so the autoware_cuda_pointcloud_preprocessor package will not be built.")
return()
endif()

ament_auto_find_build_dependencies()

# Default to C++17
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif ()

if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function)
endif ()

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

include_directories(
include
SYSTEM
${CUDA_INCLUDE_DIRS}
)

list(APPEND CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -diag-suppress 20012") # cSpell: ignore expt

cuda_add_library(cuda_pointcloud_preprocessor_lib SHARED
src/cuda_concatenate_data/cuda_combine_cloud_handler.cpp
src/cuda_concatenate_data/cuda_combine_cloud_handler_kernel.cu
src/cuda_concatenate_data/cuda_cloud_collector.cpp
src/cuda_concatenate_data/cuda_collector_matching_strategy.cpp
)

target_link_libraries(cuda_pointcloud_preprocessor_lib
${autoware_pointcloud_preprocessor_TARGETS}
)

target_include_directories(cuda_pointcloud_preprocessor_lib SYSTEM PRIVATE
${autoware_pointcloud_preprocessor_INCLUDE_DIRS}
${autoware_point_types_INCLUDE_DIRS}
${cuda_blackboard_INCLUDE_DIRS}
${diagnostic_msgs_INCLUDE_DIRS}
${geometry_msgs_INCLUDE_DIRS}
${rclcpp_INCLUDE_DIRS}
${rclcpp_components_INCLUDE_DIRS}
${rcl_interfaces_INCLUDE_DIRS}
${sensor_msgs_INCLUDE_DIRS}
${tf2_INCLUDE_DIRS}
${tf2_msgs_INCLUDE_DIRS}
)

# Targets
ament_auto_add_library(cuda_pointcloud_preprocessor SHARED
src/cuda_concatenate_data/cuda_concatenate_and_time_sync_node.cpp
)

target_link_libraries(cuda_pointcloud_preprocessor
${CUDA_LIBRARIES}

${diagnostic_msgs_LIBRARIES}
cuda_pointcloud_preprocessor_lib
)

# ========== Concatenate and Sync data ==========
rclcpp_components_register_node(cuda_pointcloud_preprocessor
PLUGIN "autoware::cuda_pointcloud_preprocessor::CudaPointCloudConcatenateDataSynchronizerComponent"
EXECUTABLE cuda_concatenate_and_time_sync_node)

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

ament_auto_package()

# Set ROS_DISTRO macros
set(ROS_DISTRO $ENV{ROS_DISTRO})
if(${ROS_DISTRO} STREQUAL "rolling")
add_compile_definitions(ROS_DISTRO_ROLLING)
elseif(${ROS_DISTRO} STREQUAL "foxy")
add_compile_definitions(ROS_DISTRO_FOXY)
elseif(${ROS_DISTRO} STREQUAL "galactic")
add_compile_definitions(ROS_DISTRO_GALACTIC)
elseif(${ROS_DISTRO} STREQUAL "humble")
add_compile_definitions(ROS_DISTRO_HUMBLE)
endif()
20 changes: 20 additions & 0 deletions sensing/autoware_cuda_pointcloud_preprocessor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# autoware_cuda_pointcloud_preprocessor

## Purpose

The pointcloud preprocessing implemented in `autoware_pointcloud_preprocessor` has been thoroughly tested in autoware. However, the latency it introduces does not scale well with modern LiDAR devices due to the high number of points they introduce.

To alleviate this issue, this package reimplements most of the pipeline presented in `autoware_pointcloud_preprocessor` leveraging the use of GPGPUs. In particular, this package makes use of CUDA to provide accelerated versions of the already established implementations, while also maintaining compatibility with normal ROS nodes/topics. <!-- cSpell: ignore GPGPUs >

## Inner-workings / Algorithms

A detailed description of each filter's algorithm is available in the following links.

| Filter Name | Description | Detail |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| cuda_pointcloud_preprocessor | Implements the cropping, distortion correction, and outlier filtering (ring-based) of the `autoware_pointcloud_preprocessor`'s CPU versions. | [link](docs/cuda-pointcloud-preprocessor.md) |
| cuda_concatenate_and_time_sync_node | Implements pointcloud concatenation an synchronization following `autoware_pointcloud_preprocessor`'s CPU implementation. | [link](docs/cuda-concatenate-data.md) |

## (Optional) Future extensions / Unimplemented parts

The subsample filters implemented in `autoware_pointcloud_preprocessor` will have similar counterparts in this package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**:
ros__parameters:
debug_mode: false
has_static_tf_only: false
rosbag_length: 10.0
maximum_queue_size: 5
timeout_sec: 0.2
is_motion_compensated: true
publish_synchronized_pointcloud: true
keep_input_frame_in_synchronized_pointcloud: true
publish_previous_but_late_pointcloud: false
synchronized_pointcloud_postfix: pointcloud
input_twist_topic_type: twist
input_topics: [
"/sensing/lidar/right/pointcloud_before_sync",
"/sensing/lidar/top/pointcloud_before_sync",
"/sensing/lidar/left/pointcloud_before_sync",
]
output_frame: base_link
matching_strategy:
type: naive
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# cuda_concatenate_and_time_synchronize_node

This package is a cuda accelerated version of the one available in [autoware_cuda_pointcloud_preprocessor](../autoware_pointcloud_preprocessor).
As this node is templated, the overall design, algorithm, inputs, and outputs are the same.

The only change, corresponds to the pointcloud topics, which instead of using the standard `sensor_msgs::msg::PointCloud2` message type, they use the `cuda_blackboard` mechanism.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2025 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "autoware/pointcloud_preprocessor/concatenate_data/cloud_collector.hpp"
#include "cuda_combine_cloud_handler.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright 2025 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "autoware/cuda_pointcloud_preprocessor/cuda_concatenate_data/cuda_traits.hpp"
#include "autoware/pointcloud_preprocessor/concatenate_data/combine_cloud_handler.hpp"

namespace autoware::pointcloud_preprocessor
{

template <>
class CombineCloudHandler<CudaPointCloud2Traits> : public CombineCloudHandlerBase
{
protected:
struct CudaConcatStruct
{
cudaStream_t stream;
std::unique_ptr<CudaPointCloud2Traits::PointCloudMessage> cloud_ptr;
std::size_t max_pointcloud_size{0};
};

std::unordered_map<std::string, CudaConcatStruct> cuda_concat_struct_map_;
std::unique_ptr<CudaPointCloud2Traits::PointCloudMessage> concatenated_cloud_ptr_;
std::size_t max_concat_pointcloud_size_{0};
std::mutex mutex_;

public:
CombineCloudHandler(
rclcpp::Node & node, const std::vector<std::string> & input_topics, std::string output_frame,
bool is_motion_compensated, bool publish_synchronized_pointcloud,
bool keep_input_frame_in_synchronized_pointcloud, bool has_static_tf_only);

ConcatenatedCloudResult<CudaPointCloud2Traits> combine_pointclouds(
std::unordered_map<
std::string, typename CudaPointCloud2Traits::PointCloudMessage::ConstSharedPtr> &
topic_to_cloud_map);

void allocate_pointclouds() override;
};

} // namespace autoware::pointcloud_preprocessor
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2025 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef AUTOWARE__CUDA_POINTCLOUD_PREPROCESSOR__CUDA_CONCATENATE_DATA__CUDA_COMBINE_CLOUD_HANDLER_KERNEL_HPP_
#define AUTOWARE__CUDA_POINTCLOUD_PREPROCESSOR__CUDA_CONCATENATE_DATA__CUDA_COMBINE_CLOUD_HANDLER_KERNEL_HPP_

#include <cuda_runtime.h>

#include <cstdint>

namespace autoware::pointcloud_preprocessor
{

struct TransformStruct
{
float translation_x;
float translation_y;
float translation_z;
float m11;
float m12;
float m13;
float m21;
float m22;
float m23;
float m31;
float m32;
float m33;
};

struct PointTypeStruct
{
float x;
float y;
float z;
std::uint8_t intensity;
std::uint8_t return_type;
std::uint16_t channel;
};

void transform_launch(
const PointTypeStruct * input_points, int num_points, TransformStruct transform,
PointTypeStruct * output_points, cudaStream_t & stream);

} // namespace autoware::pointcloud_preprocessor

#endif // AUTOWARE__CUDA_POINTCLOUD_PREPROCESSOR__CUDA_CONCATENATE_DATA__CUDA_COMBINE_CLOUD_HANDLER_KERNEL_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2025 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "autoware/cuda_pointcloud_preprocessor/cuda_concatenate_data/cuda_traits.hpp"
#include "autoware/pointcloud_preprocessor/concatenate_data/concatenate_and_time_sync_node.hpp"

#include <cuda_blackboard/cuda_blackboard_publisher.hpp>
#include <cuda_blackboard/cuda_blackboard_subscriber.hpp>
#include <cuda_blackboard/cuda_pointcloud2.hpp>
#include <rclcpp/rclcpp.hpp>

namespace autoware::cuda_pointcloud_preprocessor
{

class CudaPointCloudConcatenateDataSynchronizerComponent
: public autoware::pointcloud_preprocessor::PointCloudConcatenateDataSynchronizerComponentTemplated<
autoware::pointcloud_preprocessor::CudaPointCloud2Traits>
{
public:
explicit CudaPointCloudConcatenateDataSynchronizerComponent(
const rclcpp::NodeOptions & node_options)
: autoware::pointcloud_preprocessor::PointCloudConcatenateDataSynchronizerComponentTemplated<
autoware::pointcloud_preprocessor::CudaPointCloud2Traits>(node_options)
{
}
~CudaPointCloudConcatenateDataSynchronizerComponent() override = default;
};

} // namespace autoware::cuda_pointcloud_preprocessor
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2025 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <cuda_blackboard/cuda_blackboard_publisher.hpp>
#include <cuda_blackboard/cuda_blackboard_subscriber.hpp>
#include <cuda_blackboard/cuda_pointcloud2.hpp>

namespace autoware::pointcloud_preprocessor
{

struct CudaPointCloud2Traits
{
using PointCloudMessage = cuda_blackboard::CudaPointCloud2;
using PublisherType = cuda_blackboard::CudaBlackboardPublisher<PointCloudMessage>;
using SubscriberType = cuda_blackboard::CudaBlackboardSubscriber<PointCloudMessage>;
};

} // namespace autoware::pointcloud_preprocessor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<launch>
<arg name="input/twist" default="/sensing/vehicle_velocity_converter/twist_with_covariance"/>
<arg name="output" default="/sensing/lidar/concatenated/pointcloud"/>
<!-- Parameter -->
<arg name="param_file" default="$(find-pkg-share autoware_cuda_pointcloud_preprocessor)/config/cuda_concatenate_and_time_sync_node.param.yaml"/>
<node pkg="autoware_cuda_pointcloud_preprocessor" exec="cuda_concatenate_and_time_sync_node" name="cuda_concatenate_and_time_sync_node" output="screen">
<remap from="~/input/twist" to="$(var input/twist)"/>
<remap from="output" to="$(var output)"/>
<param from="$(var param_file)"/>
</node>
</launch>
32 changes: 32 additions & 0 deletions sensing/autoware_cuda_pointcloud_preprocessor/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<package format="3">
<name>autoware_cuda_pointcloud_preprocessor</name>
<version>0.1.0</version>
<description>autoware_cuda_pointcloud_preprocessor</description>
<maintainer email="[email protected]">Kenzo Lobos-Tsunekawa</maintainer>
<author email="[email protected]">Kenzo Lobos-Tsunekawa</author>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_point_types</depend>
<depend>autoware_pointcloud_preprocessor</depend>
<depend>autoware_universe_utils</depend>
<depend>cuda_blackboard</depend>
<depend>diagnostic_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>sensor_msgs</depend>
<depend>tf2</depend>
<depend>tf2_msgs</depend>
<depend>tier4_debug_msgs</depend>

<test_depend>ament_clang_format</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading
Loading