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

How to create a simple publisher to publish current time ?

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

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

Hamid Didari 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

Question Tools

1 follower

Stats

Asked: 2014-05-22 19:06:49 -0600

Seen: 508 times

Last updated: May 24 '14