![]() |
ronelib
Operating System for the r-one robot
|
Collection of behaviors that use the bump sensor. More...
Go to the source code of this file.
Functions | |
Beh * | behIRObstacleAvoid (Beh *behPtr, int32 tv, boolean invalidate) |
Uses IR to avoid all obstacles, including robots. Can be invalidated. More... | |
Beh * | behBumpMoveOutOfWay (Beh *behPtr) |
If bumped, robot will move slightly forward out of way. More... | |
Beh * | behIRObstacleAvoid_ExcludeRobots (Beh *behPtr, int32 tv, NbrList *nbrListPtr, boolean invalidate) |
Uses IR to avoid all obstacles, except robots. Can be invalidated. More... | |
Beh * | behBumpAvoid (Beh *behPtr, int32 tv, int32 forwardDist) |
Simple behavior: Uses bump sensors to determine if robot should avoid an obstacle. More... | |
Beh * | behBumpReflect (Beh *behPtr, int32 tv, int32 reflectDist) |
Turn around if it his running into something. More... | |
void | behBumpReflectDemo (Beh *behPtr, int32 rotate_rv) |
If the front bump sensors are activated, the robot will rotate. More... | |
Beh * | behBumpBackoff (Beh *behPtr, int32 tv) |
If the front bump sensors are activated, the robot will backup. More... | |
Beh * | behBumpNavigate (Beh *behPtr, uint8 headingRobot) |
If bumped, robot will back up, turn in the direction is was traveling, then move forward. More... | |
Collection of behaviors that use the bump sensor.
These behaviors include obstacle avoidance and navigation.
Simple behavior: Uses bump sensors to determine if robot should avoid an obstacle.
If obstacle is detected with bump sensors, the robot turns in place. After the bump sensor turns off, the robot moves forward forwardDist mm. If the robot does not bump anything, this behavior becomes inactive.
behPtr | behavior that is updated by this function |
tv | desired translational velocity |
forwardDist | the desired distance (in mm) the robot should move once a bump sensor turns off |
If the front bump sensors are activated, the robot will backup.
behPtr | pointer for the behavior to update |
tv | desired translational velocity |
added for improving bump behavior
If bumped, robot will move slightly forward out of way.
behPtr | pointer for behavior to be modified |
If bumped, robot will back up, turn in the direction is was traveling, then move forward.
behPtr | for behavior that is updated by this function |
headingRobot | the heading of the robot before bumping |
0 - Straight 1 - Left 2 - Right
Turn around if it his running into something.
behPtr | behavior that is updated by this function |
tv | desired translational velocity |
reflectDist |
void behBumpReflectDemo | ( | Beh * | behPtr, |
int32 | rotate_rv | ||
) |
If the front bump sensors are activated, the robot will rotate.
This is obtained by turning off translational velocity and setting rotational velocity to the input rotate_rv in the behPtr.
behPtr | pointer for the behavior to update |
rotate_rv | desired rotational velocity if the robot has encountered an obstacle |
Uses IR to avoid all obstacles, including robots. Can be invalidated.
behPtr | |
tv | desired translational velocity |
invalidate |
Beh* behIRObstacleAvoid_ExcludeRobots | ( | Beh * | behPtr, |
int32 | tv, | ||
NbrList * | nbrListPtr, | ||
boolean | invalidate | ||
) |
Uses IR to avoid all obstacles, except robots. Can be invalidated.
behPtr | |
tv | desired translational velocity |
nbrListPtr | for list of neighbors |
invalidate |