ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

rqt_publisher genpy.Time[0]

asked 2016-02-18 08:50:40 -0600

Porti77 gravatar image

How i can publish a msg with rqt_publisher with current time added to the stamp in a msg?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-18 22:13:39 -0600

rhaschke gravatar image

For values, one can use any valid python expression, including functions from math, time, and random modules (without module prefix). Thus, for time, one should use time() in the secs field of the time stamp and time()*1e9 % 1e9 for the nsecs field. time() returns the seconds since epoch as float.

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


Asked: 2016-02-18 08:50:40 -0600

Seen: 560 times

Last updated: Feb 18 '16