Conversation
|
🌐 Preview URL: https://pr-291-frcsoftware.frcsoftware.workers.dev |
Co-authored-by: Andrew Haselton <13470989+roboteer5291@users.noreply.github.com>
|
🌐 Preview URL: https://pr-291.frcsoftware.org Changed pages |
| Create an instance of the `DrivetrainSim` class under the `DifferentialDrive` instance using the left and right Leader motors as inputs. | ||
| This class will read the voltage commanded to the motors and, using its physics sim, update the motor controllers with new positions. | ||
| The class will then publish the new drivetrain position and additional motor data so it can be viewed in AdvantageScope. | ||
| AdvantageScope is a program that is bundled with WPILib, and is used to visualize data sent by the robot. |
There was a problem hiding this comment.
Why did this line get moved to here?
There was a problem hiding this comment.
because it's the first mention of AScope so I thought it would make more sense to explain it there
There was a problem hiding this comment.
That makes sense. I'd maybe change it to more have this instance talk about the capabilities of AScope, and have the previous location include the bundled with wpilib bit (so that the user knows they don't have to install it).
Co-authored-by: Andrew Haselton <13470989+roboteer5291@users.noreply.github.com>
| While there are some things that can be tested by simulating pure robot code, there are no physical motors to move and respond with new positions. | ||
| Instead we use simulation classes that use physics to take the desired input voltage to the motors and estimate how the physical mechanism would respond and update our motor controller instances to match. | ||
| Instead, we use simulation classes that use physics to take the desired input voltage to the motors and model how the physical mechanism would respond. |
There was a problem hiding this comment.
this says 'while some things can be simulated...instead we simulate motors'.
| WPILib provides a class to convert joystick inputs into commands for the motors to follow called `DifferentialDrive`. | ||
|
|
||
| An instance of `DifferentialDrive` should be created under where the motor controllers were declared. | ||
| An instance of `DifferentialDrive` should be created under where the motor controllers were first declared. |
There was a problem hiding this comment.
nitpick: it should be constructed where they're constructed, since it needs them to have been instantiated. If you try to construct it where they're declared, but they haven't been constructed, you can get an error
Co-authored-by: Tim Winters <twinters007@gmail.com>
Description
What changed?
Followed 1a and made adjustments
Meta
Merge checklist: