Skip to content

Commit fe583cb

Browse files
authored
Merge branch 'main' into RT1-8205-implement-terminal-lane-change-feature
2 parents 6514c0e + d4ced2a commit fe583cb

File tree

63 files changed

+789
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+789
-276
lines changed

common/autoware_adapi_specs/include/autoware/adapi_specs/vehicle.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct VehicleStatus
4141
using Message = autoware_adapi_v1_msgs::msg::VehicleStatus;
4242
static constexpr char name[] = "/api/vehicle/status";
4343
static constexpr size_t depth = 1;
44-
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
44+
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT;
4545
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
4646
};
4747

common/autoware_universe_utils/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ament_auto_add_library(autoware_universe_utils SHARED
2121
src/geometry/sat_2d.cpp
2222
src/math/sin_table.cpp
2323
src/math/trigonometry.cpp
24+
src/ros/diagnostics_interface.cpp
2425
src/ros/msg_operation.cpp
2526
src/ros/marker_helper.cpp
2627
src/ros/logger_level_configure.cpp

common/autoware_universe_utils/include/autoware/universe_utils/ros/debug_traits.hpp

+62
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
#ifndef AUTOWARE__UNIVERSE_UTILS__ROS__DEBUG_TRAITS_HPP_
1616
#define AUTOWARE__UNIVERSE_UTILS__ROS__DEBUG_TRAITS_HPP_
1717

18+
#include <autoware_internal_debug_msgs/msg/bool_stamped.hpp>
19+
#include <autoware_internal_debug_msgs/msg/float32_multi_array_stamped.hpp>
20+
#include <autoware_internal_debug_msgs/msg/float32_stamped.hpp>
21+
#include <autoware_internal_debug_msgs/msg/float64_multi_array_stamped.hpp>
22+
#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
23+
#include <autoware_internal_debug_msgs/msg/int32_multi_array_stamped.hpp>
24+
#include <autoware_internal_debug_msgs/msg/int32_stamped.hpp>
25+
#include <autoware_internal_debug_msgs/msg/int64_multi_array_stamped.hpp>
26+
#include <autoware_internal_debug_msgs/msg/int64_stamped.hpp>
27+
#include <autoware_internal_debug_msgs/msg/string_stamped.hpp>
1828
#include <tier4_debug_msgs/msg/bool_stamped.hpp>
1929
#include <tier4_debug_msgs/msg/float32_multi_array_stamped.hpp>
2030
#include <tier4_debug_msgs/msg/float32_stamped.hpp>
@@ -84,6 +94,58 @@ template <>
8494
struct is_debug_message<tier4_debug_msgs::msg::StringStamped> : std::true_type
8595
{
8696
};
97+
98+
template <>
99+
struct is_debug_message<autoware_internal_debug_msgs::msg::BoolStamped> : std::true_type
100+
{
101+
};
102+
103+
template <>
104+
struct is_debug_message<autoware_internal_debug_msgs::msg::Float32MultiArrayStamped>
105+
: std::true_type
106+
{
107+
};
108+
109+
template <>
110+
struct is_debug_message<autoware_internal_debug_msgs::msg::Float32Stamped> : std::true_type
111+
{
112+
};
113+
114+
template <>
115+
struct is_debug_message<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>
116+
: std::true_type
117+
{
118+
};
119+
120+
template <>
121+
struct is_debug_message<autoware_internal_debug_msgs::msg::Float64Stamped> : std::true_type
122+
{
123+
};
124+
125+
template <>
126+
struct is_debug_message<autoware_internal_debug_msgs::msg::Int32MultiArrayStamped> : std::true_type
127+
{
128+
};
129+
130+
template <>
131+
struct is_debug_message<autoware_internal_debug_msgs::msg::Int32Stamped> : std::true_type
132+
{
133+
};
134+
135+
template <>
136+
struct is_debug_message<autoware_internal_debug_msgs::msg::Int64MultiArrayStamped> : std::true_type
137+
{
138+
};
139+
140+
template <>
141+
struct is_debug_message<autoware_internal_debug_msgs::msg::Int64Stamped> : std::true_type
142+
{
143+
};
144+
145+
template <>
146+
struct is_debug_message<autoware_internal_debug_msgs::msg::StringStamped> : std::true_type
147+
{
148+
};
87149
} // namespace autoware::universe_utils::debug_traits
88150

