| Humanoid robot is more easily accepted by the public because of their human-like appearance,which makes it become a hot spot in the field of robot research.With the development of humanoid robot technology and the system functions become more complex,software control has become the focus of humanoid robot research.By researching and analyzing the typical humanoid robots at home and abroad,we can see that the software control system has basically gone through the following four stages: centralized control,modular control,with distributed architecture,and using the robot software platform.However,the software control system still facing the problems of poor versatility,not easy to transplant and low code reusability,and so on.For this reason,based on the mechanical shell of DARwIn-OP2 humanoid robot and under the designed dual-controller hardware system,a humanoid robot software control system with distributed architecture,ease of portability and expansion,high code reusability is designed based on ROS.And the modules and functions are designed in a modular way.The research content of this dissertation mainly includes the following points:First,the typical humanoid robots and their software control system at home and abroad are analyzed and summarized.By comparing and analyzing several robot software frameworks,ROS is selected as the software framework to design the software control system of humanoid robot.Secondly,the robot binocular vision system is designed based on ROS.The image segmentation node is designed to realize the image acquisition of left and right cameras,and the corresponding parameters are obtained through calibration experiments.The ball detection node is designed to recognize the red ball based on HSV color segmentation and Hough circle detection.The SGBM algorithm of OpenCV is used for binocular stereo matching,and the ranging node is designed based on the principle of triangulation.The distance measurement experiments are carried out on the ball between 400 mm and 1000 mm,the results show that it can meet the requirements of human robot for the distance measurement of the ball.Thirdly,the Degree of Freedom(DOF)of the robot is analyzed and configured,and the range of its angular motion is limited.On this basis,using the mechanical shell of DARwIn-OP2,by configuring the URDF files and Gazebo properties,the simulation model and environment of robot are built.Fourthly,the motion control module,behavior control module and robot control module are analyzed and designed in detail.It mainly includes the node which is designed to control robot’s head tracking the ball;the robot’s motion planning group node is designed based on Moveit!,and proposing a design steps of kicking action;the configuration of virtual and real hardware interface of the robot is introduced and designed based on ros_control.Finally,the functions of the humanoid robot are simulated and verified under the environment of Gazebo.Through experiments,controlling the head to track the ball is realized under the environment of Gazebo.The multi-track continuous motion planning and kicking action are realized by programming based on C++ API of Moveit!,and the robot in the simulation environment is controlled in real time.The experimental results show that the software control system and functional modules designed in this dissertation are feasible,which lays the foundation for the research and development of real robot control. |