wiki:Old/Robot/robothandbook

Version 15 (modified by aniket, 17 years ago) ( diff )

  • Python
    • neldermead.py
    • gradfollower.py
    • v3.py
  • C++
    • Behaviors
    • Using the grid

Included Programs

Hardware tests

The ERSP software comes with some very useful programs to test how well the hardware is working. All of them are command-line utilities located in /opt/evolution_robotics/bin. The most useful of these are:

  • test_battery
  • test_range_sensors
  • test_camera

If these three tests execute successfully, all hardware is properly connected.

Navtool is an included application useful for testing that the ERSP software is working properly. It demonstrates object avoidance and map-building.

To use it, execute the following two commands in separate consoles:

$ run_slam_explore
$ run_client_gui

The program will cause the robot to wander around the room and create a map using its camera. Much more information on navtool is in the Getting Started Guide.

Calibration

The camera and drive system of the robot need to be calibrated. Instructions for doing so are in the Getting Started Guide (page 47). The camera requires two types of calibration: intrinsic and extrinsic. Calibrating the drive system requires the use of a joystick. Winlab has purchased a Logitech Rumblepad which can be used for this purpose.

startservices.sh

A very simple shell script can be used to make sure all of the ERSP required services are started. It is already located in the home folder and bin folder of both robots. Its contents are:

!/bin/bash

/etc/init.d/evolution-drivers-boot start
/etc/init.d/evolution-firewire-boot start
/etc/init.d/evolution-ovt-boot start
/etc/init.d/evolution-peripherals-boot start
/etc/init.d/evolution-pwc-boot start
/etc/init.d/evolution-rcm-boot start

All of these services *should* launch on startup, regardless of whether or not the hardware is connected at startup. However, occasionally something may fail, and this script is a quick way of ensuring that everything is running.

Python

Python scripting is an easy way to control the robots. Most of the work we did in Winlab was in python. There is no explicit documentation of available python commands. An easy way to figure out which commands are available is to browse the directory /opt/evolution_robotics/python/ersp/. Descriptions from the c++ api apply to the python commands with the same name.

Most of our python scripts are located in ~/own.

neldermead.py

This script was the original attempt to locate the access point. It is an implementation of the Nelder-Mead simplex method. Although not very successful as an algorithm, the script contains many fundamental functions and imported in most of our other python scripts.

GoToXY(x,y)::

A function to simplify moving the robot. The parameters x,y are the coordinates to move to.

scanning_thread()::

This functions calls the utility iwconfig and reports back the absolute value of the signal strength. It is adapted from the open source project wifi-radar

Note: See TracWiki for help on using the wiki.