ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Stop publishing a specific topic

asked 2017-03-21 14:21:15 -0600

Hi,

For testing purposes I want to stop the subscription of a topic during runtime (not programatically). I would like to know if there is any tool that allows this, any command that would allow this (or an XMLRPC to the ROS master to stop that topic, or something like that).

I do not want to kill the publishing node because what I want to do is to simulate a communication link lost. I was thinking that, if there is nothing, I would use topic_tools relay to remap the topic and then just kill the relay, but requires modifying the remaps on the launchfile (something I would like to avoid).

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-03-21 14:24:53 -0600

NEngelhard gravatar image

You could use the mux from topic_tools. Create two publishers (one that sends data and one which doesn't) and start with the publishing node. You can then switch to the quiet one if you want to simulate your blackout.

edit flag offensive delete link more

Comments

1

Thanks a lot, that still has the problem of the relay (requires modiying the launchfiles) but is a better solution that what I had in mind :)

Javier V. Gómez gravatar image Javier V. Gómez  ( 2017-03-22 06:12:04 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-21 14:21:15 -0600

Seen: 6,330 times

Last updated: Mar 21 '17