Publisher publishing message only on state/msg change
Hi,
Is it possible to publish ros2 message only on state change ? I was wondering if there is any flag that can set while creating a publisher, so that it will automatically handle publishing only on state change. I can always save the previously published message locally and compare them before publishing but just wondering if there is a better way.
Thanks