Open tpet opened 3 years ago
Workaround for nodes you can edit: put the following snippet before you start creating publishers and subscribers:
orig_init = rospy.topics._TopicImpl.__init__
def new_init(self, name, dataclass):
orig_init(self, name, dataclass)
self.name = self.resolved_name = name
rospy.topics._TopicImpl.__init__ = new_init
Remapping is done twice - in publisher and its internal implementation which leads to possible cycles and the publisher and its internal implementation reporting different topic names. In some cases remapping just does not work.
(I edited the issue to simplify it.)
One of failure cases is switching topics: you can't remap
a
tob
andb
toa
in the same node. The cycle may appear with resolved names.Example with
rospy_remap_cycle
nodelaunched from commandline:
With cycle appearing with resolved names:
Note that the publisher/subscriber reports expected topic names but not so the internal implementations.