roscpp clear topics node
Hi,
I'm using image_transport to publish images, and depending on the format, it will publish it to different topics.
So to give a simplified example:
- if format == grayscale, then I want to publish my images on /image/grayscale
- if format == color, then I want to publish my images on /image/color
That works, but if I want to change format on the fly (eg from grayscale to color), I want to "unadvertise" the topic /image/grayscale" so it doesnt show up in the rostopic list anymore.
Is this in any way possible? I tried first deleting my image_transport object and nodehandle object, then creating new objects and advertise the new topic, but the old topic remains in the list of available topics.