From a4894bde078ee0931bc23c7a19128d16a0d081d2 Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 28 Feb 2025 09:10:36 +0100 Subject: [PATCH] move platform sdf into string rather than untracked sdf file in gz submodule. --- src/modules/simulation/gz_bridge/GZBridge.cpp | 60 ++++++++++++++++++- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/src/modules/simulation/gz_bridge/GZBridge.cpp b/src/modules/simulation/gz_bridge/GZBridge.cpp index ee9ea1ac1a..9190f9047f 100644 --- a/src/modules/simulation/gz_bridge/GZBridge.cpp +++ b/src/modules/simulation/gz_bridge/GZBridge.cpp @@ -315,11 +315,65 @@ bool GZBridge::createMovingPlatform() // moving platform to launch & land from. gz::msgs::EntityFactory req{}; - // base dir: Tools/simulation/gz/models - req.set_sdf_filename("platform.sdf"); - // can also set sdf string directly using req.set_sdf // https://gazebosim.org/api/gazebo/6/entity_creation.html + // This just as a first hacky quick solution. + // Surely there is a good place for such a file without putting it in the gz repo? + + std::string platform_sdf = R""""( + + + + + + + + + + 5 5 0.1 + + + + 0.3 0.3 0.3 1 + 0.3 0.3 0.3 1 + 0.1 0.1 0.1 1 + + + + + + + + 5 5 0.1 + shit + + + + + + 1 + + 1 + 1 + 1 + + + + + + 1 + 30 + + + + + )""""; + + req.set_sdf(platform_sdf); + + // base dir: Tools/simulation/gz/models + // req.set_sdf_filename("platform.sdf"); + // req.set_name("platform"); req.set_allow_renaming(false);