We have developed an optical stimulator system for vision-based sensors. The stimulator is an efficient tool for stimulating a camera during on-ground testing with scenes representative of spacecraft flights. Such scenes include starry sky, planetary objects, and other spacecraft. The optical stimulator is used as a test bench to simulate high-precision navigation by different types of camera systems that are used onboard spacecraft, planetary rovers, and for spacecraft rendezvous and proximity maneuvers. Careful hardware design and preoperational calibration of the stimulator result in high precision and long-term stability. The system can be continuously used over several days. By facilitating a full camera including optics in the loop, the stimulator enables the more realistic simulation of flight maneuvers based on navigation cameras than pure computer simulations or camera stimulations without the involvement of the actual optics.