Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
jazzy

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro lyrical showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_downsample_filters package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Version 1.9.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2026-06-30
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The ROS 2 autoware_downsample_filters package

Maintainers

  • amc-nu
  • Yukihiro Saito
  • Kyoichi Sugahara
  • Dai Nguyen
  • Kenzo Lobos-Tsunekawa
  • Yihsiang Fang
  • Yoshi Ri
  • David Wong
  • Melike Tanrikulu
  • Max Schmeller
  • Xingang Liu
  • Norah Xiong

Authors

No additional authors.

autoware_downsample_filters

Overview

The autoware_downsample_filters is a package that that reduces the number of points of the pointcloud.

Design

The autoware_downsample_filters is implemented for reducing the computational load and improving the performance of the system.

Inner-workings / Algorithms

Random Downsample Filter

pcl::RandomSample is used, which points are sampled with uniform probability.

Voxel Grid Downsample Filter

pcl::VoxelGrid is used, which points in each voxel are approximated with their centroid.

Pickup Based Voxel Grid Downsample Filter

This algorithm samples a single actual point existing within the voxel, not the centroid. The computation cost is low compared to Centroid Based Voxel Grid Filter.

Inputs / Outputs

Input

Name Type Description
input sensor_msgs::msg::PointCloud2 reference points

Output

Name Type Description
output sensor_msgs::msg::PointCloud2 downsampled points

Parameters

Launch file Parameters

Name Type Default Value Description
input_frame string ” “ the frame id in which filtering is performed
output_frame string ” “ output frame id of the filtered points
max_queue_size size_t 5 max buffer size of input/output topics

Node Parameters

random_downsample_filter_node

Name Type Default Value Description
sample_num size_t 1500 random sample number

voxel_grid_downsample_filter_node

Name Type Default Value Description
voxel_size_x double 0.3 x value of the voxel
voxel_size_y double 0.3 y value of the voxel
voxel_size_z double 0.1 z value of the voxel

Usage

1.publish static tf from input pointcloud to target frame that is used for filtering, e.g

ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1  velodyne_top_base_link  base_link

2.launch one of the downsample node

ros2 launch autoware_downsample_filters random_downsample_filter_node.launch.xml

3. launch rviz2 and AWSIM to check the downsample result

Assumptions / Known limits

(Optional) Error detection and handling

(Optional) Performance characterization

(Optional) Future extensions / Unimplemented parts

CHANGELOG

Changelog for package autoware_downsample_filters

1.9.0 (2026-06-24)

  • Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base

  • fix([downsample_filters]{.title-ref}): add missing unit tests (#1206)

  • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic (#1175)

    • refactor([downsample_filters]{.title-ref}): split voxel-grid core logic
    • extract ROS-independent voxel grid core logic from the node
    • replace callback-based errors in faster voxel filter with ValidationResult
    • propagate validation reasons through core and node logging
    • style(pre-commit): autofix
    • refactor([downsample_filters]{.title-ref}): move field validation into validate_input
    • move x/y/z and intensity field checks from set_field_offsets to validate_input
    • simplify set_field_offsets to a plain void setter
    • remove redundant result check in filter (validation is now upstream)

    * bug: fix the following [cppcheck]{.title-ref} error ` /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: performance: inconclusive: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). [functionStatic] ValidationResult validate_input(const PointCloud2 & cloud) const; ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.cpp:31:49: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult VoxelGridDownsampleFilterCore::validate_input(const PointCloud2 & cloud) const ^ /__w/autoware_core/autoware_core/sensing/autoware_downsample_filters/src/voxel_grid_downsample_filter/voxel_grid_downsample_filter_core.hpp:42:20: note: Technically the member function 'autoware::downsample_filters::VoxelGridDownsampleFilterCore::validate_input' can be static (but you may consider moving to unnamed namespace). ValidationResult validate_input(const PointCloud2 & cloud) const; ^[ * bug: fix by `pre-commit]{.title-ref}

    • refactor([downsample_filters]{.title-ref}): align voxel-grid core file naming
    • rename voxel_grid_downsample_filter_core.cpp/hpp to voxel_grid_downsample_filter.cpp/hpp
    • fix: make [set_field_offsets]{.title-ref} private
    • Apply the following review comment:
    • https://github.com/autowarefoundation/autoware_core/pull/1175#discussion_r3433757009
    • refactor([downsample_filters]{.title-ref}): make voxel filter return [tl::expected]{.title-ref}
    • change VoxelGridDownsampleFilterCore::filter to return tl::expected<PointCloud2, std::string>
    • move input validation into filter to avoid accidental validation bypass
    • simplify node call site to early-return on error

    * update unit tests to use the new expected-based interface This fix is proposed by this PR review comment:

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • feat([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node (#1161)

    • refactor([downsample_filters]{.title-ref}): remove TF operations from voxel grid filter node
    • style(pre-commit): autofix
    • bug: fix wrong conflict resolve in a previous commit
    • style(pre-commit): autofix
    • bug: fix failing tests

    * bug: remove tf-handling code from tests ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

  • fix: a bug which causes wrong [frame_id]{.title-ref} propagation in transformation (#1164)

    • bug: fix wrong [frame_id]{.title-ref} propagation in transformation

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

File truncated at 100 lines see the full file

Launch files

  • launch/random_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw]
      • output_topic_name [default: /sensing/lidar/top/random_downsample_filter/pointcloud]
      • input_frame [default: ]
      • output_frame [default: ]
      • random_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/random_downsample_filter_node.param.yaml]
  • launch/voxel_grid_downsample_filter_node.launch.xml
      • input_topic_name [default: /sensing/lidar/top/pointcloud_raw_ex]
      • output_topic_name [default: /sensing/lidar/top/voxel_grid_downsample_filter/pointcloud]
      • input_frame [default: base_link]
      • output_frame [default: base_link]
      • voxel_grid_downsample_filter_param_file [default: $(find-pkg-share autoware_downsample_filters)/config/voxel_grid_downsample_filter_node.param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_downsample_filters at Robotics Stack Exchange