Visual Servoing — Fixed Camera
Problem Statement
Image-based visual servoing (IBVS) with a strapdown camera: the camera is rigidly bolted to the airframe, so the image is whatever the drone is pointing at. There is no second actuator to absorb tracking error — the only way to keep the target in frame is to move and yaw the vehicle itself.
That constraint is what makes the fixed-camera case harder than the gimbal variant, and it is the reason heading has to be servoed as a first-class loop rather than left to the position controller.
Model and Formulation
Three loops close on image measurements alone:
| Image error | Actuated by |
|---|---|
| horizontal bbox offset | body-lateral velocity |
| vertical bbox offset | climb rate |
| bbox size error | body-forward velocity |
The body-frame velocity command is a proportional map of the image error:
The lateral and vertical terms carry a negative sign because the image
Algorithm Procedure
- Detect the target and extract its bounding box in the image frame.
- Form the image error against the desired centre and apparent size.
- Flip the lateral and vertical signs into the body frame.
- Servo heading toward the target bearing to hold it inside the field of view.
- Emit saturated body-frame velocity commands.
Tuning and Failure Modes
- Check the sign convention before you touch the gains. Both image errors flip sign entering the control law. Get one wrong and the drone chases the target out of frame — positive feedback that looks exactly like an unstable gain, and that no amount of detuning will fix.
- The field of view is the real constraint. With no gimbal, a narrow FOV turns a momentary tracking lag into a lost target. Heading has to lead, not follow, the lateral position loop.
- Anchor the position setpoint to the current position. Integrating the velocity command into a persistent setpoint means that once the position loop starts lagging, nothing in the image pulls the setpoint back.
- Gain
too high produces oscillatory camera motion, which corrupts the very measurement the loop depends on. - Occlusion stops the bounding box updating; without explicit fallback logic the last error is held and the drone keeps flying on stale data.
Implementation and Execution
python -m flybots.simulations.perception.visual_servoing_fixedEvidence

References
- Chaumette and Hutchinson, Visual Servo Control Part I (2006)
- Chaumette and Hutchinson, Visual Servo Control Part II (2007)