/// <summary> /// Computes drive speed based on requestedSpeed, current DrivingState, timing and sensors input /// </summary> /// <returns></returns> public override IEnumerator<ISubsumptionTask> Execute() { DriveInputsBase correctedDriveSpeed = new DriveInputsBase(); // a stop command unless modified //behaviorData.driveInputs = correctedDriveSpeed; yield break; }
/// <summary> /// sets Velocity and Omega into behaviorData.driveInputs /// </summary> /// <param name="velocity">meters per second</param> /// <param name="omega">radians per second, positive - left</param> protected void setVelocityAndOmega(double velocity = 0.0d, double omega = 0.0d) { DriveInputsBase correctedDriveSpeed = new DriveInputsBase(); // a stop command unless modified correctedDriveSpeed.velocity = velocity; correctedDriveSpeed.omega = omega; // positive - left behaviorData.driveInputs = correctedDriveSpeed; }
/// <summary> /// sets Velocity and Omega into behaviorData.driveInputs /// </summary> /// <param name="velocity">meters per second</param> /// <param name="omega">radians per second, positive - left</param> protected void setVelocityAndOmega(double velocity = 0.0d, double omega = 0.0d) { DriveInputsBase correctedDriveSpeed = new DriveInputsBase(); // a stop command unless modified correctedDriveSpeed.velocity = velocity; correctedDriveSpeed.omega = omega; // positive - left behaviorData.driveInputs = correctedDriveSpeed; }