00022 {
00023 using namespace iRobot;
00024
00025
00026 CHECK_FAILURE
00027 (CommandNotAvailable,
00028 robot.sendDriveDirectCommand
00029 (Create::VELOCITY_MIN, Create::VELOCITY_MIN));
00030
00031
00032 robot.sendFullCommand ();
00033 robot.sendDriveDirectCommand (Create::VELOCITY_MIN, Create::VELOCITY_MIN);
00034
00035
00036 robot.sendSafeCommand ();
00037
00038
00039 int vmean = (Create::VELOCITY_MAX - Create::VELOCITY_MIN) / 2;
00040 robot.sendDriveCommand (vmean, vmean);
00041 robot.sendDriveDirectCommand (Create::VELOCITY_MIN, Create::VELOCITY_MIN);
00042 robot.sendDriveDirectCommand (Create::VELOCITY_MIN, Create::VELOCITY_MAX);
00043 robot.sendDriveDirectCommand (Create::VELOCITY_MAX, Create::VELOCITY_MIN);
00044 robot.sendDriveDirectCommand (Create::VELOCITY_MAX, Create::VELOCITY_MAX);
00045
00046
00047 CHECK_FAILURE
00048 (InvalidArgument,
00049 robot.sendDriveDirectCommand (Create::VELOCITY_MIN - 1,
00050 Create::VELOCITY_MAX / 4));
00051
00052
00053 CHECK_FAILURE
00054 (InvalidArgument,
00055 robot.sendDriveDirectCommand (Create::VELOCITY_MAX + 1,
00056 Create::VELOCITY_MAX / 4));
00057
00058
00059 CHECK_FAILURE
00060 (InvalidArgument,
00061 robot.sendDriveDirectCommand (Create::VELOCITY_MAX / 4,
00062 Create::VELOCITY_MIN - 1));
00063
00064
00065 CHECK_FAILURE
00066 (InvalidArgument,
00067 robot.sendDriveDirectCommand (Create::VELOCITY_MAX / 4,
00068 Create::VELOCITY_MAX + 1));
00069
00070 return TEST_SUCCEED;
00071 }