MARS Framework

Mobile Autonomous Robot Simulation framework

<Patrician|Away> what does your robot do, sam
<bovril> it collects data about the surrounding environment, then discards it and drives into walls
From:, quote #240849


The autonomous mobile robots often require a high level skill to design, build and code as well as some pricey and hard to find hardware. The robots are also prone to errors, hardware and software failures, moreover the most expensive part of such robots, the microcontroller, can easily be damaged by the improper amount of electrical current passed through it. Also the successful robot design often requires a number of trials and errors in order to determine the optimal placement of the sensors.
A realistic and sufficiently physically accurate simulation can simplify or even replace the process of creating an autonomous mobile robot. The simulation application should be simple to use, have an intuitive interface and provide the user with the tools to design a chassis, place some sensors on it, code the microcontroller and test the robot in some environment i.e. the surface of a table or a labyrinth.


The Interactive Autonomous Mobile Robot Simulation application will simulate an Autonomous Mobile Robot, its interaction with the environment, behavior as well as its sensors and locomotion. The robot will be able to move within its environment (for example a surface of a table), sense such objects as walls, edges and other objects and robots placed on the table and apply user-defined logic to interact with the objects. Users will be able to select various sensors (designed to simulate the real-life sensors), methods of locomotion, chassis and controllers. Also an interface will be provided to modify the robot’s logic using code similar to the one used to program the MC68HC11 controller (or the Parallax’s PBasic).


The environment of the simulation consists of:

  • A table surface of irregular shape
  • Walls of any shape and configuration
  • Light or dark lines painted on the table
  • Movable objects of various shapes
  • A mobile autonomous robot, equipped with various sensors

Physics Engine

MARS framework includes a complete physics engine which includes the following features:

  • ODE (Ordinary Differential Equation) solvers, such as Euler and Runge-Kutta
  • Two step collision detection:
    • Bounding Box collision detection
    • SAT (Separating Axis Theorem) collision detection
  • Forces, friction, momentum, inertia tensors, etc.


  • Objects, excepts for the robot, may be dragged by clicking the mouse button and pulling
    • Notice how objects react differently depending on their mass, elastic coefficient and frictional coefficient
    • Objects become ‘dead’ when they fall off of the table
  • Press ‘Space’ to pause the simulation, press ‘f’ to step forward when paused
  • Press ‘s’ to toggle the rendering of the speed vectors
  • Press ‘h’ to toggle the rendering of the object centers
  • Press ‘b’ to toggle the rendering of the bounding rectangles
  • Press ‘t’ to toggle the rendering of the robot trail
  • Press ‘+’ and ‘-‘ to zoom in and out respectively

MARS framework website Download source code