#models #teegarden #robot #exploration #planet #pc #pybadge

mission2teegarden-b-models

Private implementation detail of mission2teegarden-b

2 unstable releases

0.2.0 Jul 14, 2023
0.1.0 Jul 13, 2023

#125 in Robotics

40 downloads per month
Used in mission2teegarden-b-map

AGPL-3.0-or-later

15KB
140 lines

🪐 Mission to Teegarden b

License: AGPL-3.0-or-later v0.1.1 GitHub tag (latest SemVer pre-release) Packaging status Source Code Repository Rust Version: ^1.70

Welcome to a journey to the unexplored planet Teegarden b, to find a new home for humanity. Robots were sent to the planet’s surface for exploration. Program these robots from the safety of your spaceship, by using your pybadge.

What hazards await you on the planet? Face them with up to 4 players. Work together to solve all puzzles and challenges. Will you be able to prepare everything, so humans can arrive on the planet?
Try out Mission to Teegarden b now for free and figure it out.

Installation (Pc):

Mission to Teegarden b is available at the following repositories:

Packaging status

Prebuild binaries can also be downloaded from the GitHub release. On Unix system the binary must may be marked as executable by running chmod u+x mission2teegarden-b afer unpacking the zip archive. On Linux the following dependencies are needed. Regular these are already installed.

Mission to Teegarden b is only tested on Arch Linux and Ubuntu. MacOS and Windows versions complie sucessfull but are untested. Supressing standby on MacOS is temporary disable, see #157.

Building from source:

Alternative you can easily build Mission to Teegarden b by yourself:

  • On Linux, install the following development dependencies. On some distros (like Alpine and Debian), separate development packages exist, regular suffixed with -dev. If this is the case, make sure that you have also installed the *-dev version.

  • Install rust

  • Download and unpack the source code.

  • Run cargo install --path pc --locked inside the unpacked folder, to build and install mission2teegarden-b. See the rust book for more information about cargo install.

  • Make sure that ~/.cargo/bin is listed in the PATH environment variable otherwise, the mission2teegarden-b executable can not be found.

Flash Pybadge:

  • Install an UF2 flasher. I recommend using hf2-cli.
  • Download and unpack Pybadge binary from GitHub release.
  • Press the reset button of the pybdage twice, to enter the bootloader.
  • After this, execute hf2 elf mission2teegarden-b-pybadge.elf (or the corresponding command of your flashing tool) to flash the binary to the pybadge.
  • Press the reset button again.

Building from source:

Alternative you can build m3 by yourself:

  • Install rustup
  • Install hf2-cli flasher.
  • Install the rust thumbv7em-none-eabihf target (the architecture of the pybadge) by executing rustup target install thumbv7em-none-eabihf.
  • Optional: install nightly toolchain for better error messages at the pybadge. rustup toolchain install nightly --target thumbv7em-none-eabihf
  • Download and unpack the source code (if not already done).
  • Press the reset button of the pybadge twice to enter bootloader
  • Compile and flash program by running cargo +nightly run --release -locked inside the downloaded pybadge folder. +nightly is optional and have to be left out if the “install nightly toolchain” step was skip. Please use +nightly for bug reports.
  • Press the reset button again.

Map/Level Editor:

Mission to Teegarden b allow creating custom maps/levels, by using the powerfull Tiled Map editor. See here for more information about creating maps.


lib.rs:

This create store models and protcoll data, which is used by the communication between pybadeg and pc.

Protocol:

Every message is neither a Protocoll message or a Gamevent. The KeepAlive is also definded at toplevel, to make it only one byte big, because it is send very frequently to pc. The pc assume that the KeepAlive message is send at least once every second. Otherwise the pc assume that the pypbadge was disconnected.

Connection Establishment

The pc search for seriell devices at start and does send an ConnectionRequest to each Seriell devices. The pybadge responds with ConnectionResponse. After sending an ConnectionResponse the pybadge start listen to other incomming message too.

Dependencies

~0.8–1.3MB
~30K SLoC