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. More... | |
| std::string | getStatusMsg () |
| return the status message More... | |
| bool | publish () |
| publish the newly received data More... | |
| void | setAggregatedMessage (diagnostic_updater::DiagnosticStatusWrapper &status) |
| set the aggregated message More... | |
| void | setMessageFromStatus (diagnostic_updater::DiagnosticStatusWrapper &status) |
| set the message based on level More... | |
| virtual | ~Diagnostics () |
| destroys all ros nodehandle and shutsdown all publisher More... | |
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.
|
inlinevirtual |
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.
| void Diagnostics::setAggregatedMessage | ( | diagnostic_updater::DiagnosticStatusWrapper & | status | ) |
set the aggregated message
Definition at line 91 of file diagnostics.cpp.
| void Diagnostics::setMessageFromStatus | ( | diagnostic_updater::DiagnosticStatusWrapper & | status | ) |
set the message based on level
Definition at line 80 of file diagnostics.cpp.
|
private |
joints names
Definition at line 68 of file diagnostics.hpp.
|
private |
joints electric current
Definition at line 71 of file diagnostics.hpp.
|
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.
|
private |
Memory proxy
Definition at line 65 of file diagnostics.hpp.
|
private |
diagnostics publisher
Definition at line 62 of file diagnostics.hpp.
|
private |
The status message
Definition at line 84 of file diagnostics.hpp.
|
private |
the temperature to alert an error
Definition at line 81 of file diagnostics.hpp.
|
private |
the temperature to alert a warning
Definition at line 78 of file diagnostics.hpp.