00001 /** 00002 \file Robots/LoBot/irccm/LoCliffs.h 00003 \brief Low-level reactions for the cliff sensors. 00004 00005 This file defines an API for examining the iRobot Create's cliff 00006 sensors and backing lobot up in case it is on the brink of teetering 00007 off the edge of a stairway or something like that. Additionally, this 00008 module provides an API for sending the cliffs acknowledgement to the 00009 high level. 00010 */ 00011 00012 /* 00013 ************************************************************************ 00014 * The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005 * 00015 * by the University of Southern California (USC) and the iLab at USC. * 00016 * See http: iLab.usc.edu for information about this project. * 00017 * * 00018 * Major portions of the iLab Neuromorphic Vision Toolkit are protected * 00019 * under the U.S. patent ``Computation of Intrinsic Perceptual Saliency * 00020 * in Visual Environments, and Applications'' by Christof Koch and * 00021 * Laurent Itti, California Institute of Technology, 2001 (patent * 00022 * pending; application number 09/912,225 filed July 23, 2001; see * 00023 * http://pair.uspto.gov/cgi-bin/final/home.pl for current status). * 00024 ************************************************************************ 00025 * This file is part of the iLab Neuromorphic Vision C++ Toolkit. * 00026 * * 00027 * The iLab Neuromorphic Vision C++ Toolkit is free software; you can * 00028 * redistribute it and/or modify it under the terms of the GNU General * 00029 * Public License as published by the Free Software Foundation; either * 00030 * version 2 of the License, or (at your option) any later version. * 00031 * * 00032 * The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope * 00033 * that it will be useful, but WITHOUT ANY WARRANTY; without even the * 00034 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * 00035 * PURPOSE. See the GNU General Public License for more details. * 00036 * * 00037 * You should have received a copy of the GNU General Public License * 00038 * along with the iLab Neuromorphic Vision C++ Toolkit; if not, write * 00039 * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * 00040 * Boston, MA 02111-1307 USA. * 00041 ************************************************************************ 00042 */ 00043 00044 /* 00045 Primary maintainer for this file: Manu Viswanathan mviswana usc edu 00046 $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Robots/LoBot/irccm/LoCliffs.h $ 00047 $Id: LoCliffs.h 12649 2010-01-25 20:38:44Z mviswana $ 00048 */ 00049 00050 #ifndef LOBOT_IRCCM_CLIFFS_DOT_H 00051 #define LOBOT_IRCCM_CLIFFS_DOT_H 00052 00053 /*------------------------- LOW-LEVEL ACTIONS -------------------------*/ 00054 00055 /// This function reacts to the iRobot Create's cliff sensors. If any of 00056 /// them are indeed active, it sets a flag to indicate to the main 00057 /// program that a cliffs acknowledgement needs to be sent to the high 00058 /// level. 00059 void lo_cliffs(void) ; 00060 00061 /*--------------- CLIFF SENSOR SENSOR ACKNOWLEDGEMENTS ----------------*/ 00062 00063 /// This function returns true if Robolocust's low-level Command Module 00064 /// control program reacted to the Create robot's cliff sensors and needs 00065 /// to send an acknowledgement to the high level letting it know what the 00066 /// low level did. 00067 char lo_cliffs_pending(void) ; 00068 00069 /// Send pending cliff sensor acknowledgement to the high level. 00070 void lo_send_cliffs(void) ; 00071 00072 /// Returns true if a cliff is detected; false otherwise. 00073 #define lo_is_cliff_detected() lo_cliffs_pending() 00074 00075 /*---------------------------------------------------------------------*/ 00076 00077 #endif