From ec2b47ba5950ad106ccb693d00b588caa5ddd8c0 Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 15 Nov 2023 17:41:01 -0700 Subject: [PATCH] Tools: ros2: Enable networking when needed * DDS was built without networking so UDP stopped working * Networking is automatically added when you want network tests * --enable-networking should only be on sitl Signed-off-by: Ryan Friedman --- Tools/autotest/sim_vehicle.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/sim_vehicle.py b/Tools/autotest/sim_vehicle.py index 42424488cf..0c849f6405 100755 --- a/Tools/autotest/sim_vehicle.py +++ b/Tools/autotest/sim_vehicle.py @@ -410,12 +410,16 @@ def do_build(opts, frame_options): if opts.enable_dds: cmd_configure.append("--enable-dds") + if configure_target == 'sitl' and "--enable-networking" not in cmd_configure: + cmd_configure.append("--enable-networking") - if opts.enable_networking: + if opts.enable_networking and configure_target == 'sitl': cmd_configure.append("--enable-networking") if opts.enable_networking_tests: cmd_configure.append("--enable-networking-tests") + if "--enable-networking" not in cmd_configure: + cmd_configure.append("--enable-networking") pieces = [shlex.split(x) for x in opts.waf_configure_args] for piece in pieces: