Python call callback function on input change
Some basic programming question:
My node is subscribed to the /joint_states
topic, more exactly /joint_states/position[5]
.
I am trying to publish a message, each time the joint6's state has changed.
The /joint_states
topic has a high rate 0.1 sec/ published messages, so right now i publish the same value, 10x a sec.
I would like to call the callback function only on input change.
Does python have some special function for that?
Any ideas?
btw: i would have a much easier task if i could publish fake_gripperarm_controller
using demo.launch from my MoveIt! package