Traditionally, most industrial robots are programmed by teaching. Automatic planning of robotic tasks has many potential benefits for flexible automation. It allows the user to describe a task to the robot programming system in a formal and natural manner, and reduces the time required to generate and update robot programs. Two main levels of abstraction in describing robot tasks can be identified. Robot-level programming is based on robot movements and actions, as detailed by the programmer. Object-level or task-level programming allows the user to describe assembly tasks in terms of operations performed on objects being manipulated instead of specifying the individual motions of the robot end-effector. However, commercially available robot-level programming languages still fall short of the robot user's need to programme complex tasks and consequently are not widely used in industry. There is an increasing need for integrating sensors feedback into the robot system to provide better perception and for improving the capacity of the robot to reason and make decisions intelligently in real-time. Task-level programming represents the highest level of abstraction and is the most attractive, as it uses reasoning capabilities provided by Artificial Intelligence. To date, no system of this class has been completely implemented in industry. This paper reviews the progress made in robot programming and task planning systems in the last twenty years, and discusses the current research trends.