- Removed the automatic use of
MultiEncoderfor(Double)DjiMotor.- Can be reenabled with the option
taproot:core:use_multi_encoder
- Can be reenabled with the option
- Inverted the gear ratios in
DjiMotorEncoderso that they are output/input. - Changed Butterworth filter to a function that returns a coefficients struct to avoid issues with accidentally switching the forced and natural response coefficients
- Added
Odometry2DInterface::overrideOdometryPosition. - Butterworth filter generation now supports lowpass, highpass, bandpass, and bandstop.
Transformnow stores translational velocity and acceleration, as well as angular velocity.compose()ing such "Dynamic Transforms" correctly updates all derivatives.staticCompose()can be used to ignore derivatives if they're not needed to reduce computation.projectForward()projects the transform forward in time.
- Added
DynamicPositionandDynamicOrientationclasses, which also store their derivatives. ImuInterfaceno longer containsgetTempin order to support more inertial measurement sources- Breaking: All IMU related values are now in radians. (
get[Roll/Pitch/Yaw]()in rad,getG[x/y/z]()in rad/s) - Added Butterworth filter coefficient generation. -When constructing a butterworth filter of n order pass in the sample time difference and cutoff frequency in radians/s to obtain a list of coefficients for use in the discrete filter.
- Added discrete filter object
-Takes in a list of natural and forced response coefficients; will compute the next filtered value when .filterData() is called.
.reset()clears the natural and forced response but keeps the coefficients..getLastFilteredValue()gets the last filtered value. - Updated to Ref Serial v1.7.0.
- Removed all references to Standard 5.
- Removed chassis
power,voltage, andcurrentfields. - Additional RMUC changes.
- Added
VoltageSensorInterface. PowerLimiteralso takes in aVoltageSensorInterface*.- Brought
bmi088.read()in line with thempu6500.read()method, which now waits to read till the sampling frequency is reached. - IMUs extending
AbstractImucan now have a mounting transform applied. - Added ARUW's Can Encoder.
- Removed limitation of
0x1E4to0x224on CAN IDs. - Added Encoders
- Added
EncoderInterface, which is a interface for all possible encoders.getPosition()returns aWrappedFloatfor the position in radians.getVelocity()returns afloatin radians/second.isOnline()returnstrueis the encoder is online.resetEncoderValue()zeros the encoder to its current location.alignWith(EncoderInterface*)aligns the position ofthisencoder to another encoder.
- Added
WrappedEncoder, which is an base class for all encoders that have a certain number of ticks per revolution.- The constructor takes a gear ratio, which is output rotations over input rotations.
- Calculates the velocity as the instananeous difference between two positions and the timestep.
getEncoder()returns the raw encoder value as aWrappedFloat.- Can be inverted, similar to motors.
- Added
MultiEncoder, which allows the combination of multiple encoders into a single encoder.- Has a primary encoder (first in the array), that is used to align other encoders.
- Averages out the position and velocity of all online encoders.
- Added
MotorInterface::getEncoder()- Replaces the use for the encoder related methods in the interface, which have been deprecated.
- Removed the
getEncoderWrappedandgetEncoderUnwrappedmethods as those no longer make sense.
- Added
DjiMotorEncoder- Refactored version of the encoder that was in
DjiMotor getShaftRpm()returns the shaft rpm reported by the encoder.- Moved the gear ratios from
DjiMotorto this class.
- Refactored version of the encoder that was in
- Modified
DjiMotorandDoubleDjiMotorconstructors.- No longer able to specify the starting position and rotation count.
- Added parameters:
gearRatio, defaults to 1.encoderHomePosition[One], defaults to 0.externalEncoder, defaults tonullptr.
- Added
- Removed a lot of
drivers.hppanddji_motor.hppincludes where not needed.- Moved
MotorIdintodji_motor_ids.hpp
- Moved
- Testing
- Made it possible to specify the raw encoder position and shaft rpm to
DjiMotorEncoderMockto minimize test changes. - Can now specify
test="..."to run specific tests that match GTest's regex. Only available in test-project, but code is copyable.
- Made it possible to specify the raw encoder position and shaft rpm to
- Added proper build caching to speed up pipelines, taproot only.
- Made IMU getters
const.
- Added
AbstractIMU.- Combines the shared logic between the
Bmi088andMpu6500IMUs. - Has an internal mahony for computing pitch/roll/yaw.
- Designed for interactions with IMU devices, while
ImuInterfaceis now for generic IMU data.
- Combines the shared logic between the
- Implemented SH1107 functionality with the ability to rotate the screen 90 degrees.
- Added support for current control on GM6020 motors.
- Updated
GovernorWithFallbackCommandsuch that if the governed command is selected, the command stops if any governor is finished. Also stops the fallback command if all governors become ready.
- Added
SequentialCommand- Allows running multiple commands in order.
- Added
Concurrent[Race]Command- Allows running multiple commands at the same time.
- The race variant ends when any command has finished, while the normal variant waits for all to finish.
- Refactored the hardware testing feature.
- Hardware tests are now done through commands set with
Subsystem::setTestCommand - Hardware tests now only run when the robot is out of safe disconnect mode.
- All tests are runnable with
CommandScheduler::runAllHardwareTests, while individual tests can be run withCommandScheduler::runHardwareTest(const Subsystem*) - Similarly,
CommandScheduler::stopAllHardwareTestsandCommandScheduler::stopHardwareTest(const Subsystem*)exist. CommandScheduler::isRunningTest(const Subsystem*)returns true if the subsystem is running a hardware test.CommandScheduler::hasPassedTest(const Subsystem*)returns true if the subsystem has passed a hardware test.CommandScheduler::countRunningHardwareTests()returns the number of hardware tests currently running.- Hardware Test Menu:
- The tests now must be manually run and don't start when the menu is open.
- There is now a line showing how many tests are running.
- Each test is individually runnable and stoppable.
xis shown for failed/incomplete tests,+is shown for passed tests.
- Hardware tests are now done through commands set with
- Updated the
mpu6500andbmi088to allow for variable temperature setpoints. This was done as in testing, the type C board was found to operate at a lower tempreature than the type A. - Updated
MahonyAHRSfor IMUs to no longer include the 180 degree offset. IMUs will now intitialize at 0 degrees.
- Removed
Subsystem::isHardwareTestComplete,Subsystem::setHardwareTestsIncomplete,Subsystem::setHardwareTestsComplete,Subsystem::runHardwareTests,Subsystem::onHardwareTestStart,Subsystem::onHardwareTestComplete - Removed
CommandScheduler::startHardwareTests,CommandScheduler::stopHardwareTests
- Added some more utility functions to
WrappedFloatwithinRange,rangeOverlapcan be used to deal with wrapped rangeswithSameBoundsandAngle::fromDegreescan be used to constructWrappedFloats- Fixed a bug with how
revolutionswas calculated
- Bmi088 now has seperate
periodicIMUUpdateandreadmethods.periodicIMUUpdateshould be called at a fixed rate of mahony, andreadshould be called at a rate such thatperiodicIMUUpdate<=read<= sampling rate. - The
Angleclass withinWrappedFloatnow has bounds of 0 to 2pi as opposed to -pi to pi. This affects values gotten fromgetWrappedValue().
- Added
taproot:modm-project.xml:modm_hal_modulesoption to include additional user-defined modm modules.
- Reduced max Ref Serial Transmission from
1280bytes to1000bytes per second. - Improved calculation for Ref Serial Transmitter timer lengths.
- Fixed bug where
VerticalScrollLogicHandler::getLargestIndexDisplayed()returns index out of bounds when size is less than max entries - Substituted uses of
UnjamIntegralCommandwith new marker interfaceUnjamCommandInterfaceto allow custom agitator unjam behavior. Any desired unjam behavior can be put into an implementer ofUnjamCommandInterfaceand fed into theMoveUnjamIntegralComprisedCommand. - Added copy assign operators to
transforms::Positionandtransforms::Vector, as well as dot product, magnitude, and interpolation helpers. - Expand
DjiSerialRx buffer to 1024 bytes. - Remove check in
addMap()preventing mappings with equal remote map states to allow for different command mapping implementations with different behaviors using the same remote state.
- Ballistics now uses
AbstractKinematicStateinstead ofMeasuredKinematicState. This is a breaking change.- The previous functionality is still present in
SecondOrderKinematicState, so migrating over would involve replacing all usages ofMeasuredKinematicStatewith this. - This allows teams to define custom motion models for their kinematic states by extending
AbstractKinematicStateand implementingprojectForward(float dt) - Accessing the initial position has been replaced with
.projectForward(0)
- The previous functionality is still present in
- Updated Ref Serial to support version 1.6.1. This has major breaking changes, but these are nessecary for working robots. See this document for more information.
- Added gear ratios and max outputs for more motors to
DjiMotoras constants. - Added in I2C support for development board type A.
- Make
Subsystem::getName()const. - Replaced
ContiguousFloatwithWrappedFloat- "
[x]=" operators are now overloaded for arithmetic between WrappedFloats with identical bounds (ReplacesWrappedFloat.shiftUp/Down) WrappedFloat.differenceis nowWrappedFloat.minDifferenceand returns a floatWrappedFloat.get/setValueis nowWrappedFloat.get/setWrappedValue, with the addition ofWrappedFloat.get/setUnwrappedValue
- "
- Added in constants for motor max output for the GM6020 and C620 motor controller
- Minor change to command mapping to allow for easier extended command mappings
- Updates to transform to compute roll, pitch, and yaw
- Updated IMU with fixes to calibration and added support for variable calibration periods
- Actually wait for semaphore to be released in ref serial transmitter before trying to write again.
- Added
registerAndInitializefunction totap::control::Subsystemto simplify the repetitive process of registering & initializing subsystems.
- Added
timeRemainingmethod toTimeoutclass.
- Check to make sure message length of interrobot communications is not 1 byte; it seems that this is an undocumented requirement for a successful transmission.
CMSISMatsupports costly copy constructor/assignment
Positionclass andVectorclass which represents a difference inPositions- These differing types allow transforms to be more clear about the mathematical objects they operate on
OrientationclassTransformclass which represents a transformation from one coordinate frame to another.- Added
crossandfromEulerAnglestomath_user_utils
- SafeDisconnect mode is now handled with
refreshSafeDisconnect, which is run instead ofrefreshwhen in SafeDisconnect.- SafeDisconnect will still deschedule all commands when it is entered
- Fix: All subsystems must now override
refreshandrefreshSafeDisconnect
ChassisSubsystemInterfaceno longer has aget\[Left/Right\]\[Front/Back\]RPM()method- Fix: Remove
overridefrom these method headers
- Fix: Remove
MotorInterfaces can now have their motor encoder values zero'dBilinearInterpolator: Can interpolate between values within a map of<(x,y), VALUE>CMSISMatnow has negate and scale operatorsCanclasses are now protected instead of privatetaproot-scriptssubmodule has been updated so that different taproot branches can be tracked instead of justreleaseordevelop
tap::motorInterfacehas two new methods to get position in radians. This is implemented already inDjiMotorandDoubleDjiMotor.addsinterpolateLinear2D` to math_user_utils, which is a bilinear interpolator for regularly-spaced datasets.
Remote::getWheelremoved and replaced with a new (normalized) option forRemote::getChannel.
MotorSimandDjiMotorSimHandlerAPIs slightly changed, though functionality remains the same.- Ballistics now provide projectile travel time as an output parameter
GovernorLimitedCommandadded, a wrapper command that allows one to specify various conditions for the command being wrapped to run (!206).RefSerialData'sMechanismIDenum values were changed to reflect changes in the RoboMaster ref serial protocol.IntegrableSetpointSubsystemand associated commands added. This allows you to move the integral of some setpoint around. An example of where this is useful would be velocity control of a motor, where you want to directly control the velocity of the motor and indirectly control the position (!188).- Ballistics now provide projectile travel time as an output parameter
- Ref serial transmitter class added, which pulls out transmission-related code from the
RefSerialclass. Furthermore, functions that transmit directly handle bandwidth considerations in theRefSerialTransmitterclass. An instance of this class should be instantiated for each protothread that ref serial transmissions will be performed in (!161, #175). - Ref serial data
AddGraphicOperationenum renamed toGraphicOperation. taproot:modm_repo_lboption has been removed since it is not necessary for the user to specify this (!181, #82)
- Ref serial transmitter class allows for multiple protothreads to safely and concurrently interact with the ref serial UART port (!161, #175).
- Ref serial receiver now decodes game type and warning status information (!184).
- The
Mpu6500object is now generated from the moduletaproot:communication:sensors:imu:mpu6500.mpu6500.hppis now in the directorysrc/tap/communication/sensors/imu. The namespace structure has been updated accordingly (#18, !119). - The
Mpu6500TerminalSerialHandlerhas been renamed toImuTerminalSerialHandler. This driver is no longer generated as part ofdrivers.hpp. You should put this object in your drivers object if you want to use it. This serial handler now takes in a pointer to aImuInterfaceobject (#18, !119). SmoothPidconstructor that takes in individual gains (as opposed to a parameter struct) removed (!163).
- Unit tests added for
Remoteclass. - Minor improvements to
DjiMotorTxHandlerclass. Some API function names have been changed. ImuInterfaceadded such that IMUs can be interchanged in various situations (#18, !119).ImuMenuadded that prints information about an instance of anImuInterface(#18, !119).- Zero-length UART messages are no longer thrown out by DjiSerial class.
- CAN 2 pin defines for the Type C board are no longer incorrect (!165).
- Namespace
tap::serialrenamed totap::communication::serial. DJISerialclass no longer has asendfunction because it was clunky and unintuitive to use.
- The BMI088 IMU on the RoboMaster Development Board Type C is now supported. The API is very
similar to the
Mpu6500class, with functions to get the accelerometer/gyroscope/angle data. The IMU by default connects but doesn't calibrate when theinitializefunction is called. To calibrate the IMU, call therequestRecalibrationfunction, which will cause the IMU to stop computing angle data for a couple seconds while the IMU is calibration. For calibration to be performed correctly, the BMI088 should be level (#18, !96). - To compliment the referee serial class, a new
StateHudIndicatorobject added to store state and update graphics based on its internal state (!102). - Minor cleanup to the
DJISerialclass (including tests). - Add some utilities to the
DJISerial::SerialMessageclass. - Add generic
RemoteMapStateconstructor (!137). - Fixed
Profilerclass. You can now use thePROFILEmacro when profiling is enabled without the system running out of memory. - Add parameters to
Bmi088initializefunction to allow the user to configure gains on the Mahony algorithm, addresetfunction to Mahony algorithm (!141)
tap::controls::ControlOperatorInterfacehas been removed from Taproot. We have added it to our personal open-source project, aruw-mcb for those who would like to keep up with our implementation of that feature, but it will need to be added/implemented externally going forward in order to keep the functionality it provides.tap::controls::chassis::PowerLimiterAPI changed significantly. The constructor now takes in less parameters than before and their purpose is different. Also, rather than modifying motor outputs directly, the power limiter returns a fraction and it is the user's responsibility to multiply the motor output by this fraction.- in the
Mpu6500class, function calledinitializedchanged togetImuStatesince the mpu's hardware can be "initialized" but not necessarily calibrated/ready to use. Mpu6500class containsrequestCalibrationfunction, which when called the mpu6500 enters a calibration state and the mpu6500 recomputes calibration parameters (!12, #123). You should call this function in user code to ensure proper calibration of the IMU.- The
HoldRepeatCommandMappingrequires an extra parameter in its constructor. See all changes for more details. - Almost everything in
tap::control::setpointhas changed (!49). Most will fail loudly (i.e.: will cause compilation errors). Those that are potentially more insidious are documented below:- Order of parameters in constructor for
tap::control::setpoint::MoveUnjamComprisedCommandchanged (grouped by usage now). This is VERY IMPORTANT to catch and check as compiler may not throw warning.
- Order of parameters in constructor for
- When testing,
setTimehas bene replaced by aClockStubobject that you should use to control the time in the context of a test.
DjiMotorcomments improved (!95).- Small improvement to command scheduler subsystem refresh loop logic.
tap::communication::sensors::current::CurrentSensorInterfaceandAnalogCurrentSensoradded, which are software constructs for current sensors.- Power limiting logic improved and simplified, interfaces with a generic
CurrentSensorInterface(!92). - Taproot tests now build on Windows without warnings (!103).
tap::controls::ControlOperatorInterfacedeprecated (!105).tap::controls::turret::TurretSetpointCommanddeprecated.- Tests added for commands in
tap::control::setpoint(!49) Mpu6500class containsrequestCalibrationfunction, which when called the mpu6500 enters a calibration state whenisReadyreturnsfalseand the mpu6500 recomputes calibration parameters.HoldRepeatCommandMappingnow has an extra parameterendCommandsWhenNotHeld. When set to false, commands are not forcibly ended when the remote state transitions from being held to hot held and instead are left to end naturally (or until interrupted by something else) (#95, !114).- Print a clearer error message when the chosen compiler is not found on PATH. (!97)
- HAL options may be now passed to modm's project.xml file (!116).
- Support for UART ports 7 and 8 added to dev board type A (!116).
- Baud rates in
dji_serial.cppconfigurable via the project.xml file (#50, !116). - Various improvements to the commands in
tap::control::setpoint(!49).- Unjamming logic more straightforward.
- MoveCommand pause after rotate time now functions as described.
- A
ClockStubobject has been added to allow the user to control the time during testing. This is a more refined approach that replaces thesetTimefunction previously insrc/tap/arch/clock.hpp.
- The
ErrorControllernow no longer displays errors on the LEDs of the RoboMaster Type A board. Now, to create an error using theRAISE_ERRORmacro, you only pass in a pointer to atap::Driversobject and a description (i.e.RAISE_ERROR(drivers, "crc failure")). - Minor cleanup to the
RefSerialobject. Some fields in theRefSerialclass now useMODM_FLAGSX. See modm's documentation for how these work. Structs and enum values previously stored directly inside theRefSerialobject now must be prefixed byRxorTx. tap::communication::serial::ITerminalSerialCallbackinterface renamed totap::communication::TerminalSerialCallbackInterface.- The drivers object is now generated in
taproot/src/taprather than in some user directory. To append your own drivers to thetap::Driversobject, inherittap::Drivers. tap::controls::chassis::PowerLimiterAPI changed significantly. The constructor now takes in less parameters than before and their purpose is different. Also, rather than modifying motor outputs directly, the power limiter returns a fraction and it is the user's responsibility to multiply the motor output by this fraction.- in the
Mpu6500class, function calledinitializedchanged togetImuStatesince the mpu's hardware can be "initialized" but not necessarily calibrated/ready to use. Mpu6500class containsrequestCalibrationfunction, which when called the mpu6500 enters a calibration state and the mpu6500 recomputes calibration parameters (!12, #123). You should call this function in user code to ensure proper calibration of the IMU.
- Tests were added to the referee serial class. Minor logic/bug changes were made based on the tests (!80, #80).
- Robot-to-robot interaction handling was added to the
RefSerialclass. One can send a robot-to-robot message viasendRobotToRobotMsgand register a callback with theRefSerialobject viaattachRobotToRobotMessageHandler. This functionality is still in the beta-testing phase and needs further validation (!80, #80). CanRxHandlerclass now supports can ids between0x1e4and0x224. (!84, #124)- Tests added to terminal serial and various bugs in related classes were removed (!67, #58).
- The
CommandScheduleris now able to safely remove all commands when a user-specified "disconnected" state occurs. One can pass aSafeDisconnectFunctionfunctor to theCommandSchedulerto determine what causes a "disconnected" state (!75). modm:math:interpolationmodule now generated (!93).
- The
sim-modmdirectory in a generated Taproot instance has a new structure. Files are now insim-modm/hosted-TARGET/modm, whereTARGETislinux,windowsordarwin. Make sure to delete and cleanly re-generate your Taproot instance, and update your SConstruct file as shown in the template project. - The
ErrorControllernow no longer displays errors on the LEDs of the RoboMaster Type A board. Now, to create an error using theRAISE_ERRORmacro, you only pass in a pointer to atap::Driversobject and a description (i.e.RAISE_ERROR(drivers, "crc failure")).
- "sim-modm" instance is now generated for all three major desktop platforms, with hardware builds and testing environments fully supported on each. (!73, #96, #15)