Huskie Robotics is proud to announce the 3061 Lib v2023.1.0 release. This release is a back port of our 2023 season code, which will be released later.
3061-lib is a starter project and library focused on a swerve-based drivetrain. Supports SDS MK4/MK4i swerve modules using 2 Falcon 500 motors and a CTRE CANCoder, a CTRE Pigeon Gyro, and REV Robotics power distribution hub and pneumatics hub. However, due to the hardware abstraction layer, this code can be adapted to other motor controllers, encoders, and gyros as well as different swerve module designs.
Features (new features in bold)
- multiple robots with different configurations, including a simulated robot with basic simulation of swerve modules
- logging and replay via AdvantageKit
- vision subsystem supporting multiple Photonvision based cameras to update pose estimation
- move-to-pose command that generates on-the-fly paths using a field model defined by a set of regions and transition points between regions
- CAN FD (CANivore) to reduce CAN bus utilization
- commands
- drive-to-pose (closed loop straight-line motion to pose)
- rotate-to-angle (closed loop rotational setpoint with optional driver-controlled translational motion)
- swerve-specific features
- robot-relative and field-relative driving modes
- slow mode for fine-tuned motion
- acceleration limiting when not in “turbo” mode
- current limiting configuration for motors
- x-stance
- leave wheels rotated in last direction when not driving to enable smooth continuation of motion
- switch drive motors to coast mode when robot is disabled and has stopped moving for a period of time to facilitate manual pushing
More details are available in the release notes and README.