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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

Package symbol

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

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

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
rolling

Package Summary

Version 2.0.0
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version ros2
Last Updated 2026-06-24
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka
  • solonovamax

sensor_filters

This package is a collection of ROS 2 nodes and composable components that run a filters::FilterChain for message types from the sensor_msgs package. See the filters package documentation to learn more about the filter chain infrastructure.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS components/nodes, not as ROS filters implementing the filters::FilterBase<> interface required by this package.

The task of each filter chain node in sensor_filters is very simple: load the filter chain, subscribe to the input topic, and publish the filtered messages on the output topic.

Most behavior is configured via ROS 2 parameters declared on the node:

Parameter Type Default Description
input_queue_size int 10 Queue size used for the input subscription.
output_queue_size int 10 Queue size used for the output publisher.
subscription_type string unique_ptr How the input message is received. One of unique_ptr, shared_ptr, reference. Image and PointCloud2 chains require shared_ptr.
publication_type string unique_ptr How the output message is published. One of unique_ptr, shared_ptr, reference. PointCloud2 chain does not support unique_ptr.
is_lazy bool false If true, the chain only subscribes to the input topic when at least one subscriber is connected to the output topic (requires ROS 2 Iron+).
content_filter_expression string "" DDS content-filter expression for the input subscription (when supported by the RMW).
content_filter_parameters string[] [] Parameters of the DDS content-filter expression.
image_transport string raw Image chain only — input image transport.
point_cloud_transport string raw PointCloud2 chain only — input point cloud transport.

QoS settings of the input and output topic can be tuned via the standard qos_overrides mechanism (see the example filter.yaml below).

Provided executables

For each supported sensor_msgs type the package builds two executables and two composable components: the plain node <type>_filter_chain and its lifecycle counterpart <type>_filter_chain_lifecycle.

Message Type Node name and parameters namespace Component name
BatteryState battery_state_filter_chain sensor_filters::BatteryStateFilterChainNode
CameraInfo camera_info_filter_chain sensor_filters::CameraInfoFilterChainNode
CompressedImage compressed_image_filter_chain sensor_filters::CompressedImageFilterChainNode
FluidPressure fluid_pressure_filter_chain sensor_filters::FluidPressureFilterChainNode
Illuminance illuminance_filter_chain sensor_filters::IlluminanceFilterChainNode
Image image_filter_chain sensor_filters::ImageFilterChainNode
Imu imu_filter_chain sensor_filters::ImuFilterChainNode
JointState joint_state_filter_chain sensor_filters::JointStateFilterChainNode
Joy joy_filter_chain sensor_filters::JoyFilterChainNode
JoyFeedbackArray joy_feedback_array_filter_chain sensor_filters::JoyFeedbackArrayFilterChainNode
LaserScan laser_scan_filter_chain sensor_filters::LaserScanFilterChainNode
MagneticField magnetic_field_filter_chain sensor_filters::MagneticFieldFilterChainNode
MultiDOFJointState multi_dof_joint_state_filter_chain sensor_filters::MultiDOFJointStateFilterChainNode
MultiEchoLaserScan multi_echo_scan_filter_chain sensor_filters::MultiEchoLaserScanFilterChainNode
NavSatFix navsat_fix_filter_chain sensor_filters::NavSatFixFilterChainNode
PointCloud pointcloud_filter_chain sensor_filters::PointCloudFilterChainNode
PointCloud2 pointcloud2_filter_chain sensor_filters::PointCloud2FilterChainNode
Range range_filter_chain sensor_filters::RangeFilterChainNode
RelativeHumidity relative_humidity_filter_chain sensor_filters::RelativeHumidityFilterChainNode
Temperature temperature_filter_chain sensor_filters::TemperatureFilterChainNode
TimeReference time_reference_filter_chain sensor_filters::TimeReferenceFilterChainNode

Features

Lifecycle support

For every chain executable, a managed (lifecycle) variant suffixed with _lifecycle is also available. Use the lifecycle CLI to drive its states. The lifecycle node only subscribes/publishes while in the active state; deactivating it stops the data flow without destroying the chain.

Lifecycle component nodes are also available named like sensor_filters::LifecycleBatteryStateFilterChainNode.

Transport support

Filters operating on Image and PointCloud2 messages automatically use image_transport and point_cloud_transport respectively to publish and subscribe to topics. The input transport can be selected with the image_transport / point_cloud_transport parameter.

