As the field of robotics continues to expand,combining machine vision technology with robotic grasping allows for real-time identification and localization of target objects,giving the robot autonomous decision-making capabilities and expanding the range of robot applications.In this thesis,machine vision technology is combined with robotics to investigate vision-based robot grasping using the robot pouring task as an example.The main work is as follows:Firstly,the overall solution of vision-based seven-degree-of-freedom robot grasping was designed,the imaging and aberration model of the camera was analyzed,the coordinate system of the vision system was established and the conversion relationship between them was derived.The camera calibration and hand-eye calibration experiments of the depth camera were completed to obtain the internal and external parameters and aberration coefficients of the depth camera.The depth images obtained from the depth camera were aligned and restored with the colour images to improve the accuracy of the acquired images.Secondly,the recognition and localization of target objects was investigated.The datasets of water cups,water,tea and coffee were built as the research objects.The YOLOv5s model was used to train the self-built datasets,and the training results showed that the recognition accuracy and stability of the model were higher after training.The generalisation and robustness of the model was also tested by verifying the water cups that did not appear in the validation set and by adding obstacles,verifying that its recognition accuracy met the requirements of robot grasping.The YOLOv5 algorithm was used to localise the target object in three dimensions using the depth value of the 2D rectangular box generated by the YOLOv5 algorithm after recognising the target object and the depth image captured by the depth camera.The kinematics of the Sawyer seven-degree-of-freedom robot and the path planning problem in the grasping process were then investigated.The kinematic equations of the Sawyer seven-degree-of-freedom robot were established by the D-H method,and the validity of the kinematic equations was verified.To address the problem that the RRT algorithm was directionless in the process of robot path planning and generated useless nodes at the absence of obstacles,the RRT algorithm was improved by using the strategy of target bias and bi-directional segmentation search,and the improved RRT algorithm with guided bi-directional segmentation search was proposed and applied to the path planning of a seven-degree-of-freedom robot.The results showed that the improved RRT algorithm could effectively reduce the number of nodes and search time of the path,and improve the success rate of path planning,and also had significant improvement in path selection.Finally,a vision-based experimental platform was built for a seven-degree-of-freedom robot to grasp and pour water.The seven-degree-of-freedom robot grasping posture was designed,and the position of the robot when pouring water was designed according to the relative position of the water cup and the tea cup.The improved RRT algorithm was used to plan the grasping path,and the experiments on obstacle avoidance and water pouring of the seven-degree-of-freedom robot were completed to verify the effectiveness and feasibility of the designed robot grasping solution. |