examples.dlife.robot.khepera2
Class Khepera2Braitenberg

java.lang.Object
  extended by dlife.robot.Controller
      extended by examples.dlife.robot.khepera2.Khepera2Braitenberg

public class Khepera2Braitenberg
extends Controller

A Braitenberg controller for the Khepera2. This Controller causes the Khepera to wander around (pretty much) without hitting obstacles using a Braitenberg controller.

To run this example:

  1. Complete the Basic dLife Installation.
  2. Complete the Khepera2 Setup.

  3. Launch the dlife.robot.gui.controlcenter
  4. Select dlife.robot.khepera2.Khepera2 in the "Robot:" drop down list.
  5. Click the button next to the "Controller:" label.
  6. Navigate to the dLifeDist/examples/dlife/robot/khepera2/ directory.
  7. Choose the Khepera2Braitenberg.class file.
  8. Click the "Start Up" button.
  9. Choose the connection mechanism to be used:
  10. Click "Connect"
  11. The Khepera2 will flash its LEDs to indicate that a connection has been established.
  12. Click "Run"
  13. The Khepera2 will begin to move about avoiding obstacles.
  14. Click "Stop" then "Shutdown" when finished.

The source code for this class is contained in the file:

Version:
Jan 19, 2011
Author:
Grant Braught, Dickinson College

Constructor Summary
Khepera2Braitenberg()
           
 
Method Summary
 void startUp(Robot robot)
          Create a differential drive and a proximity sensor and add them to the robot.
 void step()
          Implement a Braitenberg obstacle avoidance controller.
 
Methods inherited from class dlife.robot.Controller
shutDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Khepera2Braitenberg

public Khepera2Braitenberg()
Method Detail

startUp

public void startUp(Robot robot)
Create a differential drive and a proximity sensor and add them to the robot.

Specified by:
startUp in class Controller
Parameters:
robot - the Robot that this Controller will be controlling.

step

public void step()
Implement a Braitenberg obstacle avoidance controller.

Specified by:
step in class Controller