MoveRobotPURPOSEMoves the robot by one time slice.
SYNOPSISfunction [last R]=MoveRobot(R)
DESCRIPTIONMoves the robot by one time slice. Simulates the robot motion. Simulates that the robot advances. After the simulated motion the new sensor readings that can be obtained using GetSensorReadings. The output 'last' is true when the robot reaches the end of the simulation, i.e., when no more (simulated) sensor readings are available. See also GetSensorReadings. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function [last R]=MoveRobot(R) 0002 % Moves the robot by one time slice. 0003 % 0004 % Simulates the robot motion. Simulates that the robot advances. After the 0005 % simulated motion the new sensor readings that can be obtained using 0006 % GetSensorReadings. 0007 % 0008 % The output 'last' is true when the robot reaches the end of the 0009 % simulation, i.e., when no more (simulated) sensor readings are 0010 % available. 0011 % 0012 % See also GetSensorReadings. 0013 0014 if (R.time<R.nReadings) 0015 last=false; 0016 R.time=R.time+1; 0017 else 0018 last=true; 0019 end 0020 |