diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3ba8f13e09..849ff17e3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,50 +2,71 @@ ![Synthesis: An Autodesk Technology](/engine/Assets/Resources/Branding/Synthesis/Synthesis-An-Autodesk-Technology-2023-lockup-Wht-OL-No-Year-stacked.png#gh-dark-mode-only) # Synthesis Contribution Guide -Synthesis is 100% open source and relies on the FIRST community to help make it better. The Synthesis Contribution Guide suggests ways in which you can get involved through development and non-development avenues. + +Synthesis is 100% open source and relies on the FIRST community to help shape its growth. The Synthesis Contribution Guide suggests ways in which you can get involved through development and non-development avenues. + +# How to Contribute + +Before you contribute to this repository, please first discuss the change you wish to make a GitHub issue or reach out through our [community Discord](https://www.discord.gg/hHcF9AVgZA). This way we can ensure that there is no overlap between outside contributors and internal development work. + +When ready to contribute, fork the Synthesis repository, make your changes, and submit a pull request. When contributing to Synthesis, please branch from and submit to our `dev` branch. The `prod` branch is intended to be a copy of either exactly what is in production, or what is ready for production. We like to keep changes to the dev branch so they have time to simmer and be distributed via beta releases. + +Be sure to fill out the pull request template accordingly to make reviewing your work as smooth as possible. # Why Contribute? Benefits to Contributing -* Prepare for an internship - share your contributions when applying to the [Synthesis Summer Internship.](https://synthesis.autodesk.com/internship.html) -* Add your contributions to Synthesis: An Autodesk Technology to your portfolio -* Meet other members of the FIRST community -* Get involved and learn more about Autodesk products + +- Prepare for an internship - share your contributions when applying to the [Synthesis Summer Internship.](https://synthesis.autodesk.com/internship.html) +- Add your contributions to Synthesis: An Autodesk Technology to your portfolio +- Meet other members of the FIRST community +- Get involved and learn more about Autodesk products +- Improve a product that you care about - if you use Synthesis and notice a feature you want, get involved! # How to Contribute + ### Found a bug? Have an idea for a feature? + Please [contact us](#Contact-Us) to let us know about the issue or feature! -*A Note to Developers*: When contributing to this repository and making large changes, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. This way, we can ensure that there is no overlap between contributions and internal development work. You may contact us using any of [these methods](#Contact-Us), although email is preferred in this case. +_A Note to Developers_: Please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. This way, we can ensure that there is no overlap between contributions and internal development work. You may contact us using any of [these methods](#Contact-Us), although email is preferred in this case. -For smaller changes, just submit a pull request and be sure to include a clear and detailed description of the changes you've made so that we can verify them and eventually merge. +For smaller changes, just submit a pull request and be sure to follow the PR template to create a clear and detailed description of the changes you've made. ### Submit a CAD Model + Submit your team's CAD model to be added to the Synthesis robot and field libraries by emailing your designs to frc@autodesk.com. Please share them in the form of a Fusion360 Share-link. Raw Mirabuf files will not be accepted. ### Write Tutorials, Increase Documentation -We are always interested in ways to make our tutorials and documentation more clear to our end users. If there is content missing or could be refined, please follow our [contribution guidelines](#How-to-Contribute) for submitting a change. + +We are always interested in ways to make our tutorials and documentation clearer for our end users. If there is content missing or could be refined, please follow our [contribution guidelines](#How-to-Contribute) for submitting a change. ### Translate our Tutorials and Documentation + If you or someone you know can read and write in another language, we would like to translate our text-based resources to make them available in more languages. Contact frc@autodesk.com for more details. ### Create How-To or Project DIY and Inspiration Guides + Did you add a feature to Synthesis, or learn how to use a specific feature? Write a how-to guide or [share your project with us](#Contact-Us). -### Share a Use Case Story -Hearing how you use Synthesis is valuable feedback to our team. Share your stories by tagging us [@synthesis.adsk](https://www.instagram.com/synthesis.adsk/) on Instagram, posting on [ChiefDelphi](https://www.chiefdelphi.com/), or talking about it on [Discord](https://discord.gg/FuuQ9UGycM). +### Share Your Use Case + +Hearing how you use Synthesis is valuable feedback to our team. Share your use cases by tagging us [@synthesis.adsk](https://www.instagram.com/synthesis.adsk/) on Instagram, posting on [ChiefDelphi](https://www.chiefdelphi.com/), or talking about it on [our Discord](https://discord.gg/FuuQ9UGycM). ### Expand FIRST Support + FIRST control systems and essentials like sensors, cameras, various motors, etc. would greatly increase simulation support. Learn more about [contributing development here](#How-to-Contribute). ### Beta Testing + Help us try and break Synthesis! At the end of summer development, we provide a Synthesis beta for users to test and sometimes in exchange for your time we offer incentives to users. You can stay up-to-date with any Synthesis releases by joining our [Discord server](https://www.discord.gg/hHcF9AVgZA) and/or following us on Instagram [@synthesis.adsk](https://www.instagram.com/synthesis.adsk/). ### Contact Us -| Platform | Link | -| :--- | :---: | -| Discord | [Synthesis Community Discord](https://discord.gg/FuuQ9UGycM) | -| Email | [frc@autodesk.com](mailto:frc@autodesk.com) | -| Instagram | [@synthesis.adsk](https://www.instagram.com/synthesis.adsk/) | -| Reddit | [u/synthesis_adsk](https://www.reddit.com/user/synthesis_adsk/) | + +| Platform | Link | +| :---------- | :--------------------------------------------------------------------: | +| Discord | [Synthesis Community Discord](https://discord.gg/FuuQ9UGycM) | +| Email | [frc@autodesk.com](mailto:frc@autodesk.com) | +| Instagram | [@synthesis.adsk](https://www.instagram.com/synthesis.adsk/) | +| Reddit | [u/synthesis_adsk](https://www.reddit.com/user/synthesis_adsk/) | | ChiefDelphi | [synthesis_adsk](https://www.chiefdelphi.com/u/synthesis_adsk/summary) | To let us know about an issue with Synthesis, you can submit a [GitHub issue](https://github.com/Autodesk/synthesis/issues/new/choose). diff --git a/README.md b/README.md index b2984a3a1c..879da48e5b 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@
-[![Fission - Unit Test](https://github.com/Autodesk/synthesis/actions/workflows/FissionUnitTest.yml/badge.svg?branch=prod)](https://github.com/Autodesk/synthesis/actions/workflows/FissionUnitTest.yml) -[![Fission - Packaging](https://github.com/Autodesk/synthesis/actions/workflows/FissionPackage.yml/badge.svg?branch=prod)](https://github.com/Autodesk/synthesis/actions/workflows/FissionPackage.yml) -[![Fission - Lint/Format](https://github.com/Autodesk/synthesis/actions/workflows/FissionBiome.yml/badge.svg?branch=prod)](https://github.com/Autodesk/synthesis/actions/workflows/FissionBiome.yml) -[![Fusion - Format](https://github.com/Autodesk/synthesis/actions/workflows/BlackFormat.yml/badge.svg?branch=prod)](https://github.com/Autodesk/synthesis/actions/workflows/BlackFormat.yml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Autodesk/synthesis/FissionUnitTest.yml?branch=prod&style=for-the-badge&logoSize=auto&label=Fission%20Unit%20Tests&link=https%3A%2F%2Fgithub.com%2FAutodesk%2Fsynthesis%2Factions%2Fworkflows%2FFissionUnitTest.yml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Autodesk/synthesis/FissionPackage.yml?branch=prod&style=for-the-badge&logoSize=auto&label=Fission%20-%20Packaging&link=https%3A%2F%2Fgithub.com%2FAutodesk%2Fsynthesis%2Factions%2Fworkflows%2FFissionPackage.yml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Autodesk/synthesis/FissionBiome.yml?branch=prod&style=for-the-badge&logoSize=auto&label=Fission%20Lint%2FFormat&link=https%3A%2F%2Fgithub.com%2FAutodesk%2Fsynthesis%2Factions%2Fworkflows%2FFissionBiome.yml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Autodesk/synthesis/BlackFormat.yml?branch=prod&style=for-the-badge&logoSize=auto&label=Fusion%20Exporter%20Format&link=https%3A%2F%2Fgithub.com%2FAutodesk%2Fsynthesis%2Factions%2Fworkflows%2FBlackFormat.yml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Autodesk/synthesis/FusionWebUI.yml?branch=prod&style=for-the-badge&logoSize=auto&label=Fusion%20Exporter%20WebUI%20Build&link=https%3A%2F%2Fgithub.com%2FAutodesk%2Fsynthesis%2Factions%2Fworkflows%2FFusionWebUI.yml) Synthesis is a robotics simulator designed by and for [FIRST®](https://www.firstinspires.org/) robotics students to help teams design, strategize, test and practice. Teams have the ability to import their own robots and fields using our [Fusion Exporter](/exporter/) or use the pre-made ones available within Synthesis. @@ -14,90 +15,74 @@ For more information on the product itself or the team, visit [http://synthesis. ## Goals -Synthesis is built with a direct focus on the FIRST® community. Every single one of our developers is a FIRST® student. We've also made the project completely open source in order to better involve the community. This way contributors can help make Synthesis better or modify Synthesis to better suit their team’s needs. +Synthesis is built with a direct focus on the FIRST® community. Every single one of our developers is or was a FIRST® student. We've also made the project completely open source in order to better involve the community. This way contributors can help improve Synthesis broadly or adapt it to their team’s needs. Here are some of our primary goals for Synthesis: -- **Ease of Use**: It's important for us that Synthesis is out of the box ready for teams to use. We want to make sure that teams can get up and running with Synthesis as quickly as possible. To that end, Synthesis comes ready with a variety of robots and fields; in addition to the ability to export and import your own. +- **Ease of Use**: It's important for us that Synthesis is out of the box ready for teams to use. We want to make sure that teams can get up and running with Synthesis as quickly as possible. To that end, Synthesis comes ready with a variety of robots and fields in addition to the ability to export and import your own. - **Testing Robot Designs**: Synthesis is designed to be a tool for teams to quickly test their robot designs in a semi-realistic environment. Are you a builder who wants to use some crazy virtual four-bar linkage and your team says it's a waste of time? Well now you can prove them wrong by testing it in Synthesis! - **Exploring the Field Environment**: Every year on kickoff, for both FTC and FRC FIRST® competitions, Synthesis has the newest field available immediately. This allows teams to explore the field through a 3D model, drive a robot around, and begin to strategize for the upcoming season's game. -- **Driver Practice & Strategy**: Not getting enough driver practice or don't have a full field available to you? Synthesis has you covered with the ability to drive your robot around with a gamepad from a first-person view at the driver station; allowing you to get a feel for potential control scheme layouts and any line-of-sight challenges that may arise. This also allows the drive team and the programmers to communicate about what control layouts work best for each driver. +- **Driver Practice & Strategy**: Not getting enough driver practice or don't have a full field available to you? Synthesis has you covered with the ability to play full simulated matches, controlling your robot with a gamepad from a first-person view at the driver station. This allows you to get a feel for potential control scheme layouts and any line-of-sight challenges that may arise. This also allows the drive team and the programmers to communicate about what control layouts work best for each driver. ## Getting Started -If you are a FIRST robotics student who just wants to use Synthesis, you *don't* need this repo. Simply **install the latest release of Synthesis from [synthesis.autodesk.com/download](https://synthesis.autodesk.com/download.html)**. +If you are a FIRST robotics student who just wants to use Synthesis, you _don't_ need this repo. Simply go follow [this link](https://synthesis.autodesk.com/fission) to the simulator and start spawning in robots! -> [!IMPORTANT] -> Moving to [synthesis.autodesk.com](http://synthesis.autodesk.com/). - -If you're a developer who wants to contribute to Synthesis, you're in the right place. Synthesis is comprised of 3 main components that can be developed separately. These components include: +If you're a developer who wants to contribute to Synthesis, you're in the right place. Synthesis is comprised of 2 main components that can be developed separately: - [Fission (Core Web App)](/fission/README.md) - [Fusion Exporter (Fusion exporter to Mirabuf file format)](/exporter/SynthesisFusionAddin/README.md) -- [Fusion Exporter Installer](/installer/) - -Follow the above links to the respective READMEs on how to build and run each component. + -### Compatibility Notes +Follow the above links to the respective READMEs on how to build, run, and test each component. -As Fusion is not officially supported on Linux, we do not provide an installer for the Fusion Exporter on Linux. +> [!NOTE] +> As Fusion is not officially supported on Linux, we do not provide an installer for the Fusion Exporter on Linux. ## Contributing -This project welcomes community suggestions and contributions. Synthesis is nearly 100% open source and relies on the FIRST® community to help make it better. The [Synthesis Contribution Guide](/CONTRIBUTING.md) suggests ways in which you can get involved through development and non-development avenues. - -Before you contribute to this repository, please first discuss the change you wish to make via a GitHub issue, email us ([frc@autodesk.com](mailto:frc@autodesk.com)), or reach out through our [community discord](https://www.discord.gg/hHcF9AVgZA). This way we can ensure that there is no overlap between outside contributors and internal development work. - -When ready to contribute, fork the synthesis repository, make your changes, and submit a pull request. When contributing to Synthesis, please branch from our `dev` branch and submit pull requests to that branch. The `prod` branch is intended to be a copy of either exactly what is in production, or what is ready for production. We like to keep changes to the dev branch so they have time to simmer and be distributed via beta releases. Be sure to fill out the pull request template accordingly to make reviewing your work as smooth as possible. Feel free to check out our [contributing guidelines](/CONTRIBUTING.md) to learn more. - -## Code Formatting And Style - -All code is under a configured formatting utility. See each component for more details. +See [CONTRIBUTING.md](/CONTRIBUTING.md) for information on how you can help build synthesis ## Other Components -### Mirabuf - -Mirabuf is a file format we use to store physical data from Fusion to load into the Synthesis simulator (Fission). This is a separate project that is a submodule of Synthesis. [See Mirabuf](https://github.com/HiceS/mirabuf/) - -### Jolt Physics +### [Mirabuf](https://github.com/HiceS/mirabuf/) -Jolt is the core physics engine for our web biased simulator. [See JoltPhysics.js](https://github.com/HunterBarclay/JoltPhysics.js) for more information. +Mirabuf is a file format we use to store physical data from Fusion to load into the Synthesis simulator (Fission). This is a separate project that is a submodule of Synthesis. -### Tutorials +### [Jolt Physics](https://github.com/HunterBarclay/JoltPhysics.js) -Our source code for the tutorials featured on our [Tutorials Page](https://synthesis.autodesk.com/tutorials.html). +Jolt is the core physics engine for our web-based simulator. ### Protocols Additional protobuf files that we use in addition to Mirabuf. [See Protocols](/protocols/README.md) -## Tutorials +## [Tutorials](https://synthesis.autodesk.com/tutorials.html) -We have a variety of tutorials available to help you get started with Synthesis. These tutorials can be found on our [Tutorials Page](https://synthesis.autodesk.com/tutorials.html) on our website. Additionally, you can view these same tutorials as Markdown files in the [tutorials](/tutorials/) directory of this repository. +We have a variety of tutorials available to help you get started with Synthesis. Additionally, you can view these same tutorials as Markdown files in the [tutorials](/tutorials/) directory of this repository. -Updating our tutorials is a ongoing process. If you are at all interested in helping, checkout the [Synthesis Contribution Guide](/CONTRIBUTING.md) for more information on how to get started. +Updating our tutorials is an ongoing process. If you are at all interested in helping, check out the [Synthesis Contribution Guide](/CONTRIBUTING.md) for more information on how to get started. -## Immersion Program +## [Immersion Program](https://synthesis.autodesk.com/internship.html) -Annually, since 2014, Autodesk has sponsored the Synthesis Immersion Program for FIRST robotics students to develop Synthesis. The immersion program is a 10 week paid work experience at the Portland, Oregon Autodesk office from June 20th to August 25th. The immersion program focuses on not only developing Synthesis, but also allowing for opportunities to meet and collaborate with other Autodesk employees. For more information about the immersion program, visit our website at [synthesis.autodesk.com/internship](https://synthesis.autodesk.com/internship.html). +Annually, since 2014, Autodesk has sponsored the Synthesis Immersion Program for FIRST robotics students to develop Synthesis. The immersion program is a 10 week paid work experience at the Portland, Oregon Autodesk office from June 16th to August 22nd. The immersion program focuses on not only developing Synthesis, but also allowing for opportunities to meet and collaborate with other Autodesk employees. ### Want To Be A Part Of The Team? If you're a FIRST robotics student who wants to be a part of the Synthesis development team here is some basic information about applying. -Applicants must be: +Applicants must: -- At least 16 years of age -- Been a member of a FIRST Robotics team for at least one full season +- Be at least 16 years of age (at the start of the internship) +- Have been a member of a FIRST Robotics team for at least one full season -Applications open each year during the spring. For more information about applying, exceptions to these requirements or for more info about specific positions offered, please visit the [Synthesis Immersion Program](https://synthesis.autodesk.com/internship.html) website. +Applications open each year during the spring. For more information about applying, exceptions to these requirements or for more info about specific positions offered, please visit [Synthesis Immersion Program](https://synthesis.autodesk.com/internship.html). ## Contact -If you have any questions about Synthesis or the Immersion Program, you can contact us through email ([frc@autodesk.com](mailto:frc@autodesk.com)). Additionally please reach out through our [community discord](https://www.discord.gg/hHcF9AVgZA). It's the best way to get in touch with not only the community, but Synthesis' current development team. +If you have any questions about Synthesis or the Immersion Program, you can contact us through email ([frc@autodesk.com](mailto:frc@autodesk.com)). Additionally, please reach out through our [community Discord](https://www.discord.gg/hHcF9AVgZA). It's the best way to get in touch with not only the community, but Synthesis' current development team. -## License +## [License](/LICENSE.txt) Copyright (c) Autodesk diff --git a/exporter/README.md b/exporter/README.md index edbf238083..d852f3e146 100644 --- a/exporter/README.md +++ b/exporter/README.md @@ -2,7 +2,8 @@ ## Officially Supported Exporters -### SynthesisFusionAddin -An Autodesk® Fusion™ add-in to export assemblies into the [mirabuf](https://github.com/HiceS/mirabuf) format. +### Synthesis Fusion Addin + +An Autodesk® Fusion™ addin to export assemblies into the [Mirabuf](https://github.com/HiceS/mirabuf) format. See [README](/exporter/SynthesisFusionAddin). diff --git a/exporter/SynthesisFusionAddin/README.md b/exporter/SynthesisFusionAddin/README.md index 1e61d0735c..59da6d3d8d 100644 --- a/exporter/SynthesisFusionAddin/README.md +++ b/exporter/SynthesisFusionAddin/README.md @@ -1,6 +1,6 @@ # Synthesis Exporter -This is a Addin for Autodesk® Fusion™ that will export a [Mirabuf](https://github.com/HiceS/mirabuf) usable by the Synthesis simulator. +This is an addin for Autodesk® Fusion™ that will export a [Mirabuf](https://github.com/HiceS/mirabuf) usable by the Synthesis simulator. ## Features @@ -74,7 +74,7 @@ Most of the runtime for the addin is saved under the `logs` directory in this fo Packaging is mainly for compressing the files into a smaller footprint -Contact us for information on how to use the packaging script to obfuscate all of the files using `pyminifier`. +Contact us for information on how to use the packaging script to obfuscate all the files using `pyminifier`. --- @@ -82,8 +82,8 @@ Contact us for information on how to use the packaging script to obfuscate all o We format using a Python formatter called `black` [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) in conjunction with [`isort`](https://pycqa.github.io/isort/). -- install by `pip3 install black && pip3 install isort` or `pip install black && pip install isort` -- use `isort .` followed by `black .` to format all relevant exporter python files. +- Install by `pip3 install black && pip3 install isort` or `pip install black && pip install isort` +- Use `isort .` followed by `black .` to format all relevant exporter python files. - or, alternatively, run `python ./tools/format.py` to do this for you! **Note: black will always ignore files in the proto/proto_out folder since google formats those** diff --git a/fission/README.md b/fission/README.md index 6b39975030..0ee73c41f7 100644 --- a/fission/README.md +++ b/fission/README.md @@ -1,21 +1,22 @@ # Fission -Fission is Synthesis' web-based robotics simulator. This app is hosted [on our website](https://synthesis.github.com/fission/), in addition to a closed, in-development version [here](https://synthesis.autodesk.com/beta/). +Fission is Synthesis' web-based robotics simulator. This app is hosted [on our website](https://synthesis.github.com/fission/), in addition to a closed [beta version](https://synthesis.autodesk.com/beta/). + ## Setup & Building ### Requirements -1. NPM (v10.2.4 recommended) - - Yarn, Bun, or any other package managers work just as well. -2. NodeJS (v20.10.0 recommended) +1. Bun (v1.2.20 recommended) + - Yarn, NPM, or any other package managers work just as well. +2. Node.js (v20.10.0 recommended) - Needed for running the development server. ### Setup -You can either run the `init` command or run the following commands details in "Specific Steps": +You can either run the `init` command or run the following commands detailed in the "Specific Steps" section below: ```bash -npm i && npm init +bun i && bun run init ```
@@ -24,37 +25,39 @@ npm i && npm init To install all dependencies: ```bash -npm i +bun i ``` -For the asset pack that will be available in production, download the asset pack [here](https://synthesis.autodesk.com/Downloadables/assetpack.zip) and unzip it. -Make sure that the Downloadables directory is placed inside of the public directory like so: +[Download the production asset pack](https://synthesis.autodesk.com/Downloadables/assetpack.zip), then unzip it. +Make sure that the `Downloadables` directory is placed inside the public directory like so: ``` /fission/public/Downloadables/ ``` -This can be accomplished with the `assetpack` npm script: +Alternatively for development, you can download and install the asset pack for whatever branch you're operating on with [Git LFS]. This can be accomplished with the `assetpack` script: ```bash -npm run assetpack +bun run assetpack ``` -We use [Playwright](https://playwright.dev/) for testing consistency. The package is installed with the rest of the dependencies; however, be sure to install the playwright browsers with the following command: +We use [Playwright](https://playwright.dev/) for testing with simulated browsers. The package is installed with the rest of the dependencies; however, be sure to install the playwright browsers with the following command: ```bash -npx playwright install +bunx playwright install ``` + or + ```bash -npm run playwright:install +bun run playwright:install ```
### Environment Configuration -In `vite.config.ts` you'll find a number of constants that can be used to tune the project to match your development environment. +In `vite.config.ts` you'll find a number of constants that can be used to match Synthesis to your development environment. ## Running & Testing @@ -63,7 +66,7 @@ In `vite.config.ts` you'll find a number of constants that can be used to tune t You can use the `dev` command to run the development server. This will open a server on port 3000 and open your default browser at the hosted endpoint. ```bash -npm run dev +bun run dev ``` ### Unit Testing @@ -71,7 +74,7 @@ npm run dev We use a combination of Vitest and Playwright for running our unit tests. A number of the unit tests rely on the asset pack data and may time out due to download speeds. By default, the unit test command uses a Chromium browser. ```bash -npm run test +bun run test ``` ## Packaging @@ -81,19 +84,21 @@ npm run test We have two packaging commands: one for compiling dev for attachment to the in-development endpoint, and another for the release endpoint. Release: + ```bash -npm run build:prod +bun run build:prod ``` In-development: + ```bash -npm run build:dev +bun run build:dev ``` You can alternatively run the default build command for your own hosting: ```bash -npm run build +bun run build ``` ### Electron Packaging @@ -101,72 +106,45 @@ npm run build We also give you the option to package Synthesis with electron. This will not give a performance boost, but it will allow Synthesis to work offline (make sure to also launch the app and download all the robot/field files you want to use). To package the app run: + ```bash -npm run electron:publish +bun run electron:publish ``` -The packaged app will be located at synthesis/fission/out. - -## Core Systems - -These core systems make up the bulk of the vital technologies to make Synthesis work. The idea is that these systems will serve as a -jumping off point for anything requiring real-time simulation. - -### World - -The world serves as a hub for all of the core systems. It is a static class that handles system update execution order and lifetime. - -### Scene Renderer - -The Scene Renderer is our interface for rendering within the Canvas. This is primarily done via ThreeJS, however it can be extended later on. - -### Physics System - -This Physics System is our interface with Jolt, ensuring objects are properly handled and providing utility functions that are more custom-fit to our purposes. -[Jolt Physics Architecture](https://jrouwe.github.io/JoltPhysics/) +The packaged app will be located in the `/fission/out` directory. -### Input System - -The Input System listens for and records key presses and joystick positions to be used by robots. It also maps robot behaviors (e.g. an arcade drivetrain or an arm) to specific keys through customizable input schemes. - -### UI System - -## Additional Systems - -These systems will extend off of the core systems to build out features in Synthesis. - -### Simulation System - -The Simulation System articulates dynamic elements of the scene via the Physics System. At its core there are 3 main components: - -#### Driver - -Drivers are mostly write-only. They take in values to know how to articulate the physics objects and constraints. - -#### Stimulus - -Stimuli are mostly read-only. They read values from given physics objects and constraints. - -#### Brain - -Brains are the controllers of the mechanisms. They use a combination of Drivers and Stimuli to control a given mechanism. - -For basic user control of the mechanisms, we'll have a Synthesis Brain. We hope to have an additional brain by the end of Summer 2024: the WPIBrain for facilitating WPILib code control over the mechanisms inside of Synthesis. - -## NPM Scripts +## Core Systems -| Script | Description | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `init` | Runs the initialization commands to install all dependencies, assets, and unit testing browsers. | -| `dev` | Starts the development server used for testing. Supports hot-reloading (though finicky with WASM module loading). | -| `test` | Runs the unit tests via Vitest. | -| `build` | Builds the project into its packaged form. Uses the root base path. | -| `build:prod` | Builds the project into its packaged form. Uses the `/fission/` base path. | -| `preview` | Runs the built project for preview locally before deploying. | -| `lint` | Runs ESLint on the project. | -| `lint:fix` | Attempts to fix issues found with ESLint. | -| `prettier` | Runs Prettier on the project as a check. | -| `prettier:fix` | Runs Prettier on the project to fix any issues with formatting. | -| `format` | Runs `prettier:fix` and `lint:fix`. | -| `assetpack` | Downloads the assetpack and unzips/installs it in the correct location. | -| `playwright:install` | Downloads the Playwright browsers. | \ No newline at end of file +These core systems make up the lion's share of the fission source code. Each system manages a different aspect of the simulated world + +- [World](/fission/src/systems/World.md) +- [Scene Renderer](/fission/src/systems/scene/SceneRenderer.md) +- [Physics System](/fission/src/systems/physics/PhysicsSystem.md) +- [Input System](/fission/src/systems/input/InputSystem.md) +- [Simulation System](/fission/src/systems/simulation/SimulationSystem.md) + +## Package Scripts + +| Script | Description | +| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `init` | Runs the initialization commands to install all dependencies, assets, and unit testing browsers. | +| `host` | Starts the development server used for testing and exposes it to the network. Supports hot-reloading (though finicky with WASM module loading). | +| `dev` | Starts the development server used for testing. Supports hot-reloading (though finicky with WASM module loading). | +| `test` | Runs the unit tests via Vitest. | +| `build` | Builds the project into its packaged form. Uses the root base path. | +| `build:prod` | Builds the project into its packaged form. Uses the `/fission/` base path. | +| `build:dev` | Builds the project into its packaged form. Uses the `/fission-closed/` base path. | +| `preview` | Runs the built project for preview locally before deploying. | +| `lint` | Runs the Biome linter without applying fixes. | +| `lint:fix` | Runs the Biome linter and applies fixes. | +| `fmt` | Runs the Biome formatter without applying fixes. | +| `fmt:fix` | Runs the Biome formatter and applies fixes. | +| `style` | Runs the `lint` and `fmt` commands. | +| `style:fix` | Runs the `lint:fix` and `fmt:fix` commands. | +| `assetpack` | Downloads the assetpack and unzips/installs it in the correct location. | +| `assetpack:update` | Downloads the assetpack and unzips/installs it in the correct location, replacing the old directory if it exists. | +| `playwright:install` | Downloads the Playwright browsers. | +| `electron:make` | Builds Synthesis as an electron application. | +| `electron:start` | Starts Synthesis as an electron application. | +| `electron:package` | Packages Synthesis as an electron application. | +| `electron:publish` | Publishes Synthesis as an electron application. | diff --git a/fission/package.json b/fission/package.json index e7c780dd44..937d1480a1 100644 --- a/fission/package.json +++ b/fission/package.json @@ -24,9 +24,9 @@ "assetpack": "git lfs pull && (rm -rf public/Downloadables;tar -xf public/assetpack.zip -C public/)", "assetpack:update": "bun update_manifest.ts && cd public && zip -FS -r assetpack.zip Downloadables", "playwright:install": "bun x playwright install", + "electron:make": "electron-forge make", "electron:start": "electron-forge start", "electron:package": "electron-forge package", - "electron:make": "electron-forge make", "electron:publish": "electron-forge publish" }, "dependencies": { diff --git a/fission/src/systems/World.md b/fission/src/systems/World.md new file mode 100644 index 0000000000..025240f09a --- /dev/null +++ b/fission/src/systems/World.md @@ -0,0 +1,3 @@ +# World System Documentation + +The world serves as a hub for all of the core systems. It is a static class that handles system update execution order and lifetime. diff --git a/fission/src/systems/input/InputSystem.md b/fission/src/systems/input/InputSystem.md new file mode 100644 index 0000000000..90931f3486 --- /dev/null +++ b/fission/src/systems/input/InputSystem.md @@ -0,0 +1,3 @@ +# Input System Documentation + +The Input System listens for and records key presses and joystick positions to be used by robots. It also maps robot behaviors (e.g. an arcade drivetrain or an arm) to specific keys through customizable input schemes. diff --git a/fission/src/systems/physics/PhysicsSystem.md b/fission/src/systems/physics/PhysicsSystem.md new file mode 100644 index 0000000000..6f4c1b4e68 --- /dev/null +++ b/fission/src/systems/physics/PhysicsSystem.md @@ -0,0 +1,3 @@ +# Physics System Documentation + +This Physics System is our interface with [Jolt](https://jrouwe.github.io/JoltPhysics/), ensuring objects are properly handled and providing utility functions that are more custom-fit to our purposes. diff --git a/fission/src/systems/scene/SceneRenderer.md b/fission/src/systems/scene/SceneRenderer.md new file mode 100644 index 0000000000..a8febc3cc1 --- /dev/null +++ b/fission/src/systems/scene/SceneRenderer.md @@ -0,0 +1,7 @@ +# Scene Renderer Documentation + +The Scene Renderer is our interface for rendering within the Canvas. This is primarily done via ThreeJS. + +The SceneRenderer manages a series of visual ThreeJs objects such as the cameras, lighting managers, and the skybox. + +The SceneRenderer also manages the components of this world, known as SceneObjects, the most common of which is the [MirabufSceneObject](../../mirabuf/MirabufSceneObject.ts), representing objects parsed from the [mirabuf file format](https://mirabuf.dev). Each MirabufSceneObject holds references to each of the Jolt bodies that make it up and are managed by the [Physics System](../physics/PhysicsSystem.md). diff --git a/fission/src/systems/simulation/SimulationSystem.md b/fission/src/systems/simulation/SimulationSystem.md new file mode 100644 index 0000000000..4db0ad8c02 --- /dev/null +++ b/fission/src/systems/simulation/SimulationSystem.md @@ -0,0 +1,17 @@ +# Simulation System Documentation + +The Simulation System articulates dynamic elements of the scene via the Physics System. At its core there are 3 main components: + +#### Driver + +Drivers are mostly write-only. They take in values to know how to articulate the physics objects and constraints. + +#### Stimulus + +Stimuli are mostly read-only. They read values from given physics objects and constraints. + +#### Brain + +Brains are the controllers of the mechanisms. They use a combination of Drivers and Stimuli to control a given mechanism. + +The [Synthesis Brain](./synthesis_brain/SynthesisBrain.ts) exists for basic user control of the mechanisms, while the [WPILib Brain](./wpilib_brain/WPILibBrain.ts) facilitates controlling mechanisms over a websocket connection with a WPILib HALSim instance. diff --git a/installer/README.md b/installer/README.md index 598f6b8ae6..8c904c780a 100644 --- a/installer/README.md +++ b/installer/README.md @@ -1,6 +1,6 @@ # Installers -We recently transitioned to a platform independent, web-based application. As such, we no longer maintain a installer for the core simulator. We do, however, still have one for our Fusion Exporter. +We recently transitioned to a platform independent, web-based application. As such, we no longer maintain an installer for the core simulator. We do, however, still have one for our Fusion Exporter. ## Installing the Synthesis Fusion Exporter @@ -18,24 +18,24 @@ We recently transitioned to a platform independent, web-based application. As su - Navigate to [`synthesis.autodesk.com/download`](https://synthesis.autodesk.com/download.html). - Find the Exporter source code zip download. - - Note that the source code is platform agnostic, it will work for **both** `Windows` and `Mac`. + - Note that the source code is platform-agnostic, it will work for **both** `Windows` and `Mac`. - Once the source code for the Exporter is downloaded, unzip the folder. - Next, if you haven't already, install `Autodesk Fusion`. - Once Fusion is open, navigate to the `Utilities Toolbar`. -![image_caption](../tutorials/img/fusion/fusion-empty.png) + ![image_caption](../tutorials/img/fusion/fusion-empty.png) - Click on `Scripts and Add-ins` in the toolbar. -![image_caption](../tutorials/img/fusion/fusion-addins-highlight.png) + ![image_caption](../tutorials/img/fusion/fusion-addins-highlight.png) - Navigate to `Add-ins` and select the green plus icon. -![image_caption](../tutorials/img/fusion/fusion-addins-panel.png) + ![image_caption](../tutorials/img/fusion/fusion-addins-panel.png) - Now navigate to wherever you extracted the original `.zip` source code file you downloaded. - Make sure to select the folder that contains the `Synthesis.py` file, this is the entry point to the Exporter. -![image_caption](../tutorials/img/fusion/fusion-add-addin.png) + ![image_caption](../tutorials/img/fusion/fusion-add-addin.png) - Once the extension is added you should be able to see it under `My Add-Ins`. - Select `Synthesis` from the `My Add-Ins` drop down and click `Run` in the bottom right. -![image_caption](../tutorials/img/fusion/fusion-addin-synthesis.png) + ![image_caption](../tutorials/img/fusion/fusion-addin-synthesis.png) - The first time you run the extension it may prompt you to restart Fusion, this is totally normal. - Once you restart Fusion the extension will run on startup, you will be able to find it on the right side of the toolbar -under the `Utilities` tab. -![image_caption](../tutorials/img/fusion/fusion-utilities-with-synthesis.png) + under the `Utilities` tab. + ![image_caption](../tutorials/img/fusion/fusion-utilities-with-synthesis.png) Thanks for installing the Synthesis Fusion Exporter! For any additional help visit our [Synthesis Community Discord Server](https://www.discord.gg/hHcF9AVgZA) where you can talk directly to our developers. diff --git a/protocols/README.md b/protocols/README.md index b1f3f0e843..e6cf22f60b 100644 --- a/protocols/README.md +++ b/protocols/README.md @@ -5,11 +5,13 @@ The **mirabuf** folder is a pointer to a submodule which needs to be pulled down ## Fetching To pull down the submodule: + ``` $ git submodule update --init --recursive ``` to sync with new changes: + ``` $ git submodule sync --recursive ``` @@ -21,13 +23,13 @@ To run the following files or commands make sure that you are in the `synthesis/ ### Windows - Run `proto_compile.bat` while in the protocols directory - ``` - $ proto_compile.bat - ``` + ``` + $ proto_compile.bat + ``` ### Linux / MacOS - Run `proto_compile.sh` while in the protocols directory - ``` - $ ./proto_compile.sh - ``` + ``` + $ ./proto_compile.sh + ``` diff --git a/simulation/README.md b/simulation/README.md index 4f33881b3b..d7687effa4 100644 --- a/simulation/README.md +++ b/simulation/README.md @@ -1,6 +1,6 @@ # Synthesis Simulation -A collection of simulation tools and samples to help enchance the use of code simulation inside of Synthesis. +A collection of simulation tools and samples to help enhance the use of code simulation inside of Synthesis. ## SyntheSim diff --git a/tutorials/README.md b/tutorials/README.md index 5040df5063..544a33906b 100644 --- a/tutorials/README.md +++ b/tutorials/README.md @@ -6,9 +6,9 @@ These are the markdown files for the codelabs. ### Dependencies -1. [go](https://go.dev/doc/install) -2. [claat](https://pkg.go.dev/github.com/googlecodelabs/tools/claat#section-readme) -3. [nodejs](https://nodejs.org/en/download/) +1. [Go](https://go.dev/doc/install) +2. [Claat](https://pkg.go.dev/github.com/googlecodelabs/tools/claat#section-readme) +3. [Nodejs](https://nodejs.org/en/download/) ### Create Codelabs @@ -28,4 +28,4 @@ Using the make script will dump all the resulting codelabs into an `out/` direct ## Usage -Upload these to their correct locations on the webserver. Ask [@KyroVibe](https://github.com/KyroVibe) or contact a subteam lead. +Upload these to their correct locations on the web server. Ask [@KyroVibe](https://github.com/KyroVibe) or contact a subteam lead. diff --git a/tutorials/img/code-sim/can-config.png b/tutorials/img/code-sim/can-config.png index 332df79204..ffd5affa99 100644 Binary files a/tutorials/img/code-sim/can-config.png and b/tutorials/img/code-sim/can-config.png differ