FTC RobotController(SDK) v8.1发布

FTC RobotController(SDK) v8.1发布

张北一 -
回帖数:0

Version 8.1 (20221121-115119)

Breaking Changes

  • Deprecates the OpMode fields msStuckDetectInitmsStuckDetectInitLoopmsStuckDetectStartmsStuckDetectLoop, and msStuckDetectStop.
    • Op Modes no longer have a time limit for init()init_loop()start() or loop(), so the fields corresponding to those methods are no longer used.
    • stop() still has a time limit, but it is now hardcoded to be 1 second, and cannot be changed using msStuckDetectStop.
  • Deprecates the OpMode methods internalPreInit()internalPostInitLoop(), and internalPostLoop().
    • Iterative OpModes will continue to call these methods in case they were overridden.
    • These methods will not be called at all for LinearOpModes.
  • Deprecates (and stops respecting) DeviceProperties.xmlTagAliases.

Enhancements

  • Adds a new IMU interface to Blocks and Java that can be used with both the original BNO055 IMU included in all older Control Hubs and Expansion Hubs, and the new alternative BHI260AP IMU.
    • You can determine which type of IMU is in your Control Hub by navigating to the Manage page of the web interface.
    • To learn how to use the new IMU interface, see https://ftc-docs.firstinspires.org/programming_resources/imu/imu.html. The SensorIMU Blocks sample was also updated to use the new IMU interface, and the following Java samples were added:
      • SensorIMUOrthogonal
        • Use this sample if your REV Hub is mounted so that it is parallel or perpendicular to the bottom of your robot.
      • SensorIMUNonOrthogonal
        • Use this sample if your REV Hub is mounted to your robot in any other orientation
      • ConceptExploringIMUOrientations
        • This Op Mode is a tool to help you understand how the orthogonal orientations work, and which one applies to your robot.
    • The BHI260AP IMU can only be accessed via the new IMU interface. The BNO055 IMU can be programmed using the new IMU interface, or you can continue to program it using the old BNO055IMU interface. If you want to be able to quickly switch to a new Control Hub that may contain the BHI260AP IMU, you should migrate your code to use the new IMU interface.
    • Unlike the old BNO055IMU interface, which only worked correctly when the REV Hub was mounted flat on your robot, the IMU interface allows you to specify the orientation of the REV Hub on your robot. It will account for this, and give you your orientation in a Robot Coordinate System, instead of a special coordinate system for the REV Hub. As a result, your pitch and yaw will be 0 when your robot is level, instead of when the REV Hub is level, which will result in much more reliable orientation angle values for most mounting orientations.
    • Because of the new robot-centric coordinate system, the pitch and roll angles returned by the IMU interface will be different from the ones returned by the BNO055IMU interface. When you are migrating your code, pay careful attention to the documentation.
    • If you have calibrated your BNO055, you can provide that calibration data to the new IMU interface by passing a BNO055IMUNew.Parameters instance to IMU.initialize().
    • The IMU interface is also suitable for implementation by third-party vendors for IMUs that support providing the orientation in the form of a quaternion.
  • Iterative OpModes (as opposed to LinearOpModes) now run on a dedicated thread.
    • Cycle times should not be as impacted by everything else going on in the system.
    • Slow OpModes can no longer increase the amount of time it takes to process network commands, and vice versa.
    • The init()init_loop()start() and loop() methods no longer need to return within a certain time frame.
  • BNO055 IMU legacy driver: restores the ability to initialize in one Op Mode, and then have another Op Mode re-use that initialization. This allows you to maintain the 0-yaw position between Op Modes, if desired.
  • Allows customized versions of device drivers in the FTC SDK to use the same XML tag.
    • Before, if you wanted to customize a device driver, you had to copy it to a new class and give it a new XML tag. Giving it a new XML tag meant that to switch which driver was being used, you had to modify your configuration file.
    • Now, to use your custom driver, all you have to do is specify your custom driver's class when calling hardwareMap.get(). To go back to the original driver, specify the original driver class. If you specify an interface that is implemented by both the original driver and the custom driver, there is no guarantee about which implementation will be returned.

Bug Fixes

  • Fixes accessing the "Manage TensorFlow Lite Models" and "Manage Sounds" links and performing Blocks and OnBotJava Op Mode downloads from the REV Hardware Client.
  • Fixes issue where an I2C device driver would be auto-initialized using the parameters assigned in a previous Op Mode run.
  • Improves Driver Station popup menu placement in the landscape layout.
  • Fixes NullPointerException when attempting to get a non-configured BNO055 IMU in a Blocks Op Mode on an RC phone.
  • Fixes problem with Blocks if a variable is named orientation.