void LoadDWMTests(LogicPart logic, DWMRules rules) { logic.Tests["DWM_Movement_LongForward"] = new DWMMovementTestBase( LocationTest(100, 0, 0, 10, rules.DWMMoveForward(100.0), rules.DWMStand(1.0))); //basic DWM tests logic.Tests["DWM_Movement_Forward"] = new DWMMovementTestBase( LocationTest(10, 0, 0, 10, rules.DWMMoveForward(10.0), rules.DWMStand(1.0))); logic.Tests["DWM_Movement_Backward"] = new DWMMovementTestBase( LocationTest(-10, 0, 0, 10, rules.DWMMoveForward(-10.0), rules.DWMStand(1.0))); logic.Tests["DWM_Movement_RightRotate"] = new DWMMovementTestBase( LocationTest(0, 0, -45, 10, rules.DWMRotate(AIRLab.Mathematics.Angle.FromGrad(45.0)),rules.DWMStand(1.0))); logic.Tests["DWM_Movement_LeftRotate"] = new DWMMovementTestBase( LocationTest(0, 0, 45, 10, rules.DWMRotate(-1 * AIRLab.Mathematics.Angle.FromGrad(45.0)),rules.DWMStand(1.0))); logic.Tests["DWM_Movement_ArcRight"] = new DWMMovementTestBase( LocationTest(3, 3, 0, 10, rules.DWMMoveArc(3.0, AIRLab.Mathematics.Angle.FromGrad(90.0), true), rules.DWMStand(1.0))); logic.Tests["DWM_Movement_ArcLeft"] = new DWMMovementTestBase( LocationTest(3, -3, 0, 10, rules.DWMMoveArc(3.0, AIRLab.Mathematics.Angle.FromGrad(90.0), false), rules.DWMStand(1.0))); //advanced DWM tests logic.Tests["DWM_Movement_Turning"] = new DWMMovementTestBase( LocationTest(6, 6, 90, 10, rules.DWMMoveForward(3.0), rules.DWMRotate(AIRLab.Mathematics.Angle.FromGrad(90.0)), rules.DWMMoveForward(3.0), rules.DWMRotate(AIRLab.Mathematics.Angle.FromGrad(-90.0)), rules.DWMMoveForward(3.0), rules.DWMRotate(AIRLab.Mathematics.Angle.FromGrad(90.0)), rules.DWMMoveForward(3.0), rules.DWMStand(1.0))); logic.Tests["DWM_Movement_ArcMoving"] = new DWMMovementTestBase( LocationTest(6, 6, 90, 10, rules.DWMMoveArc(3.0, AIRLab.Mathematics.Angle.FromGrad(90.0), true), rules.DWMStand(1.0), rules.DWMMoveArc(3.0, AIRLab.Mathematics.Angle.FromGrad(90.0), false))); }
void LoadGAXTests(LogicPart logic, DWMRules rules) { //1. сделать ступенчатое движение с ускорением и посчитать среднее ускорение //2. Пустить робота по кругу и проверить, что ускорение смотрит в центр //3. Аналогично с угловой скоростью //На DWM-е logic.Tests["GAX_CircleMoving"] = new DWMMovementTestBase( GAXTest(new Point3D(0, -3, 0), Angle.Zero, Angle.Zero, Angle.Zero, rules.DWMMoveArc(3, Angle.FromGrad(360), false), rules.DWMStand(1.0))); logic.Tests["GAX_Rotating"] = new DWMMovementTestBase( GAXTest(new Point3D(0, 0, 0), Angle.Zero, Angle.Zero, Angle.HalfPi, rules.DWMRotate(Angle.Pi), rules.DWMStand(1.0))); }
void LoadEncodersTests(LogicPart logic, DWMRules rules) { logic.Tests["Encoder_MoveForward"] = new DWMMovementTestBase( EncodersTest( new EncodersData { Timestamp = 0, TotalLeftRotation = Angle.FromGrad(114.3), TotalRightRotation = Angle.FromGrad(114.3) }, rules.DWMMoveForward(10.0), rules.DWMStand(1.0))); logic.Tests["Encoder_ArcMoving"] = new DWMMovementTestBase( EncodersTest( new EncodersData { Timestamp = 0, TotalLeftRotation = Angle.FromGrad(234.0), TotalRightRotation = Angle.FromGrad(52.0) }, rules.DWMMoveArc(3.0, Angle.HalfPi, true))); //езда назад, поворот на месте, одна склейка двух-трех движений }