Skip to content

ROS 2 support for in-place filter updates #94

Description

@Maik13579

Hi,

I am currently writing my own filter framework. The main differences are that my filters are lifecycle components, and data exchange is based on ROS2 type adapters. Each filter receives ownership of a C++ data type through std::unique_ptr, for example pcl::PointCLoud or grid_map::GridMap.

I also added a compatibility node that can run existing filters::FilterChain chains.

While doing that, I noticed that ROS2 filters still use:

bool update(const T & data_in, T & data_out)

For large types like point clouds or grid maps, this can cause full data copies inside filters.

I found this older issue about in-place updates (#27)

In that discussion, in-place support was considered reasonable, and it looks like ROS 1 Noetic later had related work in #38

Are there plans to support in-place updates in ROS 2?

Something like this would be useful:

bool update(T & data)

or another API that lets filters declare whether they support in-place operations, so FilterChain<T>can avoid unnecessary intermediate copies when possible.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions