As robots are becoming more and more widespread in manufacturing, the desire and need for more advanced robotic solutions are increasingly expressed. This is especially the case in Denmark where products with natural variances like agricultural products takes up a large share of the produced goods. For such production lines, it is often not possible to use primitive preprogrammed industrial robots to handle the otherwise repetitive tasks due to the uniqueness of each product. To handle such products it is necessary to use sensors to determine the size, shape, and position of the product before a proper trajectory can be calculated in real-time for the robot to execute. This introduces a multitude of different challenges, some of which this project seeks to find the answer to. The production environment of agricultural products is not very well suited for advanced machinery. Handling crops often releases a lot of dust, livestock releases bodily fluids, and all naturally grown products plays host to different kinds of bacterial flora. To ensure food safety it is thus necessary to clean the production facilities daily. This is often done with high-pressure water which can easily cause small changes in the position or orientation of sensors and robots if hit, which in turn corrupts their internal relative calibration. And if the entire robot motion is based on a miscalibrated sensor measurement, the end result could easily be suboptimal or destroyed products, or even destroyed machinery. To avoid such outcomes and thus make sensor based control more reliable, an accurate calibration method has been developed as part of this project. After initial placement of a calibration target mounted on the robot end effector under a laser range scanner, the method can autonomously control the robot to determine the transformation between the laser scanner and the robot. And once the robot has a rough idea of the position of the scanner, the method can be used complete autonomously to correct for small misalignment after the daily cleaning cycle. Furthermore, the method makes it possible to calculate the worst case error of the calibration. This can help in guaranteeing end product uniformity, i.e. as part of a ISO9000 certification. Once the robot knows the pose of the product that needs manipulation, it needs to do a real-time calculation of an appropriate trajectory. The trajectory does not only need to be accurate with respect to the end pose of the robot, it also needs to be temporally accurate so the robot can manipulate the product without stopping the conveyor belt and thus possibly the entire production. To achieve temporal accuracy, it is necessary to know the delay throughout the entire system from acquisition delays in the sensor to actuation delays in the robot. To that end a method for measuring the actuation and response delay of an industrial robot manipulator, relative to the joint configuration of the robot, is presented. It is also shown how modern machine learning algorithms can be trained to build model based on the measurements. Once a model of the delay is constructed, it is furthermore shown how the model can be used for both forward and inverse predictions as well as current state corrections and thus improve on the temporal accuracy of an industrial robot manipulator. When using predefined trajectories for the robot, it is possible to simulate every motion and through prediction minimize the number of issues to ensure high uptime. With real-time generated trajectories and varying product shapes, this is not possible to the same extend. The robot could end up in singular configurations, the risk of a grasp failing when a product is lifted is increased, a sensor could malfunction or foreign objects could end up on the conveyor. A production system needs to be able to handle all these issues to ensure robustness and high uptime of the production facility. To accomplish this it is shown how an expert system can be used to monitor a robot executing a task and ensure that the system can either handle issues or at least degradein the least obstructive way. This is ensured through rules that defines the boundaries for solving the given task, and how the system must react if the boundary is crossed. Due to the generality of the methods presented in this project they constitutes a significant contribution towards using sensors for real-time control of robots, both in conjunction with industrial robots as well as in other robotic contexts.