diff --git a/rosidl_generator_c/resource/idl__type_support.c.em b/rosidl_generator_c/resource/idl__type_support.c.em index 77128406b..675076ef8 100644 --- a/rosidl_generator_c/resource/idl__type_support.c.em +++ b/rosidl_generator_c/resource/idl__type_support.c.em @@ -16,16 +16,19 @@ include_parts = [package_name] + list(interface_path.parents[0].parts) + [ 'detail', convert_camel_case_to_lower_case_underscore(interface_path.stem)] include_base = '/'.join(include_parts) -include_directives = { +top_level_includes = [ 'rosidl_typesupport_interface/macros.h', include_base + '__type_support.h', include_base + '__struct.h', - include_base + '__functions.h'} + include_base + '__functions.h'] + +include_directives = set(top_level_includes) + }@ #include -@[for header_file in include_directives]@ +@[for header_file in top_level_includes]@ #include "@(header_file)" @[end for]@