diff --git a/diagnostic_aggregator/src/aggregator.cpp b/diagnostic_aggregator/src/aggregator.cpp index e6823fce4..1000dd422 100644 --- a/diagnostic_aggregator/src/aggregator.cpp +++ b/diagnostic_aggregator/src/aggregator.cpp @@ -278,7 +278,8 @@ void Aggregator::publishData() { diag_array.status.push_back(*processed_other[i]); - const uint depth = static_cast(std::count(processed[i]->name.begin(), processed[i]->name.end(), '/')); + const uint depth = static_cast( + std::count(processed_other[i]->name.begin(), processed_other[i]->name.end(), '/')); if (processed_other[i]->level > diag_toplevel_state.level) { diag_toplevel_state.level = processed_other[i]->level; diff --git a/diagnostic_analysis/scripts/export_csv.py b/diagnostic_analysis/scripts/export_csv.py index d834ba1a5..d05cd9119 100755 --- a/diagnostic_analysis/scripts/export_csv.py +++ b/diagnostic_analysis/scripts/export_csv.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Software License Agreement (BSD License) # diff --git a/diagnostic_analysis/scripts/sparse_csv.py b/diagnostic_analysis/scripts/sparse_csv.py index 0938dbcf5..ff837e935 100755 --- a/diagnostic_analysis/scripts/sparse_csv.py +++ b/diagnostic_analysis/scripts/sparse_csv.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Software License Agreement (BSD License) # diff --git a/diagnostic_analysis/src/diagnostic_analysis/exporter.py b/diagnostic_analysis/src/diagnostic_analysis/exporter.py index e960279d1..c15d8a87d 100644 --- a/diagnostic_analysis/src/diagnostic_analysis/exporter.py +++ b/diagnostic_analysis/src/diagnostic_analysis/exporter.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Software License Agreement (BSD License) # diff --git a/diagnostic_analysis/src/diagnostic_analysis/sparse.py b/diagnostic_analysis/src/diagnostic_analysis/sparse.py index 682ac8491..d5215a3e6 100644 --- a/diagnostic_analysis/src/diagnostic_analysis/sparse.py +++ b/diagnostic_analysis/src/diagnostic_analysis/sparse.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Software License Agreement (BSD License) # diff --git a/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/hd_monitor.py b/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/hd_monitor.py index bb03046d0..26d4db345 100755 --- a/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/hd_monitor.py +++ b/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/hd_monitor.py @@ -64,15 +64,15 @@ def get_hddtemp_data(hostname='localhost', port=7634): try: hd_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) hd_sock.connect((hostname, port)) - sock_data = '' + sock_data = b'' while True: newdat = hd_sock.recv(1024) if len(newdat) == 0: break - sock_data = sock_data + str(newdat) + sock_data = sock_data + newdat hd_sock.close() - sock_vals = sock_data.split('|') + sock_vals = sock_data.decode().split('|') # Format of output looks like ' | DRIVE | MAKE | TEMP | ' idx = 0 diff --git a/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/ntp_monitor.py b/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/ntp_monitor.py index 18dc6a217..486ba39d4 100755 --- a/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/ntp_monitor.py +++ b/diagnostic_common_diagnostics/src/diagnostic_common_diagnostics/ntp_monitor.py @@ -77,8 +77,8 @@ def ntp_diag(st, host, off, error_offset): st.values = [ DIAG.KeyValue("Offset (us)", "N/A"), DIAG.KeyValue("Offset tolerance (us)", str(off)), DIAG.KeyValue("Offset tolerance (us) for Error", str(error_offset)), - DIAG.KeyValue("Output", o), - DIAG.KeyValue("Errors", e) ] + DIAG.KeyValue("Output", o.decode()), + DIAG.KeyValue("Errors", e.decode()) ] return st diff --git a/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h b/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h index fccb8b052..d6acb0213 100644 --- a/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h +++ b/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h @@ -368,8 +368,10 @@ namespace diagnostic_updater /** * \brief Constructs an updater class. * - * \param h Node handle from which to get the diagnostic_period + * \param h Node handle used to publish the diagnostics messages. + * \param ph Node handle from which to get the diagnostic_period * parameter. + * \param node_name Name of the node used in the messages. */ Updater(ros::NodeHandle h = ros::NodeHandle(), ros::NodeHandle ph = ros::NodeHandle("~"), std::string node_name = ros::this_node::getName()) : private_node_handle_(ph), node_handle_(h), node_name_(node_name) { diff --git a/test_diagnostic_aggregator/include/test_diagnostic_aggregator/fail_init_analyzer.h b/test_diagnostic_aggregator/include/test_diagnostic_aggregator/fail_init_analyzer.h index d612bda6f..b785e8017 100644 --- a/test_diagnostic_aggregator/include/test_diagnostic_aggregator/fail_init_analyzer.h +++ b/test_diagnostic_aggregator/include/test_diagnostic_aggregator/fail_init_analyzer.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include namespace test_diagnostic_aggregator { diff --git a/test_diagnostic_aggregator/include/test_diagnostic_aggregator/match_no_analyze_analyzer.h b/test_diagnostic_aggregator/include/test_diagnostic_aggregator/match_no_analyze_analyzer.h index 45e878295..a4ca6942b 100644 --- a/test_diagnostic_aggregator/include/test_diagnostic_aggregator/match_no_analyze_analyzer.h +++ b/test_diagnostic_aggregator/include/test_diagnostic_aggregator/match_no_analyze_analyzer.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include namespace test_diagnostic_aggregator {