From d4038c322f6bff22da28d609e05a6d76dae23ee0 Mon Sep 17 00:00:00 2001 From: Balduin Date: Mon, 3 Mar 2025 09:59:56 +0100 Subject: [PATCH 1/9] add moving platform world --- worlds/moving_platform.sdf | 284 +++++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 worlds/moving_platform.sdf diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf new file mode 100644 index 00000000..c5017be0 --- /dev/null +++ b/worlds/moving_platform.sdf @@ -0,0 +1,284 @@ + + + + + 0.004 + 1.0 + 250 + + + + + + + + + + + + ogre2 + + + + + + 3D View + false + docked + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -6 0 6 0 0.5 0 + + 0.25 + 25000 + + + + + + floating + 5 + 5 + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + false + 5 + 5 + floating + false + + + + + World control + 0 + 0 + 72 + 121 + 1 + floating + + + + + + 1 + 1 + 1 + + + + World stats + 0 + 0 + 110 + 290 + 1 + floating + + + + + + 1 + 1 + 1 + 1 + + + + 0 0 -9.8 + 6e-06 2.3e-05 -4.2e-05 + + + false + 0.4 0.4 0.4 1 + 0.7 0.7 0.7 1 + true + + + true + + + + + 0 0 1 + 1 1 + + + + + + + + + + + + + + 0 0 1 + 100 100 + + + + 0.8 0.8 0.8 1 + 0.8 0.8 0.8 1 + 0.8 0.8 0.8 1 + + + 0 0 0 0 -0 0 + + 0 0 0 0 -0 0 + 1 + + 1 + 0 + 0 + 1 + 0 + 1 + + + false + + 0 0 0 0 -0 0 + false + + + + + + + 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 + + + + + 1 + + 1 + 1 + 1 + + + + 1 + 30 + + + + + platform_link + + + + 0 0 500 0 -0 0 + true + 1 + 0.001 0.625 -0.78 + 0.904 0.904 0.904 1 + 0.271 0.271 0.271 1 + + 2000 + 0 + 1 + 0 + + + 0 + 0 + 0 + + + + EARTH_WGS84 + ENU + 47.397971057728974 + 8.546163739800146 + 0 + + + From e54f085c3e9a7095ab6d5eada657c0b54ed81a62 Mon Sep 17 00:00:00 2001 From: Balduin Date: Mon, 3 Mar 2025 14:14:25 +0100 Subject: [PATCH 2/9] moving platform: initial pose floating a bit above the ground to avoid hitting it. --- worlds/moving_platform.sdf | 1 + 1 file changed, 1 insertion(+) diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf index c5017be0..86e1ed6d 100644 --- a/worlds/moving_platform.sdf +++ b/worlds/moving_platform.sdf @@ -234,6 +234,7 @@ + 0 0 2 0 0 0 1 From 04219ed1605373b05f8e3b175082b069e753465a Mon Sep 17 00:00:00 2001 From: Balduin Date: Mon, 3 Mar 2025 14:29:20 +0100 Subject: [PATCH 3/9] moving platform: increase mass & inertia realistic boats don't move too much when a drone lands on it :) --- worlds/moving_platform.sdf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf index 86e1ed6d..10670508 100644 --- a/worlds/moving_platform.sdf +++ b/worlds/moving_platform.sdf @@ -236,11 +236,11 @@ 0 0 2 0 0 0 - 1 + 10000 - 1 - 1 - 1 + 10000 + 10000 + 10000 From 93587c1e72286db42571599f024bf7851d8f4a22 Mon Sep 17 00:00:00 2001 From: Balduin Date: Tue, 4 Mar 2025 15:30:23 +0100 Subject: [PATCH 4/9] wip: platform controller plugin just for developing the plugin. will change to new plugin infrastructure once https://github.com/PX4/PX4-Autopilot/pull/24441 merges. --- worlds/moving_platform.sdf | 1 + 1 file changed, 1 insertion(+) diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf index 10670508..f407f32a 100644 --- a/worlds/moving_platform.sdf +++ b/worlds/moving_platform.sdf @@ -254,6 +254,7 @@ name="gz::sim::systems::VelocityControl"> platform_link + 0 0 500 0 -0 0 From 73cb2ec4723bf3d4494f7de23a97d10621f267f3 Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 7 Mar 2025 10:00:06 +0100 Subject: [PATCH 5/9] remove plugins from sdf as per https://github.com/PX4/PX4-Autopilot/pull/24441/ --- worlds/moving_platform.sdf | 158 +------------------------------------ 1 file changed, 1 insertion(+), 157 deletions(-) diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf index f407f32a..5871d3a5 100644 --- a/worlds/moving_platform.sdf +++ b/worlds/moving_platform.sdf @@ -6,155 +6,6 @@ 1.0 250 - - - - - - - - - - - ogre2 - - - - - - 3D View - false - docked - - ogre2 - scene - 0.4 0.4 0.4 - 0.8 0.8 0.8 - -6 0 6 0 0.5 0 - - 0.25 - 25000 - - - - - - floating - 5 - 5 - false - - - - - false - 5 - 5 - floating - false - - - - - false - 5 - 5 - floating - false - - - - - false - 5 - 5 - floating - false - - - - - false - 5 - 5 - floating - false - - - - - - - - - false - 5 - 5 - floating - false - - - - - false - 5 - 5 - floating - false - - - - - - - - - false - 5 - 5 - floating - false - - - - - World control - 0 - 0 - 72 - 121 - 1 - floating - - - - - - 1 - 1 - 1 - - - - World stats - 0 - 0 - 110 - 290 - 1 - floating - - - - - - 1 - 1 - 1 - 1 - - - 0 0 -9.8 6e-06 2.3e-05 -4.2e-05 @@ -186,7 +37,7 @@ 0 0 1 - 100 100 + 500 500 @@ -248,13 +99,6 @@ 30 - - - platform_link - - 0 0 500 0 -0 0 From db0941b2d9a357bfe955f5702ae88728556bbef7 Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 7 Mar 2025 10:24:57 +0100 Subject: [PATCH 6/9] split world and model --- models/moving_platform/model.config | 4 +++ models/moving_platform/model.sdf | 39 +++++++++++++++++++++++++++++ worlds/moving_platform.sdf | 39 +++-------------------------- 3 files changed, 46 insertions(+), 36 deletions(-) create mode 100644 models/moving_platform/model.config create mode 100644 models/moving_platform/model.sdf diff --git a/models/moving_platform/model.config b/models/moving_platform/model.config new file mode 100644 index 00000000..052b4a10 --- /dev/null +++ b/models/moving_platform/model.config @@ -0,0 +1,4 @@ + + + model.sdf + diff --git a/models/moving_platform/model.sdf b/models/moving_platform/model.sdf new file mode 100644 index 00000000..9494334d --- /dev/null +++ b/models/moving_platform/model.sdf @@ -0,0 +1,39 @@ + + + + + + + + 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 + + + + 0 0 2 0 0 0 + + 10000 + + 10000 + 10000 + 10000 + + + + 1 + 30 + + + + diff --git a/worlds/moving_platform.sdf b/worlds/moving_platform.sdf index 5871d3a5..7ea1ae0d 100644 --- a/worlds/moving_platform.sdf +++ b/worlds/moving_platform.sdf @@ -64,42 +64,9 @@ 0 0 0 0 -0 0 false - - - - - - 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 - - - - 0 0 2 0 0 0 - - 10000 - - 10000 - 10000 - 10000 - - - - 1 - 30 - - - + + model://moving_platform + 0 0 500 0 -0 0 true From c05a84e985e64e21a070934b6b1b01759c81a025 Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 7 Mar 2025 10:38:59 +0100 Subject: [PATCH 7/9] add back velocity plugin --- models/moving_platform/model.sdf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/moving_platform/model.sdf b/models/moving_platform/model.sdf index 9494334d..a48f65f2 100644 --- a/models/moving_platform/model.sdf +++ b/models/moving_platform/model.sdf @@ -35,5 +35,11 @@ 30 + + + platform_link + From 56709f60548b8e406f66c1becf080a6496f4e21e Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 7 Mar 2025 13:20:32 +0100 Subject: [PATCH 8/9] bind plugin to model --- models/moving_platform/model.sdf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/moving_platform/model.sdf b/models/moving_platform/model.sdf index a48f65f2..23142ba4 100644 --- a/models/moving_platform/model.sdf +++ b/models/moving_platform/model.sdf @@ -41,5 +41,9 @@ name="gz::sim::systems::VelocityControl"> platform_link + + From 156e6f6f55da2f2b53c6395af11fc3e9e224448d Mon Sep 17 00:00:00 2001 From: Balduin Date: Fri, 7 Mar 2025 13:36:13 +0100 Subject: [PATCH 9/9] stop binding to specific link --- .gitignore | 1 + models/moving_platform/model.sdf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a75b99e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +sdf_parsing/build/ diff --git a/models/moving_platform/model.sdf b/models/moving_platform/model.sdf index 23142ba4..ea72d543 100644 --- a/models/moving_platform/model.sdf +++ b/models/moving_platform/model.sdf @@ -39,7 +39,6 @@ - platform_link