The LookAtPoint module turns the robot (or the neck of the robot) towards a given absolute point.
The LookAtPoint module reads its main configuration from the pLookAtPoint section of the mission file. The parameters read from this section are:
1. <b>AppTick</b>
2. <b>CommsTick</b>
3. <b>maxRotationSpeed :</b> maximum rotation speed in deg/sec.
4. <b>maxAngleNeck :</b> maximum rotation of the neck in deg.
To use the neck, this module needs the eNeck module started and correctly configured. [TODO: link with the eNeck page when created].
The LookAtPoint module watches the LOOK_AT_POINT variable for the target point (published as a serialized CPoint2D). It also needs the LOCALIZATION variable so it can obtain the relative position of the target.
To turn the robot towards the target, the MOTION_CMD_V (linear speed of the robot) and MOTION_CMD_W (angular speed of the robot) are published. To turn the neck, LookAtPoint uses the NECKMSG variable to communicate with eNeck [TODO: link with the eNeck page when created].
The module also listens to the SHUTDOWN variable to close.
This section contains all the information about the development of the module. Read it if you intend to gain insight about the implementation or you plan to improve or debug it.
In each Iterate() tick, the LookAtPoint module polls the LOCALIZATION and LOOK_AT_POINT variable. If a target has been set, it will start turning the body of the robot (or the neck, depending on the angle) towards it by using the motion variables. After this, in each iteration, the module will check if the desired orientation has been reached.
[TODO: do tests]
[TODO: do tests]
Anonymous