Ask Your Question
0

How to create a simple publisher to publish current time ?

asked 2014-05-22 19:06:49 -0500

keshav_sarraf gravatar image

Hello guys! I am a ros and cpp beginner and I have read the simple ros publisher tutorial given in the wiki. I want to create a simple publisher that can publish time every second. how can I modify the code given in the tutorial to do the same.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-24 19:39:25 -0500

hamid gravatar image

you can use Timers in ros to count seconds in one variable , and in your callback event for Timer you can publish Time over ros .

for this you can use std_msg::int64

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-05-22 19:06:49 -0500

Seen: 298 times

Last updated: May 24 '14