ronelib
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs
basicBehaviors.h File Reference

Basic swarm functionality behaviors. More...

Go to the source code of this file.

Functions

BehbehFlock (Beh *behPtr, NbrList *nbrListPtr, int32 tv)
 Robots flock together. More...
 
int32 behFlockAngle (NbrList *nbrListPtr)
 Computes the flock angle. More...
 
BehbehOrbit (Beh *behPtr, Nbr *nbrPtr, int32 tv)
 Robot orbits the input neighbor. More...
 
BehbehFollowPredesessor (Beh *behPtr, NbrList *nbrListPtr, int32 tv)
 Follow robot whose ID is larger than yours. More...
 
BehbehWallFollow (Beh *behPtr, NbrList *nbrListPtr, uint32 tv)
 Robot follows a wall. More...
 
BehbehClusterBroadcast (Beh *behPtr, NbrList *nbrListPtr, int32 tv, BroadcastMessage *msgPtr)
 Moves robot towards other robots broadcasting a message. More...
 
BehrvBearingController (Beh *behPtr, int32 angle, int32 gain)
 Rotate the robot to a given bearing using a proportional controller. More...
 
BehbehMoveForward (Beh *behPtr, int32 tv)
 Simple Behavior: move straight forward (no turning) More...
 
BehbehBearingController (Beh *behPtr, int32 angle)
 Rotate the robot to a given bearing using a proportional controller. More...
 
BehbehMoveToNbr (Beh *behPtr, Nbr *nbrPtr, int32 tv)
 Moves robot towards specified neighbor. More...
 
BehbehMoveFromNbr (Beh *behPtr, Nbr *nbrPtr, int32 tv)
 Moves robot away from specified neighbor. More...
 

Detailed Description

Basic swarm functionality behaviors.

This includes remote control, flocking, wall following, and follow-the-leader.

Since
September 28, 2011
Author
James McLurkin

Function Documentation

Beh* behBearingController ( Beh behPtr,
int32  angle 
)

Rotate the robot to a given bearing using a proportional controller.

Parameters
behPtrbehavior that is updated by this function
anglethe robot should rotate to
Returns
updated behPtr
Beh* behClusterBroadcast ( Beh behPtr,
NbrList *  nbrListPtr,
int32  tv,
BroadcastMessage msgPtr 
)

Moves robot towards other robots broadcasting a message.

Parameters
behPtrbehavior that is updated by this function
nbrListPtrlist of neighbors
tvdesired translational velocity
msgPtr
Returns
updated behPtr
Beh* behFlock ( Beh behPtr,
NbrList *  nbrListPtr,
int32  tv 
)

Robots flock together.

Parameters
behPtrbehavior that is updated by this function
nbrListPtrlist of neighbors
tvdesired translational velocity
Returns
updated behPtr
int32 behFlockAngle ( NbrList *  nbrListPtr)

Computes the flock angle.

Parameters
nbrListPtrlist of neighbors
Returns
flock angle or 0 if there are no neighbors
Beh* behFollowPredesessor ( Beh behPtr,
NbrList *  nbrListPtr,
int32  tv 
)

Follow robot whose ID is larger than yours.

Parameters
behPtrbehavior that is updated by this function
nbrListPtrlist of neighbors
tvdesired translational velocity
Returns
updated behPtr
Beh* behMoveForward ( Beh behPtr,
int32  tv 
)

Simple Behavior: move straight forward (no turning)

Parameters
behPtrbehavior that is updated by this function
tvdesired translational velocity
Returns
updated behPtr
Beh* behMoveFromNbr ( Beh behPtr,
Nbr *  nbrPtr,
int32  tv 
)

Moves robot away from specified neighbor.

Parameters
behPtrbehavior that is updated by this function
nbrPtrfor neighbor
tvdesired translational velocity
Returns
updated behPtr
Beh* behMoveToNbr ( Beh behPtr,
Nbr *  nbrPtr,
int32  tv 
)

Moves robot towards specified neighbor.

Parameters
behPtrbehavior that is updated by this function
nbrPtrfor neighbor
tvdesired translational velocity
Returns
updated behPtr
Beh* behOrbit ( Beh behPtr,
Nbr *  nbrPtr,
int32  tv 
)

Robot orbits the input neighbor.

Parameters
behPtrbehavior that is updated by this function
nbrPtrneighbor to be orbited
tvdesired translational velocity
Returns
updated behPtr
Beh* behWallFollow ( Beh behPtr,
NbrList *  nbrListPtr,
uint32  tv 
)

Robot follows a wall.

Parameters
behPtrbehavior that is updated by this function
nbrListPtrfor list of neighbors
tvdesired translational velocity
Returns
updated behPtr
Beh* rvBearingController ( Beh behPtr,
int32  angle,
int32  gain 
)

Rotate the robot to a given bearing using a proportional controller.

Parameters
behPtrbehavior that is updated by this function
anglethe robot should rotate to
gainpositive value governing how quickly the robot adjusts
Returns
updated behPtr