From 6f9cbd97510dce4d0bfe715fa77af3b99d282659 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Thu, 4 Dec 2014 16:40:46 +0100 Subject: [PATCH] add genmsg and gencpp python modules, ros not required anymore for message generation --- .gitmodules | 6 ++++++ Makefile | 7 +++++-- Tools/gencpp | 1 + Tools/genmsg | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 160000 Tools/gencpp create mode 160000 Tools/genmsg diff --git a/.gitmodules b/.gitmodules index 4b84afac2a..4996b274bd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "uavcan"] path = uavcan url = git://github.com/pavel-kirienko/uavcan.git +[submodule "Tools/genmsg"] + path = Tools/genmsg + url = https://github.com/ros/genmsg.git +[submodule "Tools/gencpp"] + path = Tools/gencpp + url = https://github.com/ros/gencpp.git diff --git a/Makefile b/Makefile index bdbc18be54..f2e467e5aa 100644 --- a/Makefile +++ b/Makefile @@ -228,12 +228,15 @@ MSG_DIR = $(PX4_BASE)msg/px4_msgs MSG_TEMPLATE_DIR = $(PX4_BASE)msg/templates TOPICS_DIR = $(PX4_BASE)src/modules/uORB/topics TOPICS_TEMPORARY_DIR = $(BUILD_DIR)topics_temporary +GENMSG_PYTHONPATH = $(PX4_BASE)/Tools/genmsg/src +GENCPP_PYTHONPATH = $(PX4_BASE)/Tools/gencpp/src .PHONY: generateuorbtopicheaders generateuorbtopicheaders: @$(ECHO) "Generating uORB topic headers" - $(Q) ($(PX4_BASE)/Tools/px_generate_uorb_topic_headers.py -d $(MSG_DIR) \ - -o $(TOPICS_DIR) -e $(MSG_TEMPLATE_DIR) -t $(TOPICS_TEMPORARY_DIR)) + $(Q) (PYTHONPATH=$(GENMSG_PYTHONPATH):$(GENCPP_PYTHONPATH) $(PYTHON) \ + $(PX4_BASE)Tools/px_generate_uorb_topic_headers.py \ + -d $(MSG_DIR) -o $(TOPICS_DIR) -e $(MSG_TEMPLATE_DIR) -t $(TOPICS_TEMPORARY_DIR)) # clean up temporary files $(Q) (rm -r $(TOPICS_TEMPORARY_DIR)) diff --git a/Tools/gencpp b/Tools/gencpp new file mode 160000 index 0000000000..26a86f04bc --- /dev/null +++ b/Tools/gencpp @@ -0,0 +1 @@ +Subproject commit 26a86f04bcec0018af6652b3ddd3f680e6e3fa2a diff --git a/Tools/genmsg b/Tools/genmsg new file mode 160000 index 0000000000..72f0383f0e --- /dev/null +++ b/Tools/genmsg @@ -0,0 +1 @@ +Subproject commit 72f0383f0e6a489214c51802ae12d6e271b1e454