Skip to content

Draco Plugin reads undeclared Parameters with custom Pointcloud #64

@finostro

Description

@finostro

I noticed that since the Draco plugin has parameters that depend on the Pointfield.
And when using having a field name that is not in the static list of declared parameters, then it complains that the parameter is not set .
However, when trying to set the parameter, ros2 disallows it because it has not been declared. (and also rqt_reconfigure does not show these params).

example when setting expert_attribute_types= true:
Publisher complains:

[component_container_mt-1] [ERROR] [1757098044.968232681] [point_cloud_transport]: Attribute data type not specified for intensity field entry.Using regular type recognition instead.
[component_container_mt-1] [INFO] [1757098044.968256082] [point_cloud_transport]: To set attribute type for intensity field entry, set /out/draco/attribute_mapping/attribute_type/intensity

on another terminal:

 ros2 param set /point_cloud_transport /out/draco/attribute_mapping/attribute_type/intensity GENERIC
Setting parameter failed: parameter '/out/draco/attribute_mapping/attribute_type/intensity' cannot be set because it was not declared

I tried to modify the draco_publisher.hpp code so that it declares the params when it gets the poincloud but it violates the constness of the
TypedEncodeResult encodeTyped(const sensor_msgs::msg::PointCloud2 & raw) const override;
function.

If I get a hint on how to fix it I'm happy to create a pull request.
Thank you for your help!

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