Closed
Description
While trying out the map feature of generate_parameter_library
, I encountered a compilation error with nested maps. A minimal example is the following:
queries_list: {
type: string_array,
}
queries:
__map_queries_list:
arguments: {
type: string_array,
}
__map_arguments:
command: {
type: string,
}
The output looks like that:
In member function ‘void foo::ParamListener::refresh_dynamic_parameters()’:
error: ‘struct foo::Params’ has no member named ‘arguments’
153 | for (const auto & value : updated_params.arguments){
| ^~~~~~~~~
error: ‘struct foo::Params::Queries’ has no member named ‘__map_queries_list’; did you mean ‘MapQueriesList’?
154 | auto& entry = updated_params.queries.__map_queries_list.arguments_map[value];
| ^~~~~~~~~~~~~~~~~~
| MapQueriesList
In member function ‘rcl_interfaces::msg::SetParametersResult foo::ParamListener::update(const std::vector<rclcpp::Parameter>&)’:
error: ‘struct foo::Params’ has no member named ‘arguments’
187 | for (const auto & value : updated_params.arguments){
| ^~~~~~~~~
error: ‘struct foo::Params::Queries’ has no member named ‘__map_queries_list’; did you mean ‘MapQueriesList’?
190 | updated_params.queries.__map_queries_list.arguments_map[value].command = param.as_string();
| ^~~~~~~~~~~~~~~~~~
| MapQueriesList
In member function ‘void foo::ParamListener::declare_params()’:
error: ‘struct foo::Params’ has no member named ‘arguments’
231 | for (const auto & value : updated_params.arguments){
| ^~~~~~~~~
error: ‘struct foo::Params::Queries’ has no member named ‘__map_queries_list’; did you mean ‘MapQueriesList’?
232 | auto& entry = updated_params.queries.__map_queries_list.arguments_map[value];
| ^~~~~~~~~~~~~~~~~~
| MapQueriesList
Are nested maps not supported or am I doing something wrong?