The function PublisherPlugin::advertiseImpl was extended to support PublisherOptions with the last update.
If a child class does not override this function, an error message is generated and the advertise function without PublisherOptions is called instead.
However, the "default" image_transport::advertise function always creates PublisherOptions leading to error messages, even if the PublisherOptions are not required.
I would suggest using std::optional<rclcpp::PublisherOptions> in order to differentiate between options being required or not.
By this, the fitting advertiseImpl function can be called respectively.
Error messages are then only produced if the new option is explicitly required.
UPDATE:
Sorry for updating this issue quite often...
I couldn't see the reason for having the advertiseImplWithOptions functions, however, after multiple tests, I think I got it...
The function
PublisherPlugin::advertiseImpl
was extended to supportPublisherOptions
with the last update. If a child class does not override this function, an error message is generated and theadvertise
function withoutPublisherOptions
is called instead.However, the "default"
image_transport::advertise
function always createsPublisherOptions
leading to error messages, even if the PublisherOptions are not required. I would suggest usingstd::optional<rclcpp::PublisherOptions>
in order to differentiate between options being required or not. By this, the fittingadvertiseImpl
function can be called respectively. Error messages are then only produced if the new option is explicitly required.UPDATE: Sorry for updating this issue quite often... I couldn't see the reason for having the
advertiseImplWithOptions
functions, however, after multiple tests, I think I got it...