Help with the camera


how i can set the range for gimbal track of the camera, because I need the path of the camera is larger than the default results of the gimbal track, but i dont know how :smiley:


Is the camera mounted on the original servo powered gimbal? or did you mount it rigidly to the robot? or on a part of the robot that turns, like a turret?

in the original with the servos for move it, in the two color servo camera example, the gimbal track oscillating is very lower, we need a higher oscillating

The subVI called something like Servo Tracking State Machine, has values on the front panel to control how the gimbal moves.

The Upper Limit and Lower Limit are servo angles limiting the setpoints read by the other loop. In other words, if you don’t want the gimbal to look down, you’d change the lower limit Y from 40 to 85 or so. If you don’t want it to look up, you’d change the upper limit Y from 130 to 100 or something.

In case I misunderstood the question, let me give info on the other values on the panel which are not parameters. First are the Proportional numbers. These control how much the servo moves and which direction it moves when it isn’t centered. To make the servo more responsive, lower the number, to slow it down and avoid oscillation, raise it. The Search Speed number determines how quickly the gimbal will move when not following a target. If set too high for a slow frame rate, you will get a blurry image or will complete skip past a target.

Finally, the attachment shows the code that does the search. It is run when the current frame doesn’t have a recognizable target, and the recent frames didn’t either. After some time, the servo control gives up and decides to look around in the (searching) state. The small code snippet there implements a squished spiral, which may not be the best way of doing it for this competition, but the math is cool and it works well for a bench test.

Feel free to change this searching math to whatever seems right. The default code takes 85, 85 which is the center spot of the servo, and adds the offset of the spiral in increments of .2 radians for 100 steps, then it stops and changes states to Search-Begin which centers the servos again.

If you just want the spiral to be bigger, increase the 100 to do more steps before stopping. If you want it to go faster, increase the 0.2. Or like I said, maybe you just want to do a pan from one side to the other.

Greg McKaskle

Picture 5.png

Picture 5.png

Note that the mount that comes with the KoP has a set range that you cannot exceed. Only like 180 degrees I believe.

By the way. I forgot to mention it, but anytime you have controls with default values like used there, it is great for tuning, just make sure once tuned to stop the app and make current value default for anything changed.

Greg McKaskle