disable_rostime for roscpp

asked 2020-03-13 10:24:05 -0600

Felix Messmer gravatar image

updated 2020-03-13 10:25:34 -0600

I'm looking for the corresponding api in roscpp of the following rospy api

rospy.init_node('emulation_clock', disable_rostime=True)

i.e. I want to configure disable_rostime for a cpp publisher node publishing a custom clock
when publishing a custom clock, I will have to set use_sim_time to True so other nodes will subscribe to the published /clock topic
however, setting use_sim_time to True also lets my cpp publisher to wait for the /clock - which would be prevented via disable_rostime...however, this seems not to be available in roscpp's

ros::init(argc, argv, "emulation_clock");

(python works, but has high load - so I wanted to implement the clock publisher in roscpp for performance reasons...)

edit retag flag offensive close merge delete

Comments

I don't believe this is supported (ie: disable_rostime in roscpp). Initialising time is unconditional (here and here) afaict.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-13 11:40:51 -0600 )edit

I ended up using https://www.boost.org/doc/libs/1_35_0... instead of the roscpp Timer

Felix Messmer gravatar image Felix Messmer  ( 2020-03-16 10:26:47 -0600 )edit