Skip to content

STU Lunar SAR Competitor Setup & Learning

Connor Jakubik edited this page Oct 26, 2024 · 33 revisions

Up to date for Platform 0.27.3 and STU Lunar SAR 1.0.1

Written by Fernando Arias and Connor Jakubik


Rules & Info Setup & Learning (Here) STU API Docs Q&A Discussions Category

Changelog:

  • 2024/10/25 Changed how we refer to API Docs page, where there are some critical steps to do before running the task sims.
  • 2024/10/21 Newly created

Link back to STU 2024 Lunar SAR Rules & Info: https://github.com/SimDynamX/SpaceTeamsPro/discussions/33

Competitors are required to do Lessons 1-3 and 7-10, as well as the Git Setup and Task 1 file modifications to be ready to start the competition.

STU Lunar SAR Lesson Overview

The lessons on this page are logically sequenced to give you a general understanding of how to use the Space Teams PRO platform. For general use of Space Teams PRO, it is recommended to watch them in order. However, for the Lunar SAR Design Challenge, you can get started more quickly if you skip the ones marked (OPTIONAL). For the complete library of Space Teams PRO training, see the full documentation here: https://github.com/SimDynamX/SpaceTeamsPro/wiki.

Getting Started Document - Everything you need to guide you through the startup process

Competition-Specific Learning

** Lesson 1: Space Teams Setup **

In this lesson, you will learn how to set up Space Teams PRO.

Tutorial Video:

https://youtu.be/YuNOEanW6l0

Related Documentation

  1. Installation Setup
  2. Starting your First Sim
  3. Space Teams Pro Wiki - Installing Space Teams
  4. How To Start a Sim

Lesson 2: The Space Teams User Interface

This lessons explains the Space Teams PRO application user interface. Learn how to set up the initial conditions of a simulation including selection of location and assets, placement, initial conditions, and choice of built-in models.

Tutorial Video:

Coming Soon

Related Documentation

  1. Starting your First Sim

Lesson 3: Simulation Configuration

This lesson explains the format and content of the Space Teams SimConfig file, which fully describes a mission scenario that you can create anywhere in the solar system and involving any asset, and models of entity behavior or the environment. NOTE: The competition only involves a limited amount of Sim Config editing, as the users are only allowed to change out which System Source files are used for the Mission Manager and Entity Behavior systems.

Tutorial Video:

https://www.youtube.com/watch?v=HVizBCWP7U8&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=2

Code Examples

https://drive.google.com/file/d/1v8InF2F_aSa6oEFYGgNVITD0ZYGbpFMJ/view?usp=sharing

Related Documentation

  1. Sim Structure
  2. The Parameter
  3. The Sim Config

Lesson 4: Satellite Orbiter (OPTIONAL)

This lesson demonstrates the example of setting up a spacecraft in orbit around a planetary body. NOTE: The competition does not rely on any orbital sim elements.

Tutorial Video:

https://www.youtube.com/watch?v=Z-sUqkTrO-Y&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=4

Code Examples

https://drive.google.com/file/d/182rRVFEPo-Wq1-pe29zJ2GL7GQLAIpLZ/view?usp=sharing

Lesson 5: Model Import (OPTIONAL)

This lesson explains how any CAD models created external to Space Teams can be imported and used within simulations. NOTE: The competition does not require user customized use of Model Import.

Tutorial Video:

https://www.youtube.com/watch?v=_3P4UlP1OhY&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=5

Code Examples

https://drive.google.com/file/d/1rD2aIb-Ie0iYvzn2JSvl22nbRlv1sKf_/view?usp=sharing

Lesson 6: Pawns (OPTIONAL)

Pawns are entities for users to control their own movement within a simulation, which could be as a spectator or one of the entities. For example, walking on a planetary surface, or flying through the solar system, utilize different pawns. NOTE: The competition starter code sims already have all the pawns they need; the Spectator pawn allows the user to fly around the mission area and see operations happening in real time.

Tutorial Video:

https://www.youtube.com/watch?v=pSupeGar1U8&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=6

Code Examples

https://drive.google.com/file/d/1v8InF2F_aSa6oEFYGgNVITD0ZYGbpFMJ/view?usp=sharing https://drive.google.com/file/d/1iIWTAWu1uxZHixKxcyrodwEeqEDefHoa/view?usp=sharing

Lesson 7: Python Systems

In this lesson, you will learn how you can build your own Python system and implement it in Space Teams.

Tutorial Video:

https://www.youtube.com/watch?v=ymeQkxKzFd8&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=7

Code Examples

https://drive.google.com/file/d/1v8InF2F_aSa6oEFYGgNVITD0ZYGbpFMJ/view?usp=sharing https://drive.google.com/file/d/1WFuSxa3ovtSxfUvJ3p7b_1zlpNp1-Yu4/view?usp=sharing

Related Documentation

  1. Make New Python System
  2. Python API Docs

Lesson 8: Git Repo Cloning and Collaboration

This lesson explains how to integrate Space Teams with Git in order to manage and share team files that are used in your simulations.

Tutorial Video:

Coming Soon

Related Documentation

  1. Git Setup section on this page

Lesson 9: Sim Structure - STU Mission Manager, Task Graph & Entity Behavior

The event control architecture within Space Teams is explained. At the highest level, this involves an Event Manager for sim-wide event notification and actions. A Mission Manager controls the evolution of a simulation through data/state monitoring, decision making, and sending commands to all the entities. At the lowest level each entity has its own behaviors and responses to commands and the environment.

Tutorial Video:

https://www.youtube.com/watch?v=aMUDOElaqtU&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=8

Related Documentation

  1. STU Lunar SAR API Docs

Lesson 10: Mission Manager - Entity Telemetry & Sending Commands

