-
Notifications
You must be signed in to change notification settings - Fork 51
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
More Simulation Support Pt.2 #1103
Conversation
show joint name in CAN config panel update robot code to use all the sim things
Verified that everything seems to be working. However, haven't been able to test Gyros yet.
Also included some minor tweaks.
Chorus detected one or more security issues with this pull request. See the Checks tab for more details. As a reminder, please follow the secure code review process as part of the Secure Coding Non-Negotiable requirement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress on Simulation. I'll be opening another branch to start working on the UI.
Description
Added support for more of the simulation devices supported by WPILib. Also fixed issue with resetting the brain of the robot every time a PWM Output Group was created so it's now possible to have more than one output group.
The aim of this PR is to add support for the most important items in the Hardware Messages section of the WPILib Hardware WS API docs. This does not include CAN motor support, which is being handled in #1050. All planned devices are listed in Objectives and are what I deem to be most important and worthwhile right now, but these could be subject to change and the list is open to suggestions.
Note
It's worth noting that controls are managed entirely by the HALSim GUI. The available USB devices are assigned to ports through the GUI, which are then read and fed to the robot code. The robot code sets motor outputs depending on the controller input, and the motor values are what's actually sent to fission.
Objectives
Testing Done
Important
In order for a controller to be appropriately mapped in the Sim GUI, you must enable the checkbox called "Map gamepad" in the Joystick menu. However, this does not appear when running the application on MacOS.
When unchecked, the joystick axes may not be accurate (e.g. the right joystick and L/R trigger axes may be swapped).
When testing, you can uncomment the commented out devices in
WPILibBrain.ts
. Make sure the inputs are updating appropriately in the simulator. You can see how the inputs are meant to update in in those lines you uncomment, and how the outputs are meant to update in the sample robot code.synthesis/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts
Lines 382 to 387 in 18cd843
JIRA Issue