Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def __init__(self):
'double_array': lambda defined_type, templates: 'std::vector<double>',
'int_array': lambda defined_type, templates: 'std::vector<int64_t>',
'string_array': lambda defined_type, templates: 'std::vector<std::string>',
'double_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
'int_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
'string_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
'double_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
'int_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
'string_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
'string_fixed': lambda defined_type, templates: f'rsl::StaticString<{templates[1]}>',
}
self.yaml_type_to_as_function = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <fmt/ranges.h>

#include <rsl/static_string.hpp>
#include <rsl/static_vector.hpp>
#include <rsl/parameter_validators.hpp>

{% if user_validation_file|length -%}
Expand Down Expand Up @@ -60,8 +59,8 @@ template <size_t capacity>
}

template <typename T, size_t capacity>
[[nodiscard]] auto to_parameter_value(rsl::StaticVector<T, capacity> const& value) {
return rclcpp::ParameterValue(rsl::to_vector(value));
[[nodiscard]] auto to_parameter_value(std::array<T, capacity> const& value) {
return rclcpp::ParameterValue(std::vector<T>{value.begin(), value.end()});
}

{%- filter indent(width=4) %}
Expand Down
Loading