Quote:
|
Originally Posted by Jon236
In using WPILib with the CMU camera,
1. Should we save Vision Sensor parameters from LabView? And if so, how?
|
There is no easy way of exporting the camera parameters from LabView. I ran out of time. What you should do is create an instance of a CameraInitializationData struct, fill it in (can be statically initialized) and passed to InitializeCamera(CameraInitializationData *c). You can get the data looking at the labview interface and filling in the struct.
The CameraInitializationData struct is in UserAPI.h. This is a rom struct so you have to initialize it when it is declared.
When InitializeCamera is called, the data will be sent to the camera. When you call StartCamera, it will start tracking with the most recent set InitializationData.
Quote:
|
Originally Posted by Jon236
2. Are there any references to the SetServoTracking and SetServoPosition functions?
|
I'll try to add them to the documentation. But basically they look like this:
Code:
void SetServoTracking(unsigned char panTracking, unsigned char tiltTracking)
Where you set panTracking and tiltTracking to 1 or 0 to enable or disable that function. If either are disabled, then there won't be valid pan/tilt data in the returned camera packets.
Code:
void SetServoPosition(unsigned char servo, unsigned char position)
The servo is the servo index (value of 0-4) as described in the CMU Camera manual. The position is the PWM value sent to that servo.
Quote:
|
Originally Posted by Jon236
3. Do the 'pan' and 'tilt' values in the CaptureTrackingData structure refer to values that the servos should have to track the centroid of the desired color?
|
The pan and tilt values in the CaptureTrackingData are the values that the camera sends to the servos if it is connected and servo tracking is enabled (see previous question). If servo tracking is disabled the camera sends back 127 all the time.
Hope this helps.