Elisa3
|
#include "behaviors.h"
Functions | |
void | initBehaviors () |
Initialize variables and functionalities (e.g. random generator) used in the behaviors. | |
void | obstacleAvoidance (signed int *pwmLeft, signed int *pwmRight) |
Obstacle avoidance behavior based on a simplified force field method. It works for both forward and backward motion. The function need to be called before the speed controller and with a cadency of at least 122 Hz (motors pwm frequency). | |
char | cliffDetected () |
Cliff avoidance simple implementation in which the robot can be stopped when a cliff is detected with the ground sensors. The robot has to be calibrated in the surface in which it is moving in order for the behavior to work. The function need to be called before the speed controller and with a cadency of at least 122 Hz (motors pwm frequency). THE FUNCTION IS DEPRECATED: the behavior is directly inserted in the ADC interrupt service routine, thus this function is no more needed and should not be called anymore. | |
void | enableObstacleAvoidance () |
Enable obstacle avoidance behavior. | |
void | disableObstacleAvoidance () |
Disable obstacle avoidance behavior. | |
void | enableCliffAvoidance () |
Enable cliff avoidance behavior. | |
void | disableCliffAvoidance () |
Disable cliff avoidance behavior. |
char cliffDetected | ( | ) |
Cliff avoidance simple implementation in which the robot can be stopped when a cliff is detected with the ground sensors. The robot has to be calibrated in the surface in which it is moving in order for the behavior to work. The function need to be called before the speed controller and with a cadency of at least 122 Hz (motors pwm frequency). THE FUNCTION IS DEPRECATED: the behavior is directly inserted in the ADC interrupt service routine, thus this function is no more needed and should not be called anymore.
0 | cliff not detected |
1 | cliff detected |
void disableCliffAvoidance | ( | ) |
Disable cliff avoidance behavior.
void disableObstacleAvoidance | ( | ) |
Disable obstacle avoidance behavior.
void enableCliffAvoidance | ( | ) |
Enable cliff avoidance behavior.
void enableObstacleAvoidance | ( | ) |
Enable obstacle avoidance behavior.
void initBehaviors | ( | ) |
Initialize variables and functionalities (e.g. random generator) used in the behaviors.
void obstacleAvoidance | ( | signed int * | pwmLeft, |
signed int * | pwmRight | ||
) |
Obstacle avoidance behavior based on a simplified force field method. It works for both forward and backward motion. The function need to be called before the speed controller and with a cadency of at least 122 Hz (motors pwm frequency).