【问题标题】:how to calibrate bno055 gyro sensor?如何校准 bno055 陀螺仪传感器?
【发布时间】:2019-11-13 22:54:49
【问题描述】:

对于我们的 FTC 机器人,我们正在尝试校准 BNO055 陀螺仪传感器,并且在 external/examples 下已经有一个TeleOp

我想知道我们是否需要在每个字段上进行校准还是只进行一次?

【问题讨论】:

    标签: java robotics


    【解决方案1】:

    您应该只需要校准一次陀螺仪。然后按 a 按钮保存该配置。确保在您的代码中通过添加链接到该校准的陀螺仪文件,

    // Set the parameters for the gyro
    params = new BNO055IMU.Parameters();
    params.angleUnit           = BNO055IMU.AngleUnit.DEGREES;
    params.accelUnit           = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;
    params.calibrationDataFile = "BNO055IMUCalibration.json"; // Make sure that you have run the calibrate teleop first!!
    params.loggingEnabled      = true;
    params.loggingTag          = "IMU";
    params.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();
    
    // Init the IMU make sure it is in the configuration on the phone as I2C BUS 0 named as imu
    BNO055IMU imu = hardwareMap.get(BNO055IMU.class, "imu");
    imu.initialize(params);
    
    // Let the gyro initialize 
    while(!isStopRequested() && imu.isGyroCalibrated()) {
        sleep(50);
        idle();
    }
    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多