Accessing the Camera Motion Abilities
General Information
The idea behind moving the camera is simple and easy to accomplish. For
each instance of a robot one needs to interact with the camera effector. All
the camera control functions can be accessed through that object, which is located in the pioneer agent.
Panning Information
In order to pan the camera from -90 degrees to +90 degrees you need to
call the following function:
public void pan (double degree);
The function takes a double representing the degree, thus as an example
45.0 is valid. To call this function one simple needs to have use some
form of the following code segment:
robot.myCameraEffector.pan(45.0);
If one makes several motion calls to the camera, you need to make sure
that the command has enough time to complete. The following series of
commands will result in the camera making a jerky motion and then
panning 10 degrees.
robot.myCameraEffector.pan(-10); //pan 10 degrees to the left
robot.myCameraEffector.pan(10); //pan back to center
robot.myCameraEffector.pan(10); //pan 10 degrees to the right
robot.myCameraEffector.pan(-10); //pan back to center
robot.myCameraEffector.pan(10); //pan 10 degrees to the right
Tilting Information
Tilting has it's own method that also takes the degrees to tilt. The
input to the function is between -20 degrees and +20 degrees.
public void tilt (double degree);
Zooming Information
As with the other functionalities zoom has it's own method. The method
is defined as :
public void zoom (int amount); //number 0-1024: 0 is wide, 1024 is tele
Panning and Tilting as One
It is possible to combine panning and tilting into one command for
speed and efficiency. The method takes two angles, the amount to pan
and the amount to tilt. It is defined as follows
public void panTilt (double pan, double tilt);