Skip to content

sensor_msgs/PointCloud2 grows heap by 32MB every message. #149

@trusktr

Description

@trusktr

Is there a feature of rosnodejs that can use constant memory instead of creating new objects each message?

I am making a realtime web-based visualizer for lidar data, and receiving point clouds over rosnodejs (with the standard sensor_msgs/PointCloud2 message type) results in 32MB heap growth per frame (frames are at 10fps right now), and every couple seconds the browser does a major GC to clean up 400 to 500 MB. It is very inefficient as you can imagine.

Ideally I would like to have points for each message written into an existing ArrayBuffer (or even a normal Array) so as to avoid allocating new memory for every message that arrives.

Does rosnodejs have a way to do this?

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