0
$\begingroup$

Rosanswers logo

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


Originally posted by BhanuKiran.Chaluvadi on ROS Answers with karma: 241 on 2021-11-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

No, there is no built-in way to do that. You will need to compare the messages yourself.


Originally posted by Geoff with karma: 4203 on 2021-11-02

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.