Template Class DeltaFilter

Inheritance Relationships

Base Type

Class Documentation

template<typename MessageType>
class DeltaFilter : public message_filters::ComparisonFilter<MessageType, DeltaCompare>

ROS 2 Delta filter.

Given a stream of messages, the message is passed down to the next filter if any of the message fields, that may be acquired by field_getters have changed compared to the previously accepted message.

Public Types

typedef std::shared_ptr<MessageType const> MConstPtr
typedef std::function<MFieldType(const MConstPtr&)> FieldGetterFunctionType

Public Functions

template<typename FilterType>
inline explicit DeltaFilter(FilterType &filter, std::forward_list<FieldGetterFunctionType> field_getters)

Initialize DeltaFilter.

Parameters:
  • filter – An instance of the ‘SimpleFilter’ successor class. The input filter to connect to.

  • field_getters – A list of callable objects that are expected to retrieve a value of a basic type from a message field for comparison. Any of the ‘field_getters’ is applied to the cached and to the current message. The returned values are compared. If any of these values differ between cached and current message, the current message is accepted.

virtual ~DeltaFilter() = default