Ask Your Question
0

clear a topic to make it 'unpublished'

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

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 -0600

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 1,083 times

Last updated: Feb 26 '14