39 #include <boost/accumulators/statistics/max.hpp> 40 #include <boost/accumulators/statistics/min.hpp> 66 violated_limits(false),
68 max_pos_val(-1 * numeric_limits<double>::
max()),
69 min_pos_val(numeric_limits<double>::
max()),
70 max_abs_vel_val(-1 * numeric_limits<double>::
max()),
71 max_abs_eff_val(-1 * numeric_limits<double>::
max())
89 stat->name =
"Joint (" +
name +
")";
92 stat->summary(diagnostic_msgs::DiagnosticStatus::OK,
"OK");
94 stat->summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Uncalibrated");
97 stat->summary(diagnostic_msgs::DiagnosticStatus::ERROR,
"No updates");
102 stat->summary(diagnostic_msgs::DiagnosticStatus::ERROR,
"NaN Values in Joint State");
123 stat->add(
"Max Position",
"N/A");
124 stat->add(
"Min Position",
"N/A");
125 stat->add(
"Max Abs. Velocity",
"N/A");
126 stat->add(
"Max Abs. Effort",
"N/A");
140 ROS_ERROR(
"Joint statistics attempted to update with a different name! Old name: %s, new name: %s.",
name.c_str(), js.name.c_str());
147 if (js.is_calibrated)
Publishes diagnostics for controllers, joints from pr2_mechanism_msgs/MechanismStatistics message...
bool update(const pr2_mechanism_msgs::JointStatistics &js)
double min(double a, double b)
bool is_valid(T t)
Returns false if a value is infinity, NaN, etc.
boost::shared_ptr< diagnostic_updater::DiagnosticStatusWrapper > toDiagStat() const
double max(double a, double b)
JointStats(std::string nam)