trigger_rate.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Franka Emika GmbH
2 // Use of this source code is governed by the Apache-2.0 license, see LICENSE
4 
5 namespace franka_hw {
6 
7 TriggerRate::TriggerRate(double rate) : period_(1.0 / rate), time_stamp_(ros::Time::now()) {}
8 
10  if ((ros::Time::now() - time_stamp_).toSec() > period_) {
12  return true;
13  }
14  return false;
15 }
16 
17 } // namespace franka_hw
TriggerRate(double rate=30.0)
Definition: trigger_rate.cpp:7
static Time now()


franka_hw
Author(s): Franka Emika GmbH
autogenerated on Fri Oct 23 2020 03:47:05