uorb topics generator: add multi-topics to the list of all topics

topic names with '# TOPICS <name>' were previously not in orb_get_topics().
This means the logger could not find them.

Affects for example actuator_controls_0.
This commit is contained in:
Beat Küng
2016-09-19 13:03:40 +02:00
parent 4e1652fa6b
commit 89a7e0cf87
2 changed files with 13 additions and 5 deletions
+6 -1
View File
@@ -259,7 +259,12 @@ def convert_dir_save(format_idx, inputdir, outputdir, templatedir, temporarydir,
def generate_topics_list_file(msgdir, outputdir, templatedir):
# generate cpp file with topics list
tl_globals = {"msgs" : get_msgs_list(msgdir)}
msgs = get_msgs_list(msgdir)
multi_topics = []
for msg in msgs:
msg_filename = os.path.join(msgdir, msg)
multi_topics.extend(get_multi_topics(msg_filename))
tl_globals = {"msgs" : msgs, "multi_topics": multi_topics}
tl_template_file = os.path.join(templatedir, TOPICS_LIST_TEMPLATE_FILE)
tl_out_file = os.path.join(outputdir, TOPICS_LIST_TEMPLATE_FILE.replace(".template", ""))
generate_by_template(tl_out_file, tl_template_file, tl_globals)