Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Behavior of motor following across separate CAN buses

Open
#402 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
java
Domain
embedded-iot

Research direction

Start by reproducing the example with two CANBus instances and the TalonFX Follower control, then compare real-world behavior with CTRE simulation. The issue does not identify files or tests, and leaves open whether to warn, error, or support following across buses and whether behavior should be standardized. Done would require a decided behavior and a way to verify it, but the issue provides no acceptance criteria.

Written by the indexing model from the issue text.

Description

Let's say you have the following piece of code:

CANBus s0 = new CANBus(CANPort.CAN_S0);
CANBus s1 = new CANBus(CANPort.CAN_S1);
TalonFX motor1 = new TalonFX(0, s0);
TalonFX motor2 = new TalonFX(1, s1);

motor2.setControl(new Follower(motor1.getDeviceID(), MotorAlignmentValue.Aligned);

The current behavior with CTRE motors is that motor2 does nothing if motor1 is given control signal and nothing else, which is expected given an understanding of how the CAN bus works, but should this behavior be changed? Either to make it possible or give the user a warning/error in this situation? Should the behavior be standardized across vendors? Possible options are:

  • Throw an error/warning at compile time
  • Send warning messages on runtime
  • motor2 follows motor1: Would require sending CAN packets across multiple CAN buses and breaks conventional knowledge of how the CAN bus works. This however would make the behavior consistent with FTC and Motioncore, given that each device on Motioncore is technically on a separate CAN bus. You would then have to deal with the case of CAN devices having the same ID but on separate CAN buses.

Side note is that current CTRE's simulation does not reflect the real-world behavior of this where the following motor appears to match the leader motor.

Dominant language
Java
Stars
188
Forks
24
Avg merge
5h 59m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wpilibsuite/SystemcoreTesting

All issues in wpilibsuite/SystemcoreTesting

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.