The invention relates to a method and a system for controlling a robot, which has at least one redundant degree of freedom. The method according to the invention prevents the robot from colliding with its surrounding environment and/or from getting into an inconvenient position as a result of its redundancy, and does so without causing any disadvantageous displacement of the tool center point.