rflex_commands.h
1/* Player - One Hell of a Robot Server
2 * Copyright (C) 2000
3 * Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22#ifndef RFLEX_COMMANDS_H
23#define RFLEX_COMMANDS_H
24
25 int rflex_open_connection(char *dev_name, int *fd);
26 int rflex_close_connection(int *fd);
27
28 void rflex_sonars_on(int fd);
29 void rflex_sonars_off(int fd);
30
31 void rflex_ir_on(int fd);
32 void rflex_ir_off(int fd);
33
34 void rflex_brake_on(int fd);
35 void rflex_brake_off(int fd);
36
37 void rflex_odometry_off( int fd );
38 void rflex_odometry_on( int fd, long period );
39
40 void rflex_motion_set_defaults(int fd);
41
42 void rflex_initialize(int fd, int trans_acceleration,
43 int rot_acceleration,
44 int trans_pos,
45 int rot_pos);
46
47 void rflex_update_status(int fd, int *distance,
48 int *bearing, int *t_vel,
49 int *r_vel);
50
51 void rflex_update_system(int fd, int *battery,
52 int *brake);
53
54 int rflex_update_sonar(int fd, int num_sonars,
55 int *ranges);
56 void rflex_update_bumpers(int fd, int num_bumpers,
57 char *values);
58 void rflex_update_ir(int fd, int num_irs,
59 unsigned char *ranges);
60
61 void rflex_set_velocity(int fd, long t_vel, long r_vel,
62 long acceleration);
63 void rflex_stop_robot(int fd, int deceleration);
64
65//int clear_incoming_data(int fd);
66
67#endif