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).
image_transport does not automatically declare the
image_transportparameter, meaning that even if the user sets it, it is not used unless the code usingImageTransportdeclares the parameter itself:image_common/image_transport/include/image_transport/transport_hints.hpp
Lines 66 to 72 in ffc07c9
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).