#include <ObstacleDetector.h>
Enumerator |
---|
no |
|
onRightSide |
|
onLeftSide |
|
nxpcup::ObstacleDetector::ObstacleDetector |
( |
Config & |
config | ) |
|
|
inline |
Get actual state of obstacle avoiding.
- Returns
- AvoidingObstacle}
int nxpcup::ObstacleDetector::avoidingObstacleInteger |
( |
| ) |
const |
|
inline |
Get actual state of obstacle in integer value.
- Returns
- transformedAvoidingObstacle}: -1 = left, 1 = right, 0 = nothing
Config nxpcup::ObstacleDetector::config |
( |
| ) |
const |
|
inline |
Get the actual configuration of theObstacleDetector}.
int nxpcup::ObstacleDetector::error |
( |
float |
encoderDistance, |
|
|
int |
borderDetectorError, |
|
|
int |
leftBorder, |
|
|
int |
rightBorder |
|
) |
| |
|
inline |
Check the error on sensors and modify the trajectory if find obstacle.
- Parameters
-
encoderDistance | distance from one encoder |
borderDetectorError | error from border detector |
leftBorder | positon of left border from border detector |
rightBorder | positon of right border from border detector |
int nxpcup::ObstacleDetector::leftSensorValue |
( |
| ) |
const |
|
inline |
Get the last measured value from left sensor.
- Returns
- measured distance without unit
void nxpcup::ObstacleDetector::reset |
( |
| ) |
|
|
inline |
Reset this detector to initial state.
int nxpcup::ObstacleDetector::rightSensorValue |
( |
| ) |
const |
|
inline |
Get the last measured value from right sensor.
- Returns
- measured distance without unit
void nxpcup::ObstacleDetector::setConfig |
( |
Config & |
config | ) |
|
|
inline |
Set new configuration forObstacleDetector}.
- Parameters
-
The documentation for this class was generated from the following file: