From 2e9a4d89ee5236b95198320d58a0baa8811e26ab Mon Sep 17 00:00:00 2001 From: TSC21 Date: Fri, 22 Nov 2019 16:15:29 +0000 Subject: [PATCH] msg: remove gencpp and genmsh submodules; remove gencpp imports --- .gitmodules | 8 -------- msg/CMakeLists.txt | 3 --- msg/templates/px4/ros/msg.h.em | 2 +- msg/templates/px4/uorb/msg.h.em | 2 +- msg/templates/uorb/msg.cpp.em | 2 +- msg/templates/uorb/msg.h.em | 2 +- msg/templates/uorb_microcdr/microRTPS_client.cpp.em | 2 +- msg/templates/uorb_microcdr/msg.cpp.em | 2 +- msg/templates/uorb_microcdr/msg.h.em | 2 +- msg/templates/urtps/Publisher.cpp.em | 2 +- msg/templates/urtps/Publisher.h.em | 2 +- msg/templates/urtps/RtpsTopics.cpp.em | 2 +- msg/templates/urtps/RtpsTopics.h.em | 2 +- msg/templates/urtps/Subscriber.cpp.em | 2 +- msg/templates/urtps/Subscriber.h.em | 2 +- msg/templates/urtps/microRTPS_agent.cpp.em | 2 +- msg/templates/urtps/msg.idl.em | 2 +- msg/tools/gencpp | 1 - msg/tools/genmsg | 1 - msg/tools/px_generate_uorb_topic_files.py | 5 ----- msg/tools/px_generate_uorb_topic_helper.py | 2 +- 21 files changed, 16 insertions(+), 34 deletions(-) delete mode 160000 msg/tools/gencpp delete mode 160000 msg/tools/genmsg diff --git a/.gitmodules b/.gitmodules index 5b5649a57c..b0332ce195 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,14 +6,6 @@ path = src/drivers/uavcan/libuavcan url = https://github.com/PX4/uavcan.git branch = px4 -[submodule "msg/tools/genmsg"] - path = msg/tools/genmsg - url = https://github.com/PX4/genmsg.git - branch = px4 -[submodule "msg/tools/gencpp"] - path = msg/tools/gencpp - url = https://github.com/PX4/gencpp.git - branch = px4 [submodule "Tools/jMAVSim"] path = Tools/jMAVSim url = https://github.com/PX4/jMAVSim.git diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index db1d15b54f..51b861a2c2 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -193,9 +193,6 @@ if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "") endif() endif() -px4_add_git_submodule(TARGET git_gencpp PATH tools/gencpp) -px4_add_git_submodule(TARGET git_genmsg PATH tools/genmsg) - # headers set(msg_out_path ${PX4_BINARY_DIR}/uORB/topics) set(msg_source_out_path ${CMAKE_CURRENT_BINARY_DIR}/topics_sources) diff --git a/msg/templates/px4/ros/msg.h.em b/msg/templates/px4/ros/msg.h.em index d10825eec9..3264bbaede 100644 --- a/msg/templates/px4/ros/msg.h.em +++ b/msg/templates/px4/ros/msg.h.em @@ -54,7 +54,7 @@ @{ import genmsg.msgs -import gencpp + cpp_class = 'px4_%s'%spec.short_name native_type = spec.short_name diff --git a/msg/templates/px4/uorb/msg.h.em b/msg/templates/px4/uorb/msg.h.em index 61959861dc..4b848ce361 100644 --- a/msg/templates/px4/uorb/msg.h.em +++ b/msg/templates/px4/uorb/msg.h.em @@ -54,7 +54,7 @@ @{ import genmsg.msgs -import gencpp + native_type = '%s_s'%spec.short_name topic_name = spec.short_name diff --git a/msg/templates/uorb/msg.cpp.em b/msg/templates/uorb/msg.cpp.em index 623515453d..aed55170f8 100644 --- a/msg/templates/uorb/msg.cpp.em +++ b/msg/templates/uorb/msg.cpp.em @@ -55,7 +55,7 @@ @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ uorb_struct = '%s_s'%spec.short_name diff --git a/msg/templates/uorb/msg.h.em b/msg/templates/uorb/msg.h.em index e10f570841..0180ebcf0d 100644 --- a/msg/templates/uorb/msg.h.em +++ b/msg/templates/uorb/msg.h.em @@ -54,7 +54,7 @@ @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ uorb_struct = '%s_s'%spec.short_name diff --git a/msg/templates/uorb_microcdr/microRTPS_client.cpp.em b/msg/templates/uorb_microcdr/microRTPS_client.cpp.em index 3604267b83..e7c4cb2ffd 100644 --- a/msg/templates/uorb_microcdr/microRTPS_client.cpp.em +++ b/msg/templates/uorb_microcdr/microRTPS_client.cpp.em @@ -14,7 +14,7 @@ import os import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ from px_generate_uorb_topic_files import MsgScope # this is in Tools/ diff --git a/msg/templates/uorb_microcdr/msg.cpp.em b/msg/templates/uorb_microcdr/msg.cpp.em index 90111b9d0f..ea7251c47b 100644 --- a/msg/templates/uorb_microcdr/msg.cpp.em +++ b/msg/templates/uorb_microcdr/msg.cpp.em @@ -54,7 +54,7 @@ @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ uorb_struct = '%s_s'%spec.short_name diff --git a/msg/templates/uorb_microcdr/msg.h.em b/msg/templates/uorb_microcdr/msg.h.em index eb3bbd9664..ce49dd1356 100644 --- a/msg/templates/uorb_microcdr/msg.h.em +++ b/msg/templates/uorb_microcdr/msg.h.em @@ -54,7 +54,7 @@ @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ uorb_struct = '%s_s'%spec.short_name diff --git a/msg/templates/urtps/Publisher.cpp.em b/msg/templates/urtps/Publisher.cpp.em index 2b171e53f6..2ea110d960 100644 --- a/msg/templates/urtps/Publisher.cpp.em +++ b/msg/templates/urtps/Publisher.cpp.em @@ -12,7 +12,7 @@ @############################################### @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ topic = alias if alias else spec.short_name diff --git a/msg/templates/urtps/Publisher.h.em b/msg/templates/urtps/Publisher.h.em index b5aa12a37c..639189736e 100644 --- a/msg/templates/urtps/Publisher.h.em +++ b/msg/templates/urtps/Publisher.h.em @@ -12,7 +12,7 @@ @############################################### @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ topic = alias if alias else spec.short_name diff --git a/msg/templates/urtps/RtpsTopics.cpp.em b/msg/templates/urtps/RtpsTopics.cpp.em index c0a6415d60..ce6c961a01 100644 --- a/msg/templates/urtps/RtpsTopics.cpp.em +++ b/msg/templates/urtps/RtpsTopics.cpp.em @@ -13,7 +13,7 @@ import os import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ from px_generate_uorb_topic_files import MsgScope # this is in Tools/ diff --git a/msg/templates/urtps/RtpsTopics.h.em b/msg/templates/urtps/RtpsTopics.h.em index f9cf940b35..daa3cf709c 100644 --- a/msg/templates/urtps/RtpsTopics.h.em +++ b/msg/templates/urtps/RtpsTopics.h.em @@ -13,7 +13,7 @@ import os import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ from px_generate_uorb_topic_files import MsgScope # this is in Tools/ diff --git a/msg/templates/urtps/Subscriber.cpp.em b/msg/templates/urtps/Subscriber.cpp.em index 54b6080f1e..2dc127f728 100644 --- a/msg/templates/urtps/Subscriber.cpp.em +++ b/msg/templates/urtps/Subscriber.cpp.em @@ -12,7 +12,7 @@ @############################################### @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ topic = alias if alias else spec.short_name diff --git a/msg/templates/urtps/Subscriber.h.em b/msg/templates/urtps/Subscriber.h.em index dba740e100..655c25c7c6 100644 --- a/msg/templates/urtps/Subscriber.h.em +++ b/msg/templates/urtps/Subscriber.h.em @@ -12,7 +12,7 @@ @############################################### @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ topic = alias if alias else spec.short_name diff --git a/msg/templates/urtps/microRTPS_agent.cpp.em b/msg/templates/urtps/microRTPS_agent.cpp.em index ac0e84e0ab..48a2189668 100644 --- a/msg/templates/urtps/microRTPS_agent.cpp.em +++ b/msg/templates/urtps/microRTPS_agent.cpp.em @@ -12,7 +12,7 @@ @############################################### @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ from px_generate_uorb_topic_files import MsgScope # this is in Tools/ diff --git a/msg/templates/urtps/msg.idl.em b/msg/templates/urtps/msg.idl.em index 04d0e3c5dd..9245a247e4 100644 --- a/msg/templates/urtps/msg.idl.em +++ b/msg/templates/urtps/msg.idl.em @@ -38,7 +38,7 @@ @################################################################################ @{ import genmsg.msgs -import gencpp + from px_generate_uorb_topic_helper import * # this is in Tools/ builtin_types = set() diff --git a/msg/tools/gencpp b/msg/tools/gencpp deleted file mode 160000 index ff6c9f3e8e..0000000000 --- a/msg/tools/gencpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff6c9f3e8ee0a63be994e0b7dfc7a36cb0c1d8c7 diff --git a/msg/tools/genmsg b/msg/tools/genmsg deleted file mode 160000 index 1ad8e136cd..0000000000 --- a/msg/tools/genmsg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1ad8e136cd6311c6af12256fc39362334ca23988 diff --git a/msg/tools/px_generate_uorb_topic_files.py b/msg/tools/px_generate_uorb_topic_files.py index aba2ab2155..02c076bcce 100755 --- a/msg/tools/px_generate_uorb_topic_files.py +++ b/msg/tools/px_generate_uorb_topic_files.py @@ -45,11 +45,6 @@ import argparse import sys import errno -px4_tools_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(px4_tools_dir + "/genmsg/src") -sys.path.append(px4_tools_dir + "/gencpp/src") -px4_msg_dir = os.path.join(px4_tools_dir, "..") - try: import em import genmsg.template_tools diff --git a/msg/tools/px_generate_uorb_topic_helper.py b/msg/tools/px_generate_uorb_topic_helper.py index 5a366a74aa..c35cd86f4e 100644 --- a/msg/tools/px_generate_uorb_topic_helper.py +++ b/msg/tools/px_generate_uorb_topic_helper.py @@ -43,7 +43,7 @@ import os import errno import genmsg.msgs -import gencpp + type_map = { 'int8': 'int8_t',