Skip to content

KTH Space Lab world: reintroduction with server.config plugin fix#33

Merged
Pedro-Roque merged 2 commits intomainfrom
dev-kth_space_lab_world_fixed
Jul 16, 2025
Merged

KTH Space Lab world: reintroduction with server.config plugin fix#33
Pedro-Roque merged 2 commits intomainfrom
dev-kth_space_lab_world_fixed

Conversation

@E-Krantz
Copy link
Copy Markdown

This PR reintroduces the KTH Space Lab world and the submodule update from #30, along with the plugin configuration fix from #31.

PR #30 was originally merged and later reverted.

Included:

  • Updates px4-gazebo-models to include kthspacelab.sdf
  • Adds kthspacelab.sdf to the CMake build
  • Adds server.config with Gazebo system plugin definitions
  • Updates gz_env.sh.in to use GZ_SIM_SERVER_CONFIG_PATH for plugin loading

These changes restore the original feature and fix, keeping us consistent with upstream PX4-Autopilot.

Note:
After pulling, run

make px4_sitl

once to update gz_env.sh in build/.


If approved, #30 and #31 will be closed.

@Pedro-Roque
Copy link
Copy Markdown
Member

@E-Krantz this works for me now. There's however something that should be fixed: when one runs the kthspacelab, ATMOS starts with movement because I believe it is set to start at 0, but that's over the fence. The platform should be deployed a little forward to avoid this, can you add that option?

@E-Krantz
Copy link
Copy Markdown
Author

@Pedro-Roque The starting pose can not be set by kthspacelab.sdf. We can add:

PX4_GZ_MODEL_POSE=${PX4_GZ_MODEL_POSE:="1 0 0.1 0 0 0"}

to the airframe file 71002_gz_spacecraft_2d. In that case, spacecraft_2d will spawn at (1, 0, 0.1) by default in all worlds. I think this is the best option.

Alternatively, we can ask the user to set the pose at launch with:

make px4_sitl gz_spacecraft_2d_kthspacelab PX4_GZ_MODEL_POSE='1,0,0.1'

or by using discower_launch.

What do you think?

If we go with the first option, the user can still set other poses with discower_launch and

make px4_sitl gz_spacecraft_2d_kthspacelab PX4_GZ_MODEL_POSE='[some pose]'

@Pedro-Roque
Copy link
Copy Markdown
Member

I think we can add to discower_launch, and also add to PX4 docs.

In fact, we should start preparing the PX4 docs for spacecraft, as there's quite a few things to add :)

@E-Krantz
Copy link
Copy Markdown
Author

So not adding a default pose, i.e., this line

PX4_GZ_MODEL_POSE=${PX4_GZ_MODEL_POSE:="1 0 0.1 0 0 0"}

to 71002_gz_spacecraft_2d?

In a PR on discower_launch it has already been added. See discower_launch#1.

@Pedro-Roque
Copy link
Copy Markdown
Member

Exactly, not adding the default pose.

@E-Krantz
Copy link
Copy Markdown
Author

@Pedro-Roque Can this be merged? discower_launch has already been updated with setting the pose for kthspacelab

@Pedro-Roque Pedro-Roque merged commit 081487c into main Jul 16, 2025
@Pedro-Roque
Copy link
Copy Markdown
Member

@E-Krantz done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants