Next: 2.21 WiFiProxy
Up: 2. Class Reference
Previous: 2.19 SpeechProxy
Contents
Subsections
The TruthProxy gets and sets the true pose of a truth device [worldfile tag: truth()]. This may be different from the pose returned by a device such as GPS or Position. If you want to log what happened in an experiment, this is the device to use. Setting the position of a truth device moves its parent, so you can put a truth device on robot and teleport it around the place.
double x, y, a;
These vars store the current device pose (x,y,a) as (m,m,radians). The values are updated at regular intervals as data arrives. You can read these values directly but setting them does NOT change the device's pose!. Use TruthProxy::SetPose() for that.
TruthProxy(PlayerClient* pc, unsigned short index,
unsigned char access = 'c')
Constructor. Leave the access field empty to start unconnected.
void Print()
Print out current pose info in a format suitable for data logging.
int GetPose( double *px, double *py, double *pa )
Query Player about the current pose - requests the pose from the server, then fills in values for the arguments (m,m,radians). Usually you'll just read the x,y,a attributes but this function allows you to get pose direct from the server if you need too. Returns 0 on success, -1 if there is a problem.
int SetPose( double px, double py, double pa )
Request a change in pose (m,m,radians). Returns 0 on success, -1 if there is a problem.
int SetPoseOnRoot( double px, double py, double pa )
???
int GetFiducialID( int16_t* id )
Request the value returned by a fiducialfinder (and possibly a foofinser, depending on its mode), when detecting this object.
int SetFiducialID( int16_t id )
Set the value returned by a fiducialfinder (and possibly a foofinser, depending on its mode), when detecting this object.
Next: 2.21 WiFiProxy
Up: 2. Class Reference
Previous: 2.19 SpeechProxy
Contents
2004-05-31