![]() |
ronelib
Operating System for the r-one robot
|
Provides a consistent API for updating and accessing the external pose of the robot swarm. More...
Go to the source code of this file.
Data Structures | |
struct | ExternalPose |
External pose of the robot as determined by an outside ASCII radio command system. More... | |
Typedefs | |
typedef struct ExternalPose | ExternalPose |
External pose of the robot as determined by an outside ASCII radio command system. | |
Functions | |
void | externalPoseInit (void) |
sets up memory and radio callbacks for getting external pose data. More... | |
boolean | externalPoseGet (ExternalPose *poseArg) |
Gets this robot's pose. More... | |
boolean | externalPoseGetNbr (ExternalPose *poseArg, Nbr *nbrPtr) |
Gets the pose of a given neighbor. More... | |
int32 | externalPoseGetNbrRange (Nbr *nbrPtr) |
Gets the distance to a given neighbor's external pose. More... | |
boolean | externalPoseIsHost (void) |
Determines if this is "the Host" (the robot connected over serial to external system). More... | |
boolean | externalPoseIsActive (void) |
Determines if the external pose is active or inactive. More... | |
Provides a consistent API for updating and accessing the external pose of the robot swarm.
This was developed as an interface between poses provided by the Newton Cam and the AprilTag system, but will work for any system that provides ASCII radio commands of the form:
"EP, ID, X,Y,theta"
Where 'X','Y','theta' are integers. To use this, call externalPoseInit(); in your behaviorTask()
boolean externalPoseGet | ( | ExternalPose * | poseArg) |
Gets this robot's pose.
poseArg | (overwritten if external pose is active with external pose data) |
boolean externalPoseGetNbr | ( | ExternalPose * | poseArg, |
Nbr * | nbrPtr | ||
) |
Gets the pose of a given neighbor.
poseArg | (overwritten with external pose data if external pose is active and a neighbor) |
nbrPtr | robot we want to know the external pose of |
int32 externalPoseGetNbrRange | ( | Nbr * | nbrPtr) |
Gets the distance to a given neighbor's external pose.
nbrPtr | for robot we want to know the distance from |
void externalPoseInit | ( | void | ) |
sets up memory and radio callbacks for getting external pose data.
Should be called once in behaviorTask.
boolean externalPoseIsActive | ( | void | ) |
Determines if the external pose is active or inactive.
boolean externalPoseIsHost | ( | void | ) |
Determines if this is "the Host" (the robot connected over serial to external system).