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

possibility overwrite a rostopic?

asked 2012-10-10 23:50:49 -0500

Sudhan gravatar image

updated 2012-10-11 02:53:36 -0500

I would like to create a node(new_node) such that it should listen to a topic, process the topic further and should publish the edited topic in the same old name. But this should be written as a seperate node.

So, Is it possible to overwrite a rostopic ?

Note: When I run the new_node, only one topic should be published in the same name?

Thanks in advance for your suggestions.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-10-11 00:25:02 -0500

KruseT gravatar image

A node can publish on the same topic it listens to, but it cannot prevent all other nodes from getting both old and new messages.

Depending on what exactly you are trying to achieve, different solutions are possible.

If you know you just have one original node publishing, then you could remap the topic of that published node to a new custom topic. Your custom node can then listen on the custom topic, and publish messages on the original topic.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-10 23:50:49 -0500

Seen: 849 times

Last updated: Oct 11 '12