diagnostics.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016 SoftBank Robotics Europe
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef DIAGNOSTICS_H
19 #define DIAGNOSTICS_H
20 
21 // NAOqi Headers
22 #include <qi/session.hpp>
23 
25 
31 {
32 public:
40  Diagnostics(const qi::SessionPtr& session,
41  ros::Publisher *pub,
42  const std::vector<std::string> &joints_all_names,
43  const std::string &robot);
44 
46  virtual ~Diagnostics() {}
47 
49  bool publish();
50 
53 
56 
58  std::string getStatusMsg();
59 
60 private:
63 
65  qi::AnyObject memory_proxy_;
66 
68  std::vector <std::string> joints_all_names_;
69 
71  std::vector <float> joints_current_;
72 
75  std::vector <std::string> keys_tocheck_;
76 
79 
82 
85 };
86 
87 #endif // DIAGNOSTICS_H
Diagnostics(const qi::SessionPtr &session, ros::Publisher *pub, const std::vector< std::string > &joints_all_names, const std::string &robot)
Constructor.
Definition: diagnostics.cpp:23
void setMessageFromStatus(diagnostic_updater::DiagnosticStatusWrapper &status)
set the message based on level
Definition: diagnostics.cpp:80
void setAggregatedMessage(diagnostic_updater::DiagnosticStatusWrapper &status)
set the aggregated message
Definition: diagnostics.cpp:91
virtual ~Diagnostics()
destroys all ros nodehandle and shutsdown all publisher
Definition: diagnostics.hpp:46
std::vector< std::string > joints_all_names_
Definition: diagnostics.hpp:68
std::string getStatusMsg()
return the status message
qi::AnyObject memory_proxy_
Definition: diagnostics.hpp:65
std::vector< float > joints_current_
Definition: diagnostics.hpp:71
std::vector< std::string > keys_tocheck_
Definition: diagnostics.hpp:75
bool publish()
publish the newly received data
Definition: diagnostics.cpp:99
float temperature_error_level_
Definition: diagnostics.hpp:81
diagnostic_updater::DiagnosticStatusWrapper status_
Definition: diagnostics.hpp:84
ros::Publisher * pub_
Definition: diagnostics.hpp:62
float temperature_warn_level_
Definition: diagnostics.hpp:78
This class defines a Diagnostic It is used to check the robot state and sent to requesting nodes...
Definition: diagnostics.hpp:30


naoqi_dcm_driver
Author(s): Konstantinos Chatzilygeroudis , Mikael Arguedas , Karsten Knese , Natalia Lyubova
autogenerated on Thu Jul 25 2019 03:49:27