PointCloud2 transport uses SensorDataQoS by default for publications (in most cases). However, it is not a good fit for filters which are usually treated as reliable chains. Therefore, the PointCloud2 filter defaults to reliable publishers. If you need to use unreliable publishers by default, either use standard QoS overrides or set parameter default_best_effort_publisher to true. For symmetry, there is also parameter default_best_effort_subscription to control the subscriber side.

Lazy subscription

Setting is_lazy: true causes the node to subscribe to the input topic only when there is at least one subscriber connected to the output topic. As soon as the last output subscriber disconnects, the input subscription is dropped, which is especially useful for filters that do expensive processing.

This requires ROS 2 Iron or newer (matched-event callbacks).

Content filtering

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

2.0.0 (2026-06-24)

  • Added integration tests.
  • Fixed license issues, made the repo REUSE-compliant.
  • Added support for lazy input topics.
  • Added support for content filters on subscriber.
  • Allow overriding QoS settings.
  • Add new message types for joy feedback array, fluid pressure, illuminance and other
  • Use node interfaces in transport-based chains if available.
  • Add image and pointcloud2 filter chains
  • Add lifecycle nodes
  • Port to ROS 2
  • Contributors: Martin Pecka, solonovamax

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.
      • publish_sample_data [default: false]
      • log_level [default: INFO]
      • lifecycle [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sensor_filters at Robotics Stack Exchange

Package symbol

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
melodic

Package Summary

Version 1.1.1
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version master
Last Updated 2026-06-24
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

[!NOTE] This is the ROS 1 version of the package. ROS 2 version can be found on ros2 branch.

sensor_filters

This package is a collection of nodes and nodelets that service a filters::FilterChain for message types from sensor_msgs package. See https://wiki.ros.org/filters to read more about the filters package.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS nodelets, not as ROS filters implementing the filters::FilterBase<> interface required by this package. Running pcl_ros filter nodelets does not require any additional setup except a running nodelet manager. Package point_cloud2_filters contains reimplementation of some of these pcl_ros PCL filters as ROS filters.

The task of each node(let) in sensor_filters is very simple: load the filter chain, subscribe ~input topic, and publish the filtered messages to ~output topic.

The size of message queues is configured via ~input_queue_size and ~output_queue_size, both defaulting to 10 messages.

The namespaces from which the filters load are the following:

Message Type Namespace Nodelet Name
CompressedImage ~image_filter_chain sensor_filters/compressedimage_filter_chain
Image ~image_filter_chain sensor_filters/image_filter_chain
Imu ~imu_filter_chain sensor_filters/imu_filter_chain
Joy ~joy_filter_chain sensor_filters/joy_filter_chain
LaserScan ~scan_filter_chain sensor_filters/laserscan_filter_chain
MagneticField ~magnetic_field_filter_chain sensor_filters/magneticfield_filter_chain
MultiEchoLaserScan ~scan_filter_chain sensor_filters/multiecholaserscan_filter_chain
NavSatFix ~nav_sat_fix_filter_chain sensor_filters/navsatfix_filter_chain
PointCloud ~cloud_filter_chain sensor_filters/pointcloud_filter_chain
PointCloud2 ~cloud_filter_chain sensor_filters/pointcloud2_filter_chain
Range ~range_filter_chain sensor_filters/range_filter_chain
RelativeHumidity ~humidity_filter_chain sensor_filters/relativehumidity_filter_chain
Temperature ~temperature_filter_chain sensor_filters/temperature_filter_chain

Provided filters

This package also provides a few high-level filters.

sensor_filters/ChangeHeader/$MESSAGE_TYPE

This filter allows changing the contents of the header of sensor messages. You can use it for example to correct the frame_id of a sensor, or adjust the timestamp of its messages.

Parameters

  • frame_id_prefix (string): Add this prefix to header.frame_id
  • frame_id_suffix (string): Add this suffix to header.frame_id
  • frame_id (string): Replace header.frame_idwith this value (prefix and suffix are then ignored)
  • seq (uint): Replace header.seq with this value
  • seq_relative (uint): Add this value to header.seq (watch out for unsigned int underflow)
  • stamp (double): Set header.stamp to this value (double value is converted to ros::Time)
  • stamp_relative (double): Add this value to header.stamp (double value is converted to ros::Duration)

Where to get other filters

If you are looking for other implementations of sensor filters, you will probably be disappointed, as they are really scarce. I don’t know why it is the case, because filter chains are the most efficient data processing path ROS offers, yet most people chose to write nodelets instead.

There is, however, one noteworthy exception:

robot_body_filter

robot_body_filter is a versatile tool for removing the body parts of a robot from laser scans and point clouds exactly according to the robot’s URDF model. No more box approximations of your robots! Represent them exactly as they are!

point_cloud2_filters

point_cloud2_filters provides an implementation similar to pcl::PassThrough or pcl::CropBox to cut PointCloud2 messages.

laser_filters compatibility

The LaserScan filter chain node is compatible with the scan_to_scan_node from laser_filters package (it can load the same filters using the same config). It does not, however, use TF message filter, so each filter has to wait for the required TFs itself.

Transport

Filters of type Image and PointCloud2 will automatically use the image_transport/point_cloud_transport to publish and subscribe to topics.

Why ROS filters?

The simple answer is - performance. ROS filters are the most efficient way to run a chain of processors on sensor data. Passing the message from one filter to another is as simple as doing a C++ object copy. There is even a proposal for an in-place (zero-copy) implementation.

You can think about nodelets and their said performance. If used right and you run only non-modifying filters, you might actually get to true zero-copy filtering. But you have a dynamic allocation of at least one shared_ptr in your path, which might be costly and with unpredictable impacts on run time.

If you use nodelets and publish/subscribe references to messages instead of shared_ptrs, passing the message from one nodelet to another in the same manager not only does a copy of the message, but it also undergoes a serialization and deserialization step, which is most probably costly.

If you do not even use nodelets, but plain nodes, passing a message requires serializing it and sending via a local (or, even worse, remote TCP) socket to the other node. So you have copying, (de)serializing and sending via the network stack.

In the future, I plan to add some measurements to give some solid ground to these propositions.

Extensibility

Both the nodes and nodelets offer common code that can be shared so that you can build extensions of the simple filter chain handlers provided by this package.

See the examples folder for more verbose examples.

Nodes

```C++ #include <sensor_msgs/PointCloud2.h>

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Dependant Packages

No known dependants.

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged sensor_filters at Robotics Stack Exchange

Package symbol

sensor_filters package from sensor_filters repo

sensor_filters

ROS Distro
noetic

Package Summary

Version 1.1.1
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/sensor_filters.git
VCS Type git
VCS Version master
Last Updated 2026-06-24
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Simple sensor filter chain nodes and nodelets

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

[!NOTE] This is the ROS 1 version of the package. ROS 2 version can be found on ros2 branch.

sensor_filters

This package is a collection of nodes and nodelets that service a filters::FilterChain for message types from sensor_msgs package. See https://wiki.ros.org/filters to read more about the filters package.

Attention: The PCL filters provided by package pcl_ros are not “compatible” with this package. They are instances of PCL filters, but written as ROS nodelets, not as ROS filters implementing the filters::FilterBase<> interface required by this package. Running pcl_ros filter nodelets does not require any additional setup except a running nodelet manager. Package point_cloud2_filters contains reimplementation of some of these pcl_ros PCL filters as ROS filters.

The task of each node(let) in sensor_filters is very simple: load the filter chain, subscribe ~input topic, and publish the filtered messages to ~output topic.

The size of message queues is configured via ~input_queue_size and ~output_queue_size, both defaulting to 10 messages.

The namespaces from which the filters load are the following:

Message Type Namespace Nodelet Name
CompressedImage ~image_filter_chain sensor_filters/compressedimage_filter_chain
Image ~image_filter_chain sensor_filters/image_filter_chain
Imu ~imu_filter_chain sensor_filters/imu_filter_chain
Joy ~joy_filter_chain sensor_filters/joy_filter_chain
LaserScan ~scan_filter_chain sensor_filters/laserscan_filter_chain
MagneticField ~magnetic_field_filter_chain sensor_filters/magneticfield_filter_chain
MultiEchoLaserScan ~scan_filter_chain sensor_filters/multiecholaserscan_filter_chain
NavSatFix ~nav_sat_fix_filter_chain sensor_filters/navsatfix_filter_chain
PointCloud ~cloud_filter_chain sensor_filters/pointcloud_filter_chain
PointCloud2 ~cloud_filter_chain sensor_filters/pointcloud2_filter_chain
Range ~range_filter_chain sensor_filters/range_filter_chain
RelativeHumidity ~humidity_filter_chain sensor_filters/relativehumidity_filter_chain
Temperature ~temperature_filter_chain sensor_filters/temperature_filter_chain

Provided filters

This package also provides a few high-level filters.

sensor_filters/ChangeHeader/$MESSAGE_TYPE

This filter allows changing the contents of the header of sensor messages. You can use it for example to correct the frame_id of a sensor, or adjust the timestamp of its messages.

Parameters

  • frame_id_prefix (string): Add this prefix to header.frame_id
  • frame_id_suffix (string): Add this suffix to header.frame_id
  • frame_id (string): Replace header.frame_idwith this value (prefix and suffix are then ignored)
  • seq (uint): Replace header.seq with this value
  • seq_relative (uint): Add this value to header.seq (watch out for unsigned int underflow)
  • stamp (double): Set header.stamp to this value (double value is converted to ros::Time)
  • stamp_relative (double): Add this value to header.stamp (double value is converted to ros::Duration)

Where to get other filters

If you are looking for other implementations of sensor filters, you will probably be disappointed, as they are really scarce. I don’t know why it is the case, because filter chains are the most efficient data processing path ROS offers, yet most people chose to write nodelets instead.

There is, however, one noteworthy exception:

robot_body_filter

robot_body_filter is a versatile tool for removing the body parts of a robot from laser scans and point clouds exactly according to the robot’s URDF model. No more box approximations of your robots! Represent them exactly as they are!

point_cloud2_filters

point_cloud2_filters provides an implementation similar to pcl::PassThrough or pcl::CropBox to cut PointCloud2 messages.

laser_filters compatibility

The LaserScan filter chain node is compatible with the scan_to_scan_node from laser_filters package (it can load the same filters using the same config). It does not, however, use TF message filter, so each filter has to wait for the required TFs itself.

Transport

Filters of type Image and PointCloud2 will automatically use the image_transport/point_cloud_transport to publish and subscribe to topics.

Why ROS filters?

The simple answer is - performance. ROS filters are the most efficient way to run a chain of processors on sensor data. Passing the message from one filter to another is as simple as doing a C++ object copy. There is even a proposal for an in-place (zero-copy) implementation.

You can think about nodelets and their said performance. If used right and you run only non-modifying filters, you might actually get to true zero-copy filtering. But you have a dynamic allocation of at least one shared_ptr in your path, which might be costly and with unpredictable impacts on run time.

If you use nodelets and publish/subscribe references to messages instead of shared_ptrs, passing the message from one nodelet to another in the same manager not only does a copy of the message, but it also undergoes a serialization and deserialization step, which is most probably costly.

If you do not even use nodelets, but plain nodes, passing a message requires serializing it and sending via a local (or, even worse, remote TCP) socket to the other node. So you have copying, (de)serializing and sending via the network stack.

In the future, I plan to add some measurements to give some solid ground to these propositions.

Extensibility

Both the nodes and nodelets offer common code that can be shared so that you can build extensions of the simple filter chain handlers provided by this package.

See the examples folder for more verbose examples.

Nodes

```C++ #include <sensor_msgs/PointCloud2.h>

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package sensor_filters

1.1.1 (2023-06-07)

  • Reformatted, added catkin lint.
  • Simplified the license statements.
  • Contributors: Martin Pecka

1.1.0 (2023-05-29)

  • Using image_transport and point_cloud_transport where applicable.
  • Noetic compatibility.
  • Improved README and added example files. Closes #1.
  • Contributors: Martin Pecka

1.0.5 (2021-07-30)

  • Fixed typo leading to segfaults when using ChangeHeader filter.
  • Contributors: Martin Pecka

1.0.4 (2021-06-24)

  • Added ChangeHeader filter
  • Contributors: Martin Pecka

1.0.3 (2021-05-20)

  • Fixed data types of nodes.
  • Contributors: Martin Pecka

1.0.2 (2021-05-20)

  • Fix for Noetic.
  • Contributors: Martin Pecka

1.0.1 (2021-05-19)

  • Initial version.
  • Contributors: Martin Pecka

Dependant Packages

No known dependants.

Launch files

  • examples/filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on LaserScan messages that does intensity filtering and adjusts scan timestamps.
  • examples/image_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on Image messages. This example showcases that the filter chain uses image_transport to subscribe and publish.
  • examples/pointcloud2_filter.launch
    • SPDX-License-Identifier: Unlicense SPDX-FileCopyrightText: Czech Technical University in Prague An example launch file for running a filter on PointCloud2 messages. This example showcases that the filter chain uses point_cloud_transport to subscribe and publish.

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged sensor_filters at Robotics Stack Exchange