Skip to content

Discrepancy in (not-)declaring image_transport parameter vs. point_cloud_transport parameter #414

Description

@peci1

image_transport does not automatically declare the image_transport parameter, meaning that even if the user sets it, it is not used unless the code using ImageTransport declares the parameter itself:

{
if (node_interfaces.get_node_parameters_interface()->has_parameter(parameter_name)) {
transport_ =
node_interfaces.get_node_parameters_interface()->get_parameter(parameter_name).as_string();
} else {
transport_ = default_transport;
}

point_cloud_transport, on the other hand, automatically declares this parameter:

https://github.com/ros-perception/point_cloud_transport/blob/567cf53098f960a015b644b3426c03b21c89db2d/point_cloud_transport/include/point_cloud_transport/transport_hints.hpp#L78-L83

This is a pretty bad discrepancy between the two similar packages. It would be great to unify the behavior. Which way is the preferred one? My preference would be to autodeclare the parameter (if not declared).

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