![]() If (WallOrientDeg > cutAngleDeg) // -> WallOrientDeg also > 0, have to turn CCW If (abs(WALL_OFFSET_TGTDIST_CM - glLeftCenterCm) 0 & cutAngleDeg 0 & abs(cutAngleDeg) 0) //robot inside desired offset distance Step1: If robot is already close to desired offset, just turn parallel and go MyTeePrint.printf("\nIn TrackLeftWallOffset with LR/LC/LF = %d\t%d\t%d\n", glLeftRearCm, glLeftCenterCm, glLeftFrontCm) MyTeePrint.printf("\nIn TrackLeftWallOffset with Kp/Ki/Kd = %2.2f\t%2.2f\t%2.2f\n", kp, ki, kd) GetRequestedVL53l0xValues(VL53L0X_LEFT) //update glLeftSteeringVal Đ6/21/21 modified to do a turn, then straight, then track 0 steer valĪnomal圜ode errcode = NO_ANOMALIES //03/06/22 mvd here to make global to function Step2: Move to offset distance and parallel to wall Step1: Otherwise, get current robot orientation and offset wrt wall ![]() Step1: If robot is already close to desired offset, just turn parallel and go ![]() offsetCm = float denoting desired wall offset, in Cm kp,ki,kd = float objects denoting PID parameters for PIDCalcs() Purpose: Track left wall at specified offset ![]() Void TrackLeftWallOffset(float kp, float ki, float kd, float offsetCm) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |