本文整理汇总了C++中diagnostic_updater::DiagnosticStatusWrapper::summaryf方法的典型用法代码示例。如果您正苦于以下问题:C++ DiagnosticStatusWrapper::summaryf方法的具体用法?C++ DiagnosticStatusWrapper::summaryf怎么用?C++ DiagnosticStatusWrapper::summaryf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类diagnostic_updater::DiagnosticStatusWrapper
的用法示例。
在下文中一共展示了DiagnosticStatusWrapper::summaryf方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: diagnoseConnections
void diagnoseConnections(diagnostic_updater::DiagnosticStatusWrapper &status) {
if (!fadeToColorClient)
status.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR,
"Not all required services are connected.");
else
status.summaryf(diagnostic_msgs::DiagnosticStatus::OK,
"All required services are connected.");
}
示例2: diagnoseCANConnection
void CANPriusNode::diagnoseCANConnection(
diagnostic_updater::DiagnosticStatusWrapper& status) {
if (_canConnection && _canConnection->isOpen())
status.summaryf(diagnostic_msgs::DiagnosticStatus::OK,
"CAN connection opened on %s.",
_canConnection->getDevicePathStr().c_str());
else
status.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR,
"CAN connection closed on %s.", _canDeviceStr.c_str());
}
示例3: phidget_spatial_diagnostic
void phidget_spatial_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
{
if (!spatialError)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
else
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "IMU cannot be initialized");
stat.addf("Recommendation", PhidgetIMU_INIT_ERROR);
}
}
示例4: phidget_spatial_diagnostic
void phidget_spatial_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
{
if (!spatialError)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
else
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
stat.addf("Recommendation", "Please verify that the robot has a Phidget Spatial board. If present, please unplug and replug the Phidget Spatial Board USB cable from the Motherboard.");
}
}
示例5: phidget_ik_diagnostic
void phidget_ik_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
{
if (!interfaceKitError)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
else
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
stat.addf("Recommendation", "Please unplug and replug the Phidget Interface Kit Board USB cable from the Motherboard.");
}
}
示例6: ssc32_diagnostic
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
void ssc32_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
{
if (!ssc32Error)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
else if (ssc32Error == 1)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "ssc32 cannot be initialized");
stat.addf("Recommendation",SSC32_ERROR_CONNECTION);
}
else if (ssc32Error == 2)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot move arm");
stat.addf("Recommendation", ERROR_MOVING_ARM);
}
}
示例7: run
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
{
if (boost::shared_ptr<MAVConnInterface> link = weak_link.lock()) {
mavlink_status_t mav_status = link->get_status();
stat.addf("Received packets:", "%u", mav_status.packet_rx_success_count);
stat.addf("Dropped packets:", "%u", mav_status.packet_rx_drop_count);
stat.addf("Buffer overruns:", "%u", mav_status.buffer_overrun);
stat.addf("Parse errors:", "%u", mav_status.parse_error);
stat.addf("Rx sequence number:", "%u", mav_status.current_rx_seq);
stat.addf("Tx sequence number:", "%u", mav_status.current_tx_seq);
if (mav_status.packet_rx_drop_count > last_drop_count)
stat.summaryf(1, "%d packeges dropped since last report",
mav_status.packet_rx_drop_count - last_drop_count);
else if (is_connected)
stat.summary(0, "connected");
else
// link operational, but not connected
stat.summary(1, "not connected");
last_drop_count = mav_status.packet_rx_drop_count;
} else {
stat.summary(2, "not connected");
}
}
示例8: gps_diagnostic
void gps_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
{
if (gps_state == 0)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "The gps is working");
else if (gps_state == 1)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "Can't intialize");
stat.addf("Recommendation", "The gps could not be initialized. Please make sure the gps is connected to the motherboard and is configured. You can follow points 1.3 and after in the following tutorial for the configuration: http://ros.org/wiki/gpsd_client/Tutorials/Getting started with gpsd_client");
}
else if (gps_state == 2)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "wrong lib gpsd version");
stat.addf("Recommendation", "Please make sure that gpsd is installed and that you have at least the api major version 3 or after installed.");
}
}
示例9: phidget_encoder_diagnostic
void phidget_encoder_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
* Function that will report the status of the hardware to the diagnostic topic
*/
{
if (!encoderError)
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "intialized");
else if(encoderError == 1)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
stat.addf("Recommendation", "Please verify that the robot has a Phidget Encoder board. If present, please unplug and replug the Phidget Spatial Board USB cable from the Motherboard.");
}
else if(encoderError == 2)
{
stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot read");
stat.addf("Recommendation", "Please verify that the two encoders are connected to the Phidget Encoder Board.");
}
}
示例10: run
void AnalogInputTask::run(diagnostic_updater::DiagnosticStatusWrapper &stat) {
stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "[%d, %d, %d, %d]",
values[0], values[1], values[2], values[3]);
}