rflex_commands.h
00001 /* Player - One Hell of a Robot Server 00002 * Copyright (C) 2000 00003 * Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 #ifndef RFLEX_COMMANDS_H 00023 #define RFLEX_COMMANDS_H 00024 00025 int rflex_open_connection(char *dev_name, int *fd); 00026 int rflex_close_connection(int *fd); 00027 00028 void rflex_sonars_on(int fd); 00029 void rflex_sonars_off(int fd); 00030 00031 void rflex_ir_on(int fd); 00032 void rflex_ir_off(int fd); 00033 00034 void rflex_brake_on(int fd); 00035 void rflex_brake_off(int fd); 00036 00037 void rflex_odometry_off( int fd ); 00038 void rflex_odometry_on( int fd, long period ); 00039 00040 void rflex_motion_set_defaults(int fd); 00041 00042 void rflex_initialize(int fd, int trans_acceleration, 00043 int rot_acceleration, 00044 int trans_pos, 00045 int rot_pos); 00046 00047 void rflex_update_status(int fd, int *distance, 00048 int *bearing, int *t_vel, 00049 int *r_vel); 00050 00051 void rflex_update_system(int fd, int *battery, 00052 int *brake); 00053 00054 int rflex_update_sonar(int fd, int num_sonars, 00055 int *ranges); 00056 void rflex_update_bumpers(int fd, int num_bumpers, 00057 char *values); 00058 void rflex_update_ir(int fd, int num_irs, 00059 unsigned char *ranges); 00060 00061 void rflex_set_velocity(int fd, long t_vel, long r_vel, 00062 long acceleration); 00063 void rflex_stop_robot(int fd, int deceleration); 00064 00065 //int clear_incoming_data(int fd); 00066 00067 #endif