Using the Khepera Robot

Using the Khepera Robot

Before you can use a Khepera robot with Pyro, you have to ensure that all the hardware is set up properly. This is not difficult and is outlined below. For more details, consult the Khepera Manual that shipped with your robot.

Once you have made the connections as described below, do the following:

  1. Log on to the machine to which the Khepera is attached

  2. Start pyrobot

  3. Select robot

  4. Before loading a brain, check that the connection is working by selecting the "Joystick" from the "Robot" menu

  5. If that works, then try loading the brain and select "Run" to start it and "Stop" to end it

  6. If you are using the Khepera with a camera, then from the "Load" menu, select "Devices" and then choose the "V4LCamera", then try re-running the brain

Setting up the Khepera Robot

Here, we will briefly explain how to set up a tethered connection to a basic Khepera 2 robot.

There are two methods for setting up a Khepera: with a camera and without. This section discusses both methods, and some testing to ensure proper connection.

Khepera without Camera

A typical setup is shown in the picture below (Illustration is taken directly from the Khepera 2 User Manual, Version 1.0, December 2001, page 22):

For other configurations of the Khepera (for instance one with a camera or other accessories attached to it), the hardware interface may involve other components and the setup will be different from the one described below. Later, we will add at least setup instructions for a base Khepera with a camera.

For the basic setup, you will need:

  1. A Khepera Robot.

  2. The Khepera interface and charger module.

  3. The Khepera AC power adapter.

  4. Khepera Serial S Cable.

  5. Khepera Serial S cable with rotator contacts.

  6. A standard serial cable for interfacing with your computer and Khepera interface and charger module.

  7. A mount for suspending the rotator S cable.

Refer to the Khepera User Manual for identifying the Khepera accessories. The standard serial cable is typically not supplied with the robot and its connectors can vary depending on the serial port available on your computer.

To set up the robot workstation, do the following:

  1. Connect the standard serial cable to your computer's serial port. If you are using a PC with at least two serial ports, you will connect it via the COMM2 port.

  2. Connect the other end of the standard serial cable to the Khepera interface and charger module.

  3. Plug the AC adapter into a wall outlet and plug the other end into the Khepera interface and charger module.

  4. Connect one end of the Khepera serial S cable to the Khepera interface and charger module.

  5. Connect the other end of the Khepera serial S cable to the terminal on the rotating contact S cable (at the rotating contact end). Mount the cable at an appropriate height above the robot environment.

  6. Using a small flat-head screw driver, rotate the mode encoding wheel dial on the top of Khepera to point to 3 (for serial communication at 38400).

  7. Make sure the Khepera is turned OFF (ON/OFF switch is at the bottom of the robot).

  8. Connect the other end of the rotating contact serial S cable to the robot.

The picture below shows a Khepera workstation set up in the Emergent Intelligence Lab at Bryn Mawr College.

Khepera with camera

In order to use the Khepera camera, you'll first need to install a video capture card on your machine. Then you can use the following set up:

Next: Using the Hemisson Robot Up: PyroHardware