Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Behavior of motor following across separate CAN buses

未关闭
#402 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
java
领域
embedded-iot

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Java
星标
190
派生
25
平均合并
6 小时 28 分钟
30 天内合并 PR
12

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wpilibsuite/SystemcoreTesting 的其他 Issue

查看 wpilibsuite/SystemcoreTesting 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。