root / trunk / code / projects / libdragonfly / move.h @ 1862
History | View | Annotate | Download (2.18 KB)
1 | 8 | bcoltin | /**
|
---|---|---|---|
2 | 241 | bcoltin | * Copyright (c) 2007 Colony Project
|
3 | *
|
||
4 | * Permission is hereby granted, free of charge, to any person
|
||
5 | * obtaining a copy of this software and associated documentation
|
||
6 | * files (the "Software"), to deal in the Software without
|
||
7 | * restriction, including without limitation the rights to use,
|
||
8 | * copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
9 | * copies of the Software, and to permit persons to whom the
|
||
10 | * Software is furnished to do so, subject to the following
|
||
11 | * conditions:
|
||
12 | *
|
||
13 | * The above copyright notice and this permission notice shall be
|
||
14 | * included in all copies or substantial portions of the Software.
|
||
15 | *
|
||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||
18 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||
20 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||
21 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||
22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||
23 | * OTHER DEALINGS IN THE SOFTWARE.
|
||
24 | **/
|
||
25 | |||
26 | |||
27 | /**
|
||
28 | 8 | bcoltin | * @file move.h
|
29 | * @brief Contains definitions for controlling robot motion
|
||
30 | *
|
||
31 | * This file offers higher-level functions for robot motion.
|
||
32 | *
|
||
33 | * @author Colony Project, CMU Robotics Club
|
||
34 | **/
|
||
35 | |||
36 | #ifndef _MOVE_H_
|
||
37 | #define _MOVE_H_
|
||
38 | |||
39 | /**
|
||
40 | * @addtogroup move
|
||
41 | * @{
|
||
42 | **/
|
||
43 | |||
44 | /** @brief Move forwards **/
|
||
45 | #define FWD 0 |
||
46 | /** @brief Move backwards **/
|
||
47 | #define BCK 1 |
||
48 | |||
49 | /** @brief A slow speed **/
|
||
50 | #define SLOW_SPD 96 |
||
51 | /** @brief Half of the full speed **/
|
||
52 | #define HALF_SPD 128 |
||
53 | /** @brief A normal speed **/
|
||
54 | #define NRML_SPD 160 |
||
55 | /** @brief A fast speed **/
|
||
56 | #define FAST_SPD 192 |
||
57 | /** @brief The maximum speed **/
|
||
58 | #define FULL_SPD 255 |
||
59 | |||
60 | /** @brief A slow turning speed **/
|
||
61 | #define SLOW_TURN 64 |
||
62 | /** @brief A medium turning speed **/
|
||
63 | #define NRML_TURN 96 |
||
64 | /** @brief A high turning speed **/
|
||
65 | #define FAST_TURN 128 |
||
66 | |||
67 | /** @brief Move the robot at the specified velocity **/
|
||
68 | void move(int velocity, int omega); |
||
69 | /** @brief Move the robot while avoiding obstacles **/
|
||
70 | void move_avoid(int velocity, int omega, int strength); |
||
71 | |||
72 | /** @} **/
|
||
73 | |||
74 | #endif
|