Changes between Version 29 and Version 30 of Old/Dailyupdates


Ignore:
Timestamp:
Jun 20, 2007, 9:52:29 PM (17 years ago)
Author:
aniket
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/Dailyupdates

    v29 v30  
    3131
    3232An exciting end of the day - we began writing a python script which will hopefully cause the robot to seek out the area of best internet connectivity. So far, the script is able to run iwconfig and extract the signal strength. It also has structures in place to keep track of three (x,y) coordinates and the signal strength at each of them. The functions written so far are: GoToXY(x,y) [Moves robot], scanning_thread() [returns signal strength], !BigReading() [calls scanning_thread several times and returns average], Say() [calls ''flite'' for text to speech], Sort() [Sorts the three points in memory in order: best, good, worst], and !PrintPoints() [prints BGW points to screen]. Python scripting is proving fast and easy, and we can probably have this working before lunch tomorrow.
     33
     34== 6/20/07 - Day 13 ==
     35
     36We accomplished a few things today. In particular, we've written two python scripts which perform some wifi related tasks.
     37
     38The first, the one I started coding yesterday, is an implementation of the Nelder-Mead algorithm for finding minimums. The robot wanders around the floor of Orbit (x,y coordinates) and surveys the signal strength using iwconfig. Based on the input it receives from iwconfig it attempts to move to the point of greatest wifi connection. At each point it surveys, the robot speaks the signal strength, a task accomplished by feeding the output to ''flite''. The algorithm may not be quite appropriate because of the random fluctuations in connectivity; if the robot gets a burst of strong connectivity that is due solely to natural variations it will remember that point forever. One solution might be to program the robot to 'forget' good points after a few subsequent scannings.
     39
     40The second performs a related task. It wanders aimlessly around the room, recording the signal strength from iwconfig at regular intervals. The real accomplishment here was making two tasks (wandering and surveying signal strength) occuring simultaneously. The first step is to turn a python function into an ERSP recognized task. The important python command to do so is:
     41{{{
     42someTask = ersp.task.registerTask("idstring", function_name)
     43}}}
     44The purpose of "idstring" is elusive, but as long as it's a string the software seems to accept it. Once this assignment is completed, someTask can be passed as an argument in to a parallel object:\
     45{{{
     46p = ersp.task.Parallel()
     47p.addTask(someTask)
     48}}}
     49
     50We've been issued a challenge. A week from today there is to be a race. One of the nodes in Orbit will become an access point, and each robot will attempt a time-trial to locate the node as quickly as possible. Robot #1 will probably use the Nelder-Mead script completed today, but we have flexibility regarding the algorithm for the other two.
     51
     52Another short term goal: have object-avoidance behavior run in the background while we are running our own python scripts. In general, the python MoveTo commands have timeout values, so if the robot is trying to reach an unreachable location (ie, inside a pillar) it should give up after n seconds. This will affect our scanning algorithms.