Skip to content

Stage 1A: Adjustments - #291

Open
Adrianamm wants to merge 8 commits into
frcsoftware:mainfrom
Adrianamm:readthrough
Open

Adrianamm wants to merge 8 commits into
frcsoftware:mainfrom
Adrianamm:readthrough

Conversation

@Adrianamm

@Adrianamm Adrianamm commented Sep 15, 2026

Copy link
Copy Markdown
Member

Description

What changed?
Followed 1a and made adjustments

Meta

Merge checklist:

@github-actions github-actions Bot added Curriculum material Curriculum materials, lessons for students, etc stage1 labels Sep 15, 2026
@github-actions

Copy link
Copy Markdown

🌐 Preview URL: https://pr-291-frcsoftware.frcsoftware.workers.dev

@Adrianamm Adrianamm added this to the First Publish milestone Sep 15, 2026
@Adrianamm
Adrianamm marked this pull request as ready for review September 17, 2026 04:02
Luckily, your computer can also run robot code allowing it to be tested without a robot.
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 estimate how the physical mechanism would respond.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.

The first important window is the Sim GUI.
The Sim GUI is automatically opened when simulating code and acts as both a Driver Station and shows information about simulated devices such as position and velocity.
The Sim GUI is automatically opened when simulating code.
It acts as both a Driver Station and shows information about simulated devices such as position and velocity.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It acts as both a Driver Station and shows information about simulated devices such as position and velocity.
It acts as a Driver Station and shows information about simulated devices such as position and velocity.

</Aside>

When creating a motor controller object, the physical motor controller's CAN ID and the CAN Bus ID are given.
When creating a motor controller object, the physical motor controller's CAN ID and the CAN Bus IDs are given to the program in the constructor.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When creating a motor controller object, the physical motor controller's CAN ID and the CAN Bus IDs are given to the program in the constructor.
When creating a motor controller object, the physical motor controller's CAN ID and the CAN Bus must be provided in the constructor.

This will cause the motors to spin in a direction that would drive the robot forward when a positive input is given.
Since the motors on the right side of the drivetrain are facing the opposite direction they would cause the wheels try and drive the robot backwards when given a positive input if they were configured the same way.
Instead they should be configured with an invert setting of `false` or `CounterClockwise_Positive` so they also drive the robot forward when given a positive input.
Since the motors on the right side of the drivetrain are facing the opposite direction they would cause the wheels to try and drive the robot backwards when given a positive input if they were configured the same way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Since the motors on the right side of the drivetrain are facing the opposite direction they would cause the wheels to try and drive the robot backwards when given a positive input if they were configured the same way.
Since the motors on the right side of the drivetrain are facing the opposite direction, they would cause the wheels to try and drive the robot backwards when given a positive input if they were configured the same way.


To control the robot with joysticks a Teleop OpMode needs to be created that periodically gives the `DifferentialDrive` instance new values from the controller.
First an instance of `XboxController` needs to be created.
In `MyTeleop.java`, an instance of XboxController needs to be created.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In `MyTeleop.java`, an instance of XboxController needs to be created.
In `MyTeleop.java`, an instance of `XboxController` needs to be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Curriculum material Curriculum materials, lessons for students, etc stage1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants