

WriteDebugStreamLine("doMainStateTurn: dir: %d, curr: %d, new: %d", dir, currentHeading, newHeading) Don't bother to do anything if the newHeading is the same NewHeading = routePlannerFollowWall(dir, maze, currentTile) Get a new heading from the route planning function Int dir = headingToDirection(currentHeading) * by a route planning function, routePlannerFollowWall() in this case If you wanted to experiment with different route planners, simply change the function called in doMainStateTurn(), which gets called each time we get to another tile.

Update current tile walls and those of the neighbouring tiles.

Scan left and right walls if they have not been scanned already.Check for a wall ahead and fix the robot’s position if required.Set the pointers to the finish tile and current tile.The main state machine consists of 5 states: Here’s a little video of it, doing its thing. The engine for this robot consists of two Finite State Machines (FSM) that handle the cruising around, turning, scanning, etc. See what your robot sees, visualize the sensor outputs in an easy to understand way.It’s finally finished and ready to be published, my Robot Virtual Worlds Maze Crawler is fully functional. Experiment with how various physical forces act on your robot, change the friction on the playing surface, or modify gravity to see how your robot would behave in a weightless environment! The simulator's advanced physics engine affords an unparalleled level of realism. If you’re familiar with MINDSTORMS programming, you already know how to use our simulator. Use the official LEGO® MINDSTORMS® EV3 programming environment to write programs to control your virtual robot, just as you would the real thing. Within minutes you can easily import your model into a physics enabled simulation.

Bring your virtual creations to life! The Virtual Robotics Toolkit can import files created using a number of free 3D modeling tools.
