initializeRosTime method
Implementation
static Future<void> initializeRosTime() async {
try {
useSimTime = await nh.getParam('/use_sim_time', defaultValue: false);
log.dartros.info('Sim time: $useSimTime');
if (useSimTime) {
nh.subscribe(
'/clock',
rosgraph_msgs.Clock,
(Clock msg) {
simTime = msg.clock;
},
throttleMs: -1,
);
}
} on Exception catch (e) {
rethrow;
}
}