From 4df9b5907bef61270ed2af03c81d2c72699341ee Mon Sep 17 00:00:00 2001 From: Christophe De Wagter Date: Tue, 17 Feb 2026 15:49:13 +0100 Subject: [PATCH] [tools] Add UnifiedMocapRouter (#3598) * Replace NatNet with UnifiedMocapRouter * Safeguard + install * Remove warning in make clean * Subproject update: readme about smaller install and make clean --- .gitmodules | 3 +++ Makefile | 5 +++- conf/tools/unifiedmocaprouter.xml | 11 +++++++++ .../userconf/tudelft/course_control_panel.xml | 11 +++++++++ select_conf.py | 1 - sw/ext/Makefile | 23 +++++++++++++++++-- sw/ext/unifiedmocaprouter | 1 + sw/tools/vectornav_configurator/Makefile | 2 +- 8 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 conf/tools/unifiedmocaprouter.xml delete mode 120000 select_conf.py create mode 160000 sw/ext/unifiedmocaprouter diff --git a/.gitmodules b/.gitmodules index 2d95e748ad..da46843758 100644 --- a/.gitmodules +++ b/.gitmodules @@ -56,3 +56,6 @@ [submodule "sw/ext/dronecan/libcanard"] path = sw/ext/dronecan/libcanard url = https://github.com/dronecan/libcanard.git +[submodule "sw/ext/unifiedmocaprouter"] + path = sw/ext/unifiedmocaprouter + url = https://github.com/tudelft/UnifiedMocapRouter.git diff --git a/Makefile b/Makefile index ee33e1c831..dbc3ada257 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,9 @@ ext: opencv_bebop: $(MAKE) -C $(EXT) opencv_bebop +mocap: + $(MAKE) -C $(EXT) unifiedmocaprouter + # # make misc subdirs # @@ -346,6 +349,6 @@ test_full: .PHONY: all print_build_version _print_building _save_build_version init dox ground_segment ground_segment.opt \ subdirs $(SUBDIRS) conf ext libpprz libpprzlink.update libpprzlink.install tmtc tmtc.opt generators\ -static sim_static opencv_bebop\ +static sim_static opencv_bebop mocap \ clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \ test test_examples test_math test_all_confs diff --git a/conf/tools/unifiedmocaprouter.xml b/conf/tools/unifiedmocaprouter.xml new file mode 100644 index 0000000000..68c883f79d --- /dev/null +++ b/conf/tools/unifiedmocaprouter.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/conf/userconf/tudelft/course_control_panel.xml b/conf/userconf/tudelft/course_control_panel.xml index a96c41fb4b..f7d1c2ad32 100644 --- a/conf/userconf/tudelft/course_control_panel.xml +++ b/conf/userconf/tudelft/course_control_panel.xml @@ -1,5 +1,6 @@
+
@@ -40,6 +41,16 @@ + + + + + + + + + + diff --git a/select_conf.py b/select_conf.py deleted file mode 120000 index 8d8681843e..0000000000 --- a/select_conf.py +++ /dev/null @@ -1 +0,0 @@ -start.py \ No newline at end of file diff --git a/sw/ext/Makefile b/sw/ext/Makefile index ab2ea81dfc..f88a3547ed 100644 --- a/sw/ext/Makefile +++ b/sw/ext/Makefile @@ -35,8 +35,10 @@ include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain MY_PYTHON := $(shell echo `which python3`) MY_MAVLINKTOOLS := $(shell $(MY_PYTHON) -c 'import imp; import future' 2>&1) MY_DRONECANTOOLS := $(shell $(MY_PYTHON) -c 'import em' 2>&1) +BOOST_INSTALLED := $(shell dpkg -s libboost-program-options-dev >/dev/null 2>&1 && echo yes) +CMAKE_INSTALLED := $(shell command -v cmake 2>/dev/null) -all: chibios fatfs libsbp TRICAL hacl-c key_generator rustlink ecl matrix mavlink dronecan +all: chibios fatfs libsbp TRICAL hacl-c key_generator rustlink ecl matrix mavlink dronecan unifiedmocaprouter # update (and init if needed) all submodules update_submodules: @@ -102,6 +104,23 @@ else @echo dronecan not installed, missing package 'em' endif +unifiedmocaprouter: unifiedmocaprouter.update unifiedmocaprouter.build + +unifiedmocaprouter.build: +ifeq ($(BOOST_INSTALLED),yes) +ifeq ($(CMAKE_INSTALLED),) + @echo "cmake is not installed. Please install cmake to build unifiedmocaprouter." +else + cd $(EXT_DIR)/unifiedmocaprouter/ && \ + mkdir -p build && \ + cd build && \ + cmake -D'MOCAPS=optitrack' -D'AGENTS=console;ivy' .. && \ + make +endif +else + @echo "libboost-program-options-dev is not installed. Please install it to build unifiedmocaprouter." +endif + clean: @@ -114,4 +133,4 @@ clean_opencv_bebop: .PHONY: all clean update_submodules \ chibios fatfs \ mavlink.build libsbp pprzlink pprzlink.build opencv_bebop \ - opencv_bebop.build clean_opencv_bebop TRICAL dronecan + opencv_bebop.build clean_opencv_bebop unifiedmocaprouter TRICAL dronecan diff --git a/sw/ext/unifiedmocaprouter b/sw/ext/unifiedmocaprouter new file mode 160000 index 0000000000..635364b440 --- /dev/null +++ b/sw/ext/unifiedmocaprouter @@ -0,0 +1 @@ +Subproject commit 635364b440f7131f0e60fa5db5271a518493b637 diff --git a/sw/tools/vectornav_configurator/Makefile b/sw/tools/vectornav_configurator/Makefile index 489814bb6f..96fea71444 100644 --- a/sw/tools/vectornav_configurator/Makefile +++ b/sw/tools/vectornav_configurator/Makefile @@ -1,4 +1,4 @@ all: g++ VectorNavSetup_console.cpp -o vn_console_setup clean: - rm vn_console_setup + rm -f vn_console_setup