Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregk27/botbuilder
VSCode extension to facilitate robot development, designed based on style used by FRC team 2708
https://github.com/gregk27/botbuilder
Last synced: about 1 month ago
JSON representation
VSCode extension to facilitate robot development, designed based on style used by FRC team 2708
- Host: GitHub
- URL: https://github.com/gregk27/botbuilder
- Owner: gregk27
- Created: 2020-07-13T04:22:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T04:53:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T05:23:37.047Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Botbuilder
Botbuilder is a VSCode extension to assist in developing FRC java robots.## Features
### Sidebars
The extension features multiple sidebar treeviews outlining components of the robot.#### Subsystem View
The subsystem view shows a list of subsytem classes in the workspace. Classes are identified as subsystems if they directly extend `edu.wpi.first.wpilibj2.command.SubsystemBase`. Subsystems can be opened directly from this view, and their test classes can be executed.For each subsytem, the following is shown:
- Hardware components passed in the constructor, from the hardware list in `botbuilder.json` (name & type)
- Publicly accessible fields & all constants (name, scope, modifiers, type, value if final)
- Publicly accessible functions (name, parameters, return type)
- Publicly accessible enums and inner classes (name, fields/values, functions)![Subsytem View](https://github.com/gregk27/Botbuilder/blob/master/readme-res/subsystemView.png?raw=true)
#### Command View
The command view shows a list of command classes in the workspace. Classes are identified as command if they directly extend `edu.wpi.first.wpilibj2.command.CommandBase` or `edu.wpi.first.wpilibj2.command.InstantCommand`. Commands can be opened directly from this view, and their test classes can be executed.For each command, the following is shown:
- Whether the command is normal, instant, or autonomous (auto determined by package)
- Subsystems passed in the constructor (name & class)
- Publicly accessible fields & all constants (name, scope, modifiers, type, value if final)
- Publicly accessible functions (name, parameters, return type)
- Publicly accessible enums and inner classes (name, fields/values, functions)![Command View](https://raw.githubusercontent.com/gregk27/Botbuilder/master/readme-res/commandView.png?raw=true)
### Wizards
The extension also adds wizards for creating subsystems and commands#### Subsystem Wizard
The subsystem wizard allows for the simplified creation of subsystems. It has the following options:
- **Name:** Name of the subystem
- **Description:** A description of the subsystem that will be used as javadoc
- **Package:** The package where the subsytem will be placed
- **Create Test:** If checked, a test class will be created in the test folder (as defined in `botbuilder.json`). NOTE: For full functionality, [FRCMocks](https://github.com/gregk27/frcmocks) must be installed.
- **Hardware**: A list of hardware components required by the subsystem. These are passed to the constructor then stored in fields.
- **Type:** A dropdown list of hardware types defined in `botbuilder.json`
- **Name:** The name of the hardware component variable
- **Javadoc:** The javadoc describing the hardware component![Subsystem Wizard](https://raw.githubusercontent.com/gregk27/Botbuilder/master/readme-res/subsystemWizard.gif?raw=true)
#### Command Wizard
The command wizard allows for the simplified creation of commands. It has the following options:
- **Name:** Name of the command, a warning will be given if this does not meet the format `*Command`
- **Description:** A description of the command that will be used as javadoc
- **Package:** The package where the command will be placed
- **Auto:** If checked, the command will be placed in the autonomous package
- **Instant:** If checked, the command will extend `InstantCommand` and be placed in the instant package
- **Create Test:** If checked, a test class will be created in the test folder (as defined in `botbuilder.json`). NOTE: For full functionality, [FRCMocks](https://github.com/gregk27/frcmocks) must be installed.
- **Subsystems**: A list of subsystems required by the command. These are passed to the constructor then stored in fields.
- **Type:** A dropdown list of subsytems found in the workspace
- **Name:** The name of the subsytem variable
- **Required:** If checked, the `addRequirements` function will be called for this subsystem.
- **Javadoc:** The javadoc describing the subsystem![Command Wizard](https://raw.githubusercontent.com/gregk27/Botbuilder/master/readme-res/commandWizard.gif?raw=true)
## Requirements
The Botbuilder extension requires that the project be valid FRC Robot code.For full test building funcitonality, [FRCMocks](https://github.com/gregk27/frcmocks) is required. It can be automatically installed on initialization.
## Configuration
The extension uses it's own JSON configuration file. This file is created automatically when botbuilder is initialized.The location of this file is set by the VSCode setting `botbuilder.configPath`. The default is a file named `botbuilder.json` at the workspace root.
#### Package configuration
There are five configuration entries which are used to configure the packages for code elements. These are:
- **subsystemPackage:** The package where subsystems will be placed
- **commandPackage:** The package where commands will be placed
- **instantCommandPackage:** The package where instant commands will be placed
- **autoCommandPackage:** The package where auto commands will be placed. Additionally, commands in this package will be marked as autonomous in the command view
- **instantAutoCommandPackage:** The package where commands that are both instant and autonomous will be placed. Additionally, commands in this package will be marked as autonomous in the command view#### Build configuration
There are four configuration entries which are used to locate source and built files
- **baseClassName:** The name of the entry class, this will be used to determine the base package
- **srcFolder:** The java source folder
- **buildFolder:** The gradle build folder
- **testFolder:** The java test folder#### Hardware configuration
The hardware configuration is the list of hardware components that will be recognised by the extension. Components are broken into four categories: motorControllers, pneumatics, sensors, and other.Each component has the following properties
- **name:** The name of component's class
- **prettyName:** A pretty-print name to be used on the frontend
- **descriptor:** The [java descriptor](https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.2.1) for the component's class