49 disable_warnings_(disable_warnings)
56 ROS_ERROR(
"Controller statistics attempted to update with a different name! Old name: %s, new name: %s.",
name.c_str(), cs.name.c_str());
77 stat->name =
"Controller (" +
name +
")";
80 stat->summary(diagnostic_msgs::DiagnosticStatus::OK,
"Running");
82 stat->summary(diagnostic_msgs::DiagnosticStatus::OK,
"Stopped");
87 stat->summary(diagnostic_msgs::DiagnosticStatus::WARN,
"!!! Broke Realtime, used more than 1000 micro seconds in update loop");
89 stat->summary(diagnostic_msgs::DiagnosticStatus::OK,
"!!! Broke Realtime, used more than 1000 micro seconds in update loop");
92 stat->add(
"Avg Update Time (usec)", (
int)(
mean_time.
toSec() * 1e6));
93 stat->add(
"Max Update Time (usec)", (
int)(
max_time.
toSec() * 1e6));
95 stat->add(
"Percent of Cycle Time Used", (
int) (
mean_time.
toSec() / 0.00001));
96 stat->add(
"Number of Control Loop Overruns",
num_overruns);
ros::Duration variance_time
ros::Time last_overrun_time
boost::shared_ptr< diagnostic_updater::DiagnosticStatusWrapper > toDiagStat() const
Publishes diagnostics for controllers, joints from pr2_mechanism_msgs/MechanismStatistics message...
bool update(const pr2_mechanism_msgs::ControllerStatistics &cs)
ControllerStats(std::string nam, bool disable_warnings)