This class defines a Diagnostic It is used to check the robot state and sent to requesting nodes. More...
#include <diagnostics.hpp>
Public Member Functions | |
Diagnostics (const qi::SessionPtr &session, ros::Publisher *pub, const std::vector< std::string > &joints_all_names, const std::string &robot) | |
Constructor. | |
std::string | getStatusMsg () |
return the status message | |
bool | publish () |
publish the newly received data | |
void | setAggregatedMessage (diagnostic_updater::DiagnosticStatusWrapper &status) |
set the aggregated message | |
void | setMessageFromStatus (diagnostic_updater::DiagnosticStatusWrapper &status) |
set the message based on level | |
virtual | ~Diagnostics () |
destroys all ros nodehandle and shutsdown all publisher | |
Private Attributes | |
std::vector< std::string > | joints_all_names_ |
std::vector< float > | joints_current_ |
std::vector< std::string > | keys_tocheck_ |
qi::AnyObject | memory_proxy_ |
ros::Publisher * | pub_ |
diagnostic_updater::DiagnosticStatusWrapper | status_ |
float | temperature_error_level_ |
float | temperature_warn_level_ |
This class defines a Diagnostic It is used to check the robot state and sent to requesting nodes.
Definition at line 30 of file diagnostics.hpp.
Diagnostics::Diagnostics | ( | const qi::SessionPtr & | session, |
ros::Publisher * | pub, | ||
const std::vector< std::string > & | joints_all_names, | ||
const std::string & | robot | ||
) |
Constructor.
session[in] | Naoqi session |
pub[in] | ROS topic publisher |
joints_all_names[in] | all joints to check |
robot[in] | robot type |
Definition at line 23 of file diagnostics.cpp.
virtual Diagnostics::~Diagnostics | ( | ) | [inline, virtual] |
destroys all ros nodehandle and shutsdown all publisher
Definition at line 46 of file diagnostics.hpp.
std::string Diagnostics::getStatusMsg | ( | ) |
return the status message
Definition at line 231 of file diagnostics.cpp.
bool Diagnostics::publish | ( | ) |
publish the newly received data
Definition at line 99 of file diagnostics.cpp.
set the aggregated message
Definition at line 91 of file diagnostics.cpp.
set the message based on level
Definition at line 80 of file diagnostics.cpp.
std::vector<std::string> Diagnostics::joints_all_names_ [private] |
joints names
Definition at line 68 of file diagnostics.hpp.
std::vector<float> Diagnostics::joints_current_ [private] |
joints electric current
Definition at line 71 of file diagnostics.hpp.
std::vector<std::string> Diagnostics::keys_tocheck_ [private] |
all the keys to check. It is a concatenation of temperatures_keys, stiffness_keys, current_keys
Definition at line 75 of file diagnostics.hpp.
qi::AnyObject Diagnostics::memory_proxy_ [private] |
Memory proxy
Definition at line 65 of file diagnostics.hpp.
ros::Publisher* Diagnostics::pub_ [private] |
diagnostics publisher
Definition at line 62 of file diagnostics.hpp.
The status message
Definition at line 84 of file diagnostics.hpp.
float Diagnostics::temperature_error_level_ [private] |
the temperature to alert an error
Definition at line 81 of file diagnostics.hpp.
float Diagnostics::temperature_warn_level_ [private] |
the temperature to alert a warning
Definition at line 78 of file diagnostics.hpp.