89151
#endif // AUTOWARE__UNIVERSE_UTILS__ROS__DEBUG_TRAITS_HPP_

localization/autoware_localization_util/include/autoware/localization_util/diagnostics_module.hpp common/autoware_universe_utils/include/autoware/universe_utils/ros/diagnostics_interface.hpp

+10-13
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef AUTOWARE__LOCALIZATION_UTIL__DIAGNOSTICS_MODULE_HPP_
16-
#define AUTOWARE__LOCALIZATION_UTIL__DIAGNOSTICS_MODULE_HPP_
15+
#ifndef AUTOWARE__UNIVERSE_UTILS__ROS__DIAGNOSTICS_INTERFACE_HPP_
16+
#define AUTOWARE__UNIVERSE_UTILS__ROS__DIAGNOSTICS_INTERFACE_HPP_
1717

1818
#include <rclcpp/rclcpp.hpp>
1919

@@ -22,16 +22,18 @@
2222
#include <string>
2323
#include <vector>
2424

25-
namespace autoware::localization_util
25+
namespace autoware::universe_utils
2626
{
27-
class DiagnosticsModule
27+
class DiagnosticInterface
2828
{
2929
public:
30-
DiagnosticsModule(rclcpp::Node * node, const std::string & diagnostic_name);
30+
DiagnosticInterface(rclcpp::Node * node, const std::string & diagnostic_name);
3131
void clear();
3232
void add_key_value(const diagnostic_msgs::msg::KeyValue & key_value_msg);
3333
template <typename T>
3434
void add_key_value(const std::string & key, const T & value);
35+
void add_key_value(const std::string & key, const std::string & value);
36+
void add_key_value(const std::string & key, bool value);
3537
void update_level_and_message(const int8_t level, const std::string & message);
3638
void publish(const rclcpp::Time & publish_time_stamp);
3739

@@ -46,19 +48,14 @@ class DiagnosticsModule
4648
};
4749

4850
template <typename T>
49-
void DiagnosticsModule::add_key_value(const std::string & key, const T & value)
51+
void DiagnosticInterface::add_key_value(const std::string & key, const T & value)
5052
{
5153
diagnostic_msgs::msg::KeyValue key_value;
5254
key_value.key = key;
5355
key_value.value = std::to_string(value);
5456
add_key_value(key_value);
5557
}
5658

57-
template <>
58-
void DiagnosticsModule::add_key_value(const std::string & key, const std::string & value);
59-
template <>
60-
void DiagnosticsModule::add_key_value(const std::string & key, const bool & value);
59+
} // namespace autoware::universe_utils
6160

62-
} // namespace autoware::localization_util
63-
64-
#endif // AUTOWARE__LOCALIZATION_UTIL__DIAGNOSTICS_MODULE_HPP_
61+
#endif // AUTOWARE__UNIVERSE_UTILS__ROS__DIAGNOSTICS_INTERFACE_HPP_

common/autoware_universe_utils/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<buildtool_depend>ament_cmake_auto</buildtool_depend>
1313
<buildtool_depend>autoware_cmake</buildtool_depend>
1414

15+
<depend>autoware_internal_debug_msgs</depend>
1516
<depend>autoware_internal_msgs</depend>
1617
<depend>autoware_perception_msgs</depend>
1718
<depend>autoware_planning_msgs</depend>

localization/autoware_localization_util/src/diagnostics_module.cpp common/autoware_universe_utils/src/ros/diagnostics_interface.cpp

+11-13
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "autoware/localization_util/diagnostics_module.hpp"
15+
#include "autoware/universe_utils/ros/diagnostics_interface.hpp"
1616

1717
#include <rclcpp/rclcpp.hpp>
1818

