Revision 891
Moved comments to headers. That was painful.
move.h | ||
---|---|---|
37 | 37 |
#define _MOVE_H_ |
38 | 38 |
|
39 | 39 |
/** |
40 |
* @addtogroup move |
|
40 |
* @defgroup move Movement |
|
41 |
* @brief Functions fo controlling robot motion |
|
42 |
* Higher level functions to control the movement of robots. |
|
43 |
* |
|
41 | 44 |
* @{ |
42 | 45 |
**/ |
43 | 46 |
|
47 |
|
|
44 | 48 |
/** @brief Move forwards **/ |
45 | 49 |
#define FWD 0 |
46 | 50 |
/** @brief Move backwards **/ |
... | ... | |
64 | 68 |
/** @brief A high turning speed **/ |
65 | 69 |
#define FAST_TURN 128 |
66 | 70 |
|
67 |
/** @brief Move the robot at the specified velocity **/ |
|
71 |
/** |
|
72 |
* @brief Move the robot at the specified velocity |
|
73 |
* |
|
74 |
* Causes the robot to move with the given translation and rotational velocities. |
|
75 |
* motors_init must be called before this function can be used. |
|
76 |
* |
|
77 |
* @param velocity the translational velocity of the robot, in the range -255 to 255. |
|
78 |
* A positive value indicates forward motion, while a negative value indicates |
|
79 |
* backwards motion. |
|
80 |
* |
|
81 |
* @param omega the rotational velocity of the robot, in the range -255 to 255. |
|
82 |
* A positive value indicates a counterclockwise velocity, while a negative |
|
83 |
* value indicates a clockwise velocity. |
|
84 |
* |
|
85 |
* @see motors_init, motor1_set, motor2_set |
|
86 |
**/ |
|
68 | 87 |
void move(int velocity, int omega); |
69 |
/** @brief Move the robot while avoiding obstacles **/ |
|
88 |
|
|
89 |
/** |
|
90 |
* @brief Move the robot while avoiding obstacles |
|
91 |
* |
|
92 |
* Moves the robot with the given translational and angular velocities |
|
93 |
* while avoiding obstacles. To be effective, this function must be |
|
94 |
* called repeatedly throughout the motion. It relies on the IR |
|
95 |
* rangefinders to detect obstacles. Before calling this function, |
|
96 |
* motors_init and range_init must be called. |
|
97 |
* |
|
98 |
* @param velocity the translational velocity of the robot, in the |
|
99 |
* range -255 to 255. A positive value indicates forward motion. |
|
100 |
* |
|
101 |
* @param omega the rotational velocity of the robot, in the range |
|
102 |
* -255 to 255. A positive value indicates a counterclockwise velocity. |
|
103 |
* |
|
104 |
* @param strength the strength of the avoid behavior, in the range |
|
105 |
* 0 to 100. |
|
106 |
* |
|
107 |
* @see motors_init, range_init, move |
|
108 |
**/ |
|
70 | 109 |
void move_avoid(int velocity, int omega, int strength); |
71 | 110 |
|
72 | 111 |
/** @} **/ |
Also available in: Unified diff