how to stop publishing a specific topic

asked 2020-02-03 02:26:46 -0600

ramsonjehu gravatar image

Hi, I'm new to ROS and c++, I'm using ROS kinetic running on ubuntu 16.04, I want to stop a topic completely in run time, I don't want the topic to be advertised. im using roscpp, Is there any API to do so? please help me

edit retag flag offensive close merge delete


Just to avoid an xy-problem, could you please add a sentence or two explaining why you want to do this?

There could be a perfectly valid reason, but it would be good if you could tell us about your motivation.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-03 02:44:47 -0600 )edit

I'm writing a publisher node to publish camera image data on a topic, now if i unplug the camera, i want to stop that topic from being advertised.

ramsonjehu gravatar image ramsonjehu  ( 2020-02-03 02:54:16 -0600 )edit