1. A method of programming at least one robot by demonstration comprising: performing at least one set of demonstrations of at least one task in the field of view of at least one fixed camera to obtain at least one set of observed task trajectories of at least one manipulated object; generating a generalized task trajectory from said at least one set of observed task trajectories; and executing said at least one task by said at least one robot in the field of view of said at least one fixed camera, using image-based visual servoing to minimize the difference between an observed trajectory during said execution and the generalized task trajectory; wherein Cartesian positions and velocities of said at least one manipulated object are calculated from image measurements from said at least one set of observed task trajectories, and said image-based visual servoing comprises following said Cartesian positions and velocities of said at least one manipulated object by minimizing the difference between said observed task trajectory during said execution and the generalized task trajectory.