This lesson focuses on programming the Mission Manager, which for this competition is key for putting your search and rescue strategy into action.

Tutorial Video:

https://www.youtube.com/watch?v=-gtWYXvbAh8&list=PLV9n3IHgy_dTQ1Lumj-QYev9qfvlQIndE&index=9

Related Documentation

  1. STU Lunar SAR API Docs
  2. The Entity
  3. The Parameter
  4. The Entity Config

Lesson 11: Running a Demo Simulation in VR (OPTIONAL)

In this lesson, you will learn how to launch Space Teams in VR and how to run a VR demo simulation.

Tutorial Video:

Coming Soon

Related Documentation

  1. How To Start a Sim - Differences for VR

Quick Git / GitHub Primer

Git is a distributed version control system used to track changes in source code during software development. It allows multiple developers to collaborate on projects (repositories) by creating, managing, and merging branches. Git stores snapshots (commits) of project files over time, enabling users to revert to previous versions if needed. It is widely used in both individual and team development workflows for its efficiency and flexibility.

GitHub is a web-based platform that hosts Git repositories, allowing developers to store, share, and collaborate on code. It provides tools for version control, issue tracking, and project management, making it easier for teams to work together. GitHub also supports features like pull requests and code reviews, streamlining the process of contributing to open-source and private projects.

STU Lunar SAR Git Setup

Our public STU_Lunar_SAR git repository, hosted on GitHub, is the starter code that we give out to participants to start programming their autonomous search and rescue algorithms. The SimDynamX copy of the repository will be consistently updated throughout the competition as we add more sims and functionality to the starter code for tasks past Task 1. The SimDynamX repository is set up as a Template Repository, so there is an easy way for participants to duplicate it and modify their (private) copy as their own repository. Once your team has made their own copy, they should probably keep using Git / GitHub to collaborate on code and data additions and changes. One good reason for that is: when it is time to submit for a task, the submission will involve filling out a form and providing a GitHub link to a particular commit (saved state) on your repository.

Some teams may opt to have only a few of the team members actually set up GitHub accounts or Git on their computers, and that is ok.

The following steps show how to set up your team's repo.

1. GitHub account setup

  1. Every member of your team should probably have their own GitHub.com account
  2. https://docs.github.com/en/get-started/onboarding/getting-started-with-your-github-account

2. Create a repository from the STU Lunar SAR Template for your team:

Screenshot 2024-10-22 014644

  1. Go to https://github.com/SimDynamX/STU_Lunar_SAR
  2. Use this template -> Create a new repository Screenshot 2024-10-22 014812_marked
  3. Set the Owner to your own account, and Repository Name to STU_Lunar_SAR_Your_Team_Name, substituting a unique-enough name.
    1. For example, STU_Lunar_SAR_AstroBlasters
  4. Set repository to Private so your changes are not publicly viewable
  5. On your new repository, use Settings -> Collaborators -> Add People to give your fellow team members permissions to access and modify the repository.

3. Back on https://github.com/SimDynamX/STU_Lunar_SAR, enable notifications for Release updates

Screenshot 2024-10-22 014928 Screenshot 2024-10-22 014938

  1. Watch -> Custom -> check Releases -> Apply
  2. This way, you will be notified by email when we update the competition starter code for the remaining tasks and any bug fixes.

4. Clone your copy of the repository in Space Teams

image (14)

  1. Open SpaceCRAFT/SpaceCRAFT.exe where you installed Space Teams Pro
  2. Sign in to your account
  3. On the title menu, Project Management -> Clone a Repo
  4. Fill in the HTTPS Clone URL of your team's copy of the STU Lunar SAR repo
  5. Folder name will automatically populate
  6. Clone
  7. Refresh once the Clone is complete
  8. Now continue to the Lunar SAR API Docs wiki page for further instructions for how to set up and run sims.

STU Lunar SAR Git Collaboration

Space Teams PRO has a simplified interface in the SpaceCRAFT app Project Management tab of the main title menu for collaborating using Git Repositories in the Local Assets folder. This allows the user to:

  • Clone a repo (download it and set it up with Git in the proper folder to be visible to Space Teams)
  • Refresh button that does a git fetch operation that compares the state of all repos to their online copy
  • Pull changes (download and apply commits (changes) that were made on a different computer then Pushed)
  • Push changes (upload changes that were made on the user's computer to the online copy)

Lots of the time, these commands will be the only ones you need. When you start working, do a Refresh to see if any of your cloned repos can be updated. Do a Pull on the repos that are ahead of your copy with online changes. Do your work, changing files as you go. Every now and then, probably close to once per hour, do a Push, which uploads your changes so your team members can Pull them.

You can look through the entire history of every change that was ever pushed on the GitHub repo site for your copy.

Merge Conflicts

If two people edit the same section of the same file from the same starting point, a Merge Conflict happens. This cannot be sorted out through the Space Teams PRO git interface. We recommend setting up GitHub Desktop on your computer to handle these edge cases. More info on merge conflicts is available here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts

GitHub Desktop Setup

  1. Install https://docs.github.com/en/desktop/installing-and-authenticating-to-github-desktop/installing-github-desktop
  2. Sign in with your GitHub account
  3. Add your STU repository
    1. (GitHub.com instructions: https://docs.github.com/en/desktop/adding-and-cloning-repositories/adding-a-repository-from-your-local-computer-to-github-desktop)
    2. with File->Add local repository->Choose...
    3. Navigate to C:\Users\YOUR WINDOWS USERNAME\AppData\Local\SimDynamX\STPro\Assets\Repos
    4. Select the STU_Lunar_SAR_YourTeamName folder
    5. Add repository
  4. Learn about how to use GitHub Desktop here: https://docs.github.com/en/desktop/overview/getting-started-with-github-desktop
Clone this wiki locally