rospy publisher and subscriber in the same node, filter out "own" messages
Hey ROS folks
I have a node in Python, in which I subscribe to a topic, and I also want to simultaneously publish on it. And this node is not the only one doing that. In the subscriber, I want to filter out messages which are generated by my node.
Is there any API/package to do that?
In C++, I can imagine publishing/subscribing shared pointers, remembering a few last published messages, and comparing the memory address of the received message with the remembered addresses.
In Python, this is obviously not possible. Or is it?
If the messages have Header fields in them, it might be possible to filter them based on timestamp. Unfortunately, my messages do not have a header, and I can't alter the message definition.