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

clear a topic to make it 'unpublished'

asked 2014-02-26 04:38:31 -0500

david.c.liebman gravatar image

I am working on a project where I want to be able to launch the turtlebot gmapping demo immediately after the amcl demo. I do not want to add to a map that I've already been navigating, instead I want to clear the map that was used by the amcl navigation demo and start a new one. The problem I have is that the /map topic seems to hold the values that the navigating demo was using. I don't want to quit ros and start it over again. What I was hoping was that there was some way to clear the map and proceed from there.

How does one clear a topic to the state of emptyness or the state of not being published at all? Can this be done programmatically? Does this make sense?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-26 04:51:59 -0500

dornhege gravatar image

A topic doesn't hold anything. What does is the node that publishes that topic. Either the node has a functionality to clear/unpublish a topic or you simply kill the node that has been publishing so far.

In your case amcl probably uses the map_server. As you want to run gmapping afterwards, you can just bring that down, i.e. kill the map_server, and probably also amcl. If you start gmapping then, no other map messages should be flying around.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-02-26 04:38:31 -0500

Seen: 1,556 times

Last updated: Feb 26 '14