ViperBots Progress Updates #288
Replies: 5 comments 1 reply
|
Was able to download the RHC2 IPK and then upload it as a tool in the SystemCore UI. Opened up the Rev Hardware Client, attached a A301 motor, and then was able to see it in the client. Downloaded the v2027.0.0-prerelease.12 and uploaded that firmware to the motor. Enabled using the driver station, and took control over the motor. Confirmed duty cycle, position, and velocity control all worked for the motor. Will repeat the process with all 8 A301s! |
Catching Up, Part 1: Bench Bringup (June)It has been a while since I last posted, apologies! Our ViperBots student representatives started meeting in person in July, and then all of our teams went back to school full time around the middle of August. Since then, teams have been preparing for the start of the season on top of a much heavier school load. Despite the ramp-up, we were still able to make a lot of progress. Rather than cram everything into one update, I'm going to catch up over a series of posts. My earlier posts were pretty brief, so this first one goes back to June and fills in the details of my bench bringup, up to the point where I handed the software off to our student software reps.
The Bench SetupEverything in this post was done on my desk with a single A301:
June 7: Flashing the OS and First DeployBefore plugging anything in, I read through the SystemCore README and our testing plan in FTC-Testing.md. Then I installed:
To flash the OS, hold the config button down with an Allen key while powering on the SystemCore. That puts it into flash mode, and Limelight Hardware Manager then recognizes it. The flash went through with no issues. After flashing, I confirmed that the SystemCore web UI loads over all three connections: Wi-Fi, Ethernet, and USB. If you've used a Limelight camera before, the web portal will feel very familiar. Next, I built the C++ Tank Drive Gamepad example, set up IntelliSense, and deployed it over Ethernet with nothing else connected. I enabled and disabled from the Driver Station and confirmed the mode change on the RSL/mode LED. I also tried importing our 2026 robot code into 2027. The import itself worked, but none of the vendor libraries we depend on were available for alpha 6 yet, so it wouldn't build. CTRE looked like it would work with June 8: A301 Assembly and FirmwareMechanical: I attached the 215 RPM gearbox to the A301, installed the spline output shaft, and held it in place with shaft collars.
Firmware: I followed REV.md:
All three worked. REV ships default PID gains, so a free-spinning motor is controllable in velocity and position mode without any tuning. That's a really nice out-of-the-box experience. The flip side is that there isn't much to configure yet, either in RHC2 or from code through REVLib. AdvantageScope: I also installed AdvantageScope as an app on the SystemCore, but it crashed when I launched it. However, RHC2 now has a Telemetry tab with signal graphing "powered by AdvantageScope." It let me plot the A301's voltage, current, and motor temperature live, along with encoder values, faults, and warnings.
Note that RHC2 lists the motor as June 10: First Motor Movement from Robot CodeI called It turns out this is a known gotcha (#286): MotionCore CAN bus IDs don't start at 0. Port D0 is bus 5, CAN ID 3. After changing the bus to 5, it worked immediately with no other changes. I was driving the A301 with an Xbox controller through the Driver Station, and I confirmed voltage and velocity control from code. What We Learned About CAN BusesThese are already known to most of you but these were in my notes from June so I am re-iterating again:
A Note for FTC TeamsFor FRC, the ecosystem doesn't change much. For FTC, the change is big: FTC is adopting most of the FRC ecosystem. Some things our FRC students take for granted are brand new to FTC, and from what other FTC alpha teams are posting, they're tripping people up:
Because of this, our FRC and FTC students attend all of our SystemCore meetings together for cross-training. Handing OffWith a motor spinning from robot code, I handed the software off to our student software reps. The goal: an FTC-sized mecanum chassis with four A301s running Valkyrie, with high-caliber code that works the first time it's deployed because it was already verified in simulation. In priority order:
Next post: getting that mecanum drive moving on a real FTC robot. |
Catching Up, Part 2: One Codebase for FTC and FRC (June–July)After my bench bringup, our student reps took over the software. From the start, our goal has been a single codebase that every ViperBots team can use: our 10 FTC teams and our FRC team. SystemCore is the first time that's realistic, because FTC and FRC now share WPILib, the vendor libraries, and the tooling. This post covers the software work from mid-June through mid-July. Most of it was done in simulation, before we had a robot to drive. All of the code referenced here is public on the The Team
The FTC rep started with the same steps I did: read through Our FRC software rep pointed the FTC rep to Valkyrie's mecanum implementation as a reference. Since FTC is now on WPILib, the classes are the same whether you're in C++ or Java, so FRC code works as a reference for FTC students. That's already paying off for cross-training. June 9–10: Porting Valkyrie to 2027Valkyrie is our year-agnostic C++ library of wrappers around motor controllers, drivetrains, gyros, and sensors. Our FRC software rep ported it to 2027 on a separate branch, with the goal of using it for both our FRC and FTC teams. As of June 9, everything converted except code that depended on vendor libraries that weren't available yet:
Most of the port was renaming. For example, Lesson learned: Vendor readiness set our pace more than WPILib did. As each vendor shipped a 2027 alpha, that code came back online. Today the branch builds against Phoenix 6 We also set up a new barebones 2027 robot project for SystemCore testing, with just Design Lesson: Abstract the Hardware, Not Just the MotorsValkyrie is built around vendor-agnostic interfaces. Our swerve drive already proved the idea with
Feedback on the A301: Writing Design Lesson: CAN Bus Naming Isn't Consistent Across Vendors YetOnce CTRE released Phoenix 6
We don't want each controller taking whatever its vendor prefers, because then swapping a motor also means changing how its bus is specified, which defeats the purpose of Valkyrie. Our REV-based controllers ( Feedback: A single shared way to name SystemCore and MotionCore buses across WPILib and every vendor would remove a whole class of mistakes. That's especially true for FTC teams, who are used to plugging motors into numbered ports and have never had to think about CAN buses. Simulation FindingsSimulation mostly worked on 2027 alpha 6, with two problems:
Vision: Why USB-Camera AprilTags Matter More for FTCMy original plan included AprilTag localization from a USB camera plugged directly into the SystemCore. After reading #246, I suggested we skip it for now, but our software rep had already built a USB-camera AprilTag sensor. It supports two modes:
This matters much more for FTC than for FRC. Most competitive FRC teams run vision on an off-board coprocessor, but many FTC teams will only have the SystemCore. As one of our mentors put it, running a single camera on the SystemCore is cool, but don't expect great performance. Feedback: The current AprilTag vision example is a lot of code for an FTC student to work through. A higher-level, WPILib-provided helper for USB-camera AprilTag pose estimation would go a long way for FTC teams. Next post: our July open labs, and the saga of updating our A301 firmware. |
Catching Up, Part 3: July Open Labs and the A301 Firmware SagaBy early July, the software was in good shape in simulation, and it was time to get hardware in front of students. We scheduled two optional open labs at the school (July 15 and July 22, 4–8 PM) with the goal of getting a robot moving. Instead, most of July went to one problem: getting our A301s onto new firmware. This post covers what went wrong, what finally fixed it, and what we'd tell other teams. July 15: Open Lab 1Our FTC rep's notes from the first lab:
This was the same failure described in #330. We confirmed:
This mattered more than just one lab. REVLib Trying a Bridge DeviceNext, we tried updating the A301s through another REV device acting as a bridge, first a PDH and then a SPARK MAX, wired to our "drybones" test chassis. Both times, RHC2 identified the A301 as a SPARK MAX. We flashed the Feedback: When a tool doesn't recognize a device, it should say so rather than falling back to a different device type. Better still, a firmware update that didn't apply should fail loudly instead of reporting success. July 16: Finding the Root CauseThe morning after the lab, our FRC software rep reread the docs and found the real problem. The SystemcoreTesting docs say firmware RHC2's own changelog explained everything we had seen. A301 support was added in
Feedback: Please put Getting UnstuckA few things came together over the following weeks:
One more thing we noticed along the way: it's unclear whether the MotionCore itself needs firmware updates, and how to do them if it does. For FTC teams, the MotionCore is where every motor plugs in, so a clear answer here would help. |
Catching Up, Part 4: An FTC Mecanum Drive on SystemCore (August)With the A301s finally on current firmware, it was time to put everything on a real FTC robot. This post covers getting a mecanum drive running on SystemCore in late August, and the feedback our students collected along the way.
The RobotInstead of building a new chassis, we borrowed the rookie camp robot from one of our FTC teams (16311 Recoil). It's a standard FTC mecanum chassis, and we swapped in four A301s with 215 RPM gearboxes. The SystemCore mounts on top, the MotionCore sits underneath, and everything runs off a Milwaukee M18 battery.
By the end of our first session with the robot, the driver's gamepad was controlling all four motors through Valkyrie. It wasn't driving like a mecanum robot yet, because two things were still wrong:
Both were quick fixes. By August 27, we had a full mecanum drive moving on the field. How the Code Came TogetherThis is where the work from Part 2 paid off. The robot uses the same What We Verified
IMG_6639.MOVLesson learned: Our one real bug was that the wheel positions we passed into FeedbackWhat we liked:
Areas for improvement:
|





Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ViperBots out of Austin TX is composed of 10 FTC and 1 FRC team. We will be getting student representatives from all teams to participate in the alpha.
This includes teams:
FTC 4545 OUROBOROS
FTC 4546 SNAKEBYTE
FTC 6209 VENOM
FTC 6210 STRYKE
FTC 6299 QUADX
FTC 7161 HYDRA
FTC 11503 HYPERFANG
FTC 12596 COPPERHEAD
FTC 16311 RECOIL
FTC 18030 LEVIATHAN
FRC 6800 VALOR
We received our kit on Friday, and so far have powered it up and successfully flashed beta 10. Downloaded the driver station and have confirmed connectivity over ethernet.
Built the Tank Drive Gamepad example in C++, setup intellisense, and then deployed to the Systemcore with no other motors or anything hooked up. Confirmed Enabling and Disabling via the RSL light LED ("mode").
Looks good and is ready to go for the 2 tests. Will start with the A301s and then migrate to a robot when ready.
All reactions