robot_central.h

Go to the documentation of this file.
00001 /*********************************************************
00002  *
00003  * This source code is part of the Carnegie Mellon Robot
00004  * Navigation Toolkit (CARMEN)
00005  *
00006  * CARMEN Copyright (c) 2002 Michael Montemerlo, Nicholas
00007  * Roy, and Sebastian Thrun
00008  *
00009  * CARMEN is free software; you can redistribute it and/or 
00010  * modify it under the terms of the GNU General Public 
00011  * License as published by the Free Software Foundation; 
00012  * either version 2 of the License, or (at your option)
00013  * any later version.
00014  *
00015  * CARMEN is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied 
00017  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018  * PURPOSE.  See the GNU General Public License for more 
00019  * details.
00020  *
00021  * You should have received a copy of the GNU General 
00022  * Public License along with CARMEN; if not, write to the
00023  * Free Software Foundation, Inc., 59 Temple Place, 
00024  * Suite 330, Boston, MA  02111-1307 USA
00025  *
00026  ********************************************************/
00027 
00029 // @{
00030 
00039 #ifndef CARMEN_ROBOT_H
00040 #define CARMEN_ROBOT_H
00041 
00042 #include <carmen/base_messages.h>
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00048   // MAX_READINGS controls the number of odometry measurements we 
00049   // remember for interpolating position stamps.
00050 
00051   // Clock skew estimate is guaranteed only if sufficient odometry
00052   // is available, so ESTIMATES_CONVERGE is the amount of odometry
00053   // we need to estimate the clock skew
00054 
00055 #define      CARMEN_ROBOT_MAX_READINGS         5
00056 #define      CARMEN_ROBOT_ESTIMATES_CONVERGE   (CARMEN_ROBOT_MAX_READINGS+25)
00057 
00058 #define      CARMEN_ROBOT_ALL_STOP             1
00059 #define      CARMEN_ROBOT_ALLOW_ROTATE         2
00060 
00061 #define      CARMEN_ROBOT_MIN_ALLOWED_VELOCITY 0.03 // cm/s
00062 
00063 #define      CARMEN_ROBOT_ODOMETRY_AVERAGE     0
00064 #define      CARMEN_ROBOT_FRONT_LASER_AVERAGE  1
00065 #define      CARMEN_ROBOT_REAR_LASER_AVERAGE   2
00066 
00067 #define      CARMEN_ROBOT_BUMPER_AVERAGE       3
00068 #define      CARMEN_ROBOT_SONAR_AVERAGE        4
00069 
00070 extern carmen_base_odometry_message carmen_robot_latest_odometry;
00071 extern carmen_base_odometry_message carmen_robot_odometry[CARMEN_ROBOT_MAX_READINGS];
00072 extern int carmen_robot_position_received;
00073 extern int carmen_robot_converge;
00074 extern carmen_robot_config_t carmen_robot_config;
00075 extern char *carmen_robot_host;
00076 
00077 extern double carmen_robot_collision_avoidance_frequency;
00078 extern double carmen_robot_sensor_time_of_last_update;
00079   
00080 
00081 double carmen_robot_get_fraction(double timestamp, double skew,
00082                                  int *low, int *high);
00083 int carmen_robot_get_skew(int msg_count, double *skew,
00084                           int data_type, char *hostname);
00085 void carmen_robot_update_skew(int data_type, int *count, double time,
00086                               char *hostname);
00087 
00088 #ifdef __cplusplus
00089 }
00090 #endif
00091 
00092 #endif
00093 // @}

Generated on Wed Apr 5 18:34:18 2006 for CARMEN by  doxygen 1.4.4