get wall time in callback function of publisher in ROS2
I want to use the time in the callback function to publish a pre-determined (interpolated table). The Node should provide a now() function but I am doing something wrong . How to get the time ? if I define Time rostime and then do rostime = now() or ros_time = this->now() it does not work.
Asked by edward on 2019-08-06 02:39:57 UTC
Comments
"does not work" is not a sufficient description of a problem. We cannot help you like this.
Does it not compile? If so: show a verbatim copy-paste of the compilation error.
Does it not return the (correct) time at runtime? If so: show an MWE that exhibits the problem.
Asked by gvdhoorn on 2019-08-06 10:09:27 UTC