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

More Simulation Support #1077

Merged
merged 7 commits into from
Aug 17, 2024
Merged

More Simulation Support #1077

merged 7 commits into from
Aug 17, 2024

Conversation

PepperLola
Copy link
Member

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

  • Encoder support
  • Joystick support through Sim GUI
  • Gyroscope and Accelerometer support
  • Digital and analog sensor support

Testing Done

  • Test driving robot with two different PWM motors
    • Ensure encoders update appropriately

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).

JIRA Issue

@PepperLola PepperLola self-assigned this Aug 1, 2024
@PepperLola PepperLola added the codesim Code simulation related task. label Aug 1, 2024
@PepperLola PepperLola changed the base branch from prod to dev August 1, 2024 22:17
@azaleacolburn azaleacolburn mentioned this pull request Aug 7, 2024
9 tasks
@HunterBarclay HunterBarclay merged commit df28bf6 into dev Aug 17, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codesim Code simulation related task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants