Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #100

Merged
merged 3 commits into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
VOSS is a [PROS](https://pros.cs.purdue.edu/) library that makes writing autonomous code for VEX robots a piece of cake.

## Installing VOSS
1. Download the most recent [template](https://github.com/purduesigbots/VOSS/releases/tag/0.1.2)
1. Open a PROS terminal via the VSCode extention and run `pros c add-depot VOSS https://pros.cs.purdue.edu/v5/_static/beta/voss-depot.json`

2. Run this command from terminal `pros c fetch [email protected]`

3. `cd` into your pros project directory in your terminal
2. `cd` into your pros project directory in your terminal
3. run `pros c info-project`, your kernel version MUST be 4.0.7. If it is not, create a new 4.0.7 project by `cd` into the directory you want to make your project, and run `pros c n PROJECT_NAME -ea`.

4. Apply the library to the project `pros c apply VOSS`

Expand Down Expand Up @@ -51,7 +50,7 @@ auto ec = voss::controller::ExitConditions::new_conditions()
* **Track width**
- `.with_track_width(double track_width_distance)`
* **Left right TPI** (ratio of encoder rotations to 1 inch of linear movement)
- `.with_left_right_tip(double tpi_value)`
- `.with_left_right_tpi(double tpi_value)`
3. Call it to build --> `.build()`
```cpp
auto odom = voss::localizer::TrackingWheelLocalizerBuilder::new_builder()
Expand All @@ -75,7 +74,7 @@ void initialize() {
3. Divide the amount you moved the robot by the measured movement value from the odometry
* adjustment factor = robot actual move amount/odometry measured amount
4. Set the new tpi value to the current tpi value multiplied by the value you got from step 3
* new tip = old tpi x adjustment factor
* new tpi = old tpi x adjustment factor

### The basics of PID (Proportional Integral Derivative controllers)
* **Linear error** = Linear distance from desired position to current position (inches)
Expand Down Expand Up @@ -205,6 +204,11 @@ auto arc = voss::controller::ArcPIDControllerBuilder(odom)
* We will be creating a differential drive chassis in global scope
* Call `DiffChassis(std::initializer_list<int8_t> left_motors, std::initializer_list<int8_t> right_motors, controller_ptr default_controller, ec_ptr ec, double slew_step, pros::motor_brake_mode_e brakeMode)`
```cpp
#define LEFT_MOTORS \
{ -4, -1, -21, 8, 13 }
#define RIGHT_MOTORS \
{ 10, 3, 9, -7, -15 }

auto chassis = voss::chassis::DiffChassis(LEFT_MOTORS, RIGHT_MOTORS, pid, ec, 8, pros::E_MOTOR_BRAKE_COAST);
//we recommend using the pid controller as default controller
```
Expand Down