@@ -21,9 +21,9 @@
2121
#include <algorithm>
2222
#include <string>
2323

24-
namespace autoware::localization_util
24+
namespace autoware::universe_utils
2525
{
26-
DiagnosticsModule::DiagnosticsModule(rclcpp::Node * node, const std::string & diagnostic_name)
26+
DiagnosticInterface::DiagnosticInterface(rclcpp::Node * node, const std::string & diagnostic_name)
2727
: clock_(node->get_clock())
2828
{
2929
diagnostics_pub_ =
@@ -34,7 +34,7 @@ DiagnosticsModule::DiagnosticsModule(rclcpp::Node * node, const std::string & di
3434
diagnostics_status_msg_.hardware_id = node->get_name();
3535
}
3636

37-
void DiagnosticsModule::clear()
37+
void DiagnosticInterface::clear()
3838
{
3939
diagnostics_status_msg_.values.clear();
4040
diagnostics_status_msg_.values.shrink_to_fit();
@@ -43,7 +43,7 @@ void DiagnosticsModule::clear()
4343
diagnostics_status_msg_.message = "";
4444
}
4545

46-
void DiagnosticsModule::add_key_value(const diagnostic_msgs::msg::KeyValue & key_value_msg)
46+
void DiagnosticInterface::add_key_value(const diagnostic_msgs::msg::KeyValue & key_value_msg)
4747
{
4848
auto it = std::find_if(
4949
std::begin(diagnostics_status_msg_.values), std::end(diagnostics_status_msg_.values),
@@ -56,25 +56,23 @@ void DiagnosticsModule::add_key_value(const diagnostic_msgs::msg::KeyValue & key
5656
}
5757
}
5858

59-
template <>
60-
void DiagnosticsModule::add_key_value(const std::string & key, const std::string & value)
59+
void DiagnosticInterface::add_key_value(const std::string & key, const std::string & value)
6160
{
6261
diagnostic_msgs::msg::KeyValue key_value;
6362
key_value.key = key;
6463
key_value.value = value;
6564
add_key_value(key_value);
6665
}
6766

68-
template <>
69-
void DiagnosticsModule::add_key_value(const std::string & key, const bool & value)
67+
void DiagnosticInterface::add_key_value(const std::string & key, bool value)
7068
{
7169
diagnostic_msgs::msg::KeyValue key_value;
7270
key_value.key = key;
7371
key_value.value = value ? "True" : "False";
7472
add_key_value(key_value);
7573
}
7674

77-
void DiagnosticsModule::update_level_and_message(const int8_t level, const std::string & message)
75+
void DiagnosticInterface::update_level_and_message(const int8_t level, const std::string & message)
7876
{
7977
if ((level > diagnostic_msgs::msg::DiagnosticStatus::OK)) {
8078
if (!diagnostics_status_msg_.message.empty()) {
@@ -87,12 +85,12 @@ void DiagnosticsModule::update_level_and_message(const int8_t level, const std::
8785
}
8886
}
8987

90-
void DiagnosticsModule::publish(const rclcpp::Time & publish_time_stamp)
88+
void DiagnosticInterface::publish(const rclcpp::Time & publish_time_stamp)
9189
{
9290
diagnostics_pub_->publish(create_diagnostics_array(publish_time_stamp));
9391
}
9492

95-
diagnostic_msgs::msg::DiagnosticArray DiagnosticsModule::create_diagnostics_array(
93+
diagnostic_msgs::msg::DiagnosticArray DiagnosticInterface::create_diagnostics_array(
9694
const rclcpp::Time & publish_time_stamp) const
9795
{
9896
diagnostic_msgs::msg::DiagnosticArray diagnostics_msg;
@@ -105,4 +103,4 @@ diagnostic_msgs::msg::DiagnosticArray DiagnosticsModule::create_diagnostics_arra
105103

106104
return diagnostics_msg;
107105
}
108-
} // namespace autoware::localization_util
106+
} // namespace autoware::universe_utils

0 commit comments

Comments
 (0)