Ask Your Question
0

clean message on topic

asked 2015-09-13 20:04:18 -0600

tony gravatar image

Hi,

I have a publisher to publish message to one topic at different time. Each time before I publish the new message, how can I clean the messages on the topic published at other time? Thanks.

edit retag flag offensive close merge delete

Comments

Why would you need that? After a subscriber receives a message, this message then vanishes. Probably what you actually need in your situation is to use services as they allow to publish messages only on requests.

VitaliyProoks gravatar imageVitaliyProoks ( 2015-09-14 00:27:42 -0600 )edit

@VitaliyProoks Because I noticed that the robot didnot stop after publishing (0,0) to topic cmd_vel. I suspect that there is velocity command on topic cmd_vel published at other time.

tony gravatar imagetony ( 2015-09-14 05:30:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-09-14 07:02:14 -0600

VitaliyProoks gravatar image

Then it looks like it is issue in your robot's code, messaging in ROS works fine :) ROS provides tools for listening to/publishing from topics either from console or by means of rqt_gui try to debug by sending test messages and see what happens.

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: 2015-09-13 20:04:18 -0600

Seen: 296 times

Last updated: Sep 13 '15