#include <GT2004HeadPathPlanner.h>
Collaboration diagram for GT2004HeadPathPlanner:
Public Member Functions | |
void | init (const Vector3< double > *vectors=0, long *durations=0, int numberOfVectors=0, bool optimizeTimings=true) |
Initializes a set of points to visit in a certain time. | |
void | oldInit (const Vector3< double > *vectors=0, int numberOfVectors=0, long duration=0) |
GT2004HeadPathPlanner (const SensorDataBuffer &sensorDataBuffer) | |
default constructor | |
bool | getAngles (double &neckTilt, double &headPan, double &headTilt) |
Calculates the angles for tilt pan and roll. | |
bool | isLastPathFinished () |
Return whether the last initialized path is already finished. | |
long | calculateHeadTiming (Vector3< double > &pos1, Vector3< double > &pos2) |
bool | headPositionReached (Vector3< double > pos) |
Public Attributes | |
double | lastNeckTilt |
The tilt calculated in the last frame. | |
double | lastHeadPan |
The pan calculated in the last frame. | |
double | lastHeadTilt |
The roll calculated in the last frame. | |
double | headPathSpeedNeckTilt |
the maximum speed of all angles | |
double | headPathSpeedHeadPan |
the maximum speed of all angles | |
double | headPathSpeedHeadTilt |
the maximum speed of all angles | |
const SensorDataBuffer & | sensorDataBuffer |
the sensordatabuffer | |
Static Public Attributes | |
const double | minimumHeadSpeed = 0.004 |
The minimum head speed in rad per frame: 0.004 = 28.6°/s. | |
Private Types | |
enum | { maxNumberOfPoints = 20 } |
maximum number of allowed points in head path More... | |
Private Member Functions | |
long | calculateDurationsSum (long *duration, int durations) |
Return the whole Duration of the Headpath. | |
Private Attributes | |
long | currentPoint |
index of the most recently reached point in head path, so the head is between points[currentPoint] and points[currentPoint+1] | |
long | currentFrame |
number of frames (a 8ms) since start of head path | |
long | numberOfFrames |
requested duration of head path in frames (a 8ms) | |
long | numberOfPoints |
number of points in requested path | |
Vector3< double > | points [maxNumberOfPoints] |
the points the head shall visit during the head path | |
double | firstFrame [maxNumberOfPoints] |
number of the first frame after head path start for a certain point in head path |
Definition at line 23 of file GT2004HeadPathPlanner.h.
|
maximum number of allowed points in head path
Definition at line 124 of file GT2004HeadPathPlanner.h. |
|
default constructor
Definition at line 62 of file GT2004HeadPathPlanner.h. References currentFrame, currentPoint, lastHeadPan, lastHeadTilt, lastNeckTilt, and numberOfFrames. |
|
Here is the call graph for this function:
|
Definition at line 34 of file GT2004HeadPathPlanner.h. References init(). |
Here is the call graph for this function:
|
Calculates the angles for tilt pan and roll.
Definition at line 101 of file GT2004HeadPathPlanner.cpp. References currentFrame, currentPoint, firstFrame, numberOfFrames, and Vector3< double >::x. |
|
Return whether the last initialized path is already finished.
Definition at line 75 of file GT2004HeadPathPlanner.h. References currentFrame, and numberOfFrames. Referenced by GT2004HeadControl::calibrateHeadSpeed(), and GT2004HeadControlSymbols::getLastHeadPathIsFinished(). |
|
Definition at line 141 of file GT2004HeadPathPlanner.cpp. References headPathSpeedHeadPan, headPathSpeedHeadTilt, headPathSpeedNeckTilt, max, Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z. Referenced by init(). |
|
Definition at line 84 of file GT2004HeadPathPlanner.cpp. References SensorData::data, SensorDataBuffer::lastFrame(), pi, toMicroRad(), Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z. Referenced by GT2004HeadControl::headPositionReached(), and GT2004HeadControl::setJoints(). |
Here is the call graph for this function:
|
Return the whole Duration of the Headpath.
Definition at line 71 of file GT2004HeadPathPlanner.cpp. Referenced by init(). |
|
The minimum head speed in rad per frame: 0.004 = 28.6°/s.
Definition at line 14 of file GT2004HeadPathPlanner.cpp. |
|
The tilt calculated in the last frame.
Definition at line 89 of file GT2004HeadPathPlanner.h. Referenced by GT2004HeadControl::execute(), GT2004HeadControl::GT2004HeadControl(), GT2004HeadPathPlanner(), init(), GT2004HeadControl::setJoints(), and GT2004HeadControl::setJointsDirect(). |
|
The pan calculated in the last frame.
Definition at line 92 of file GT2004HeadPathPlanner.h. Referenced by GT2004BasicBehaviorDirectedScanForLandmarks::execute(), GT2004HeadControl::execute(), GT2004HeadControl::GT2004HeadControl(), GT2004HeadPathPlanner(), init(), GT2004HeadControl::setJoints(), and GT2004HeadControl::setJointsDirect(). |
|
The roll calculated in the last frame.
Definition at line 95 of file GT2004HeadPathPlanner.h. Referenced by GT2004HeadControl::execute(), GT2004HeadControl::GT2004HeadControl(), GT2004HeadPathPlanner(), init(), GT2004HeadControl::setJoints(), and GT2004HeadControl::setJointsDirect(). |
|
the maximum speed of all angles
Definition at line 98 of file GT2004HeadPathPlanner.h. Referenced by calculateHeadTiming(), GT2004HeadControl::calibrateHeadSpeed(), and GT2004HeadControl::GT2004HeadControl(). |
|
the maximum speed of all angles
Definition at line 98 of file GT2004HeadPathPlanner.h. Referenced by calculateHeadTiming(), GT2004HeadControl::calibrateHeadSpeed(), and GT2004HeadControl::GT2004HeadControl(). |
|
the maximum speed of all angles
Definition at line 98 of file GT2004HeadPathPlanner.h. Referenced by calculateHeadTiming(), GT2004HeadControl::calibrateHeadSpeed(), and GT2004HeadControl::GT2004HeadControl(). |
|
the sensordatabuffer
Definition at line 101 of file GT2004HeadPathPlanner.h. |
|
index of the most recently reached point in head path, so the head is between points[currentPoint] and points[currentPoint+1]
Definition at line 114 of file GT2004HeadPathPlanner.h. Referenced by getAngles(), GT2004HeadPathPlanner(), and init(). |
|
number of frames (a 8ms) since start of head path
Definition at line 117 of file GT2004HeadPathPlanner.h. Referenced by getAngles(), GT2004HeadPathPlanner(), init(), and isLastPathFinished(). |
|
requested duration of head path in frames (a 8ms)
Definition at line 120 of file GT2004HeadPathPlanner.h. Referenced by getAngles(), GT2004HeadPathPlanner(), init(), and isLastPathFinished(). |
|
number of points in requested path
Definition at line 127 of file GT2004HeadPathPlanner.h. |
|
the points the head shall visit during the head path
Definition at line 130 of file GT2004HeadPathPlanner.h. |
|
number of the first frame after head path start for a certain point in head path
Definition at line 133 of file GT2004HeadPathPlanner.h. Referenced by getAngles(), and init(). |