From 10b2321e8769943b7536979e6e76d6c0d49fdf27 Mon Sep 17 00:00:00 2001 From: Balduin Date: Thu, 27 Feb 2025 17:20:29 +0100 Subject: [PATCH] toggle platform with environment var --- src/modules/simulation/gz_bridge/GZBridge.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/simulation/gz_bridge/GZBridge.cpp b/src/modules/simulation/gz_bridge/GZBridge.cpp index 29e0079052..ee9ea1ac1a 100644 --- a/src/modules/simulation/gz_bridge/GZBridge.cpp +++ b/src/modules/simulation/gz_bridge/GZBridge.cpp @@ -68,8 +68,9 @@ GZBridge::~GZBridge() int GZBridge::init() { - // TODO make configurable in sensible way. - bool platform = true; + // TODO document this somehow + char *moving_platform = std::getenv("GZ_MOVING_PLATFORM"); + bool platform = ((moving_platform != nullptr) && (std::strcmp(moving_platform, "1") == 0)); if (!_model_sim.empty()) {