The invention discloses a method for transmitting real-time messages among multiple robots. The purpose is to provide support for real-time transmission of network messages based on ROS at the robot middleware layer, so that the process of message transmission between multiple robots can meet the requirements of priority and transmission delay. Wait for time constraints. The technical solution is to introduce DDS, a network messaging specification with real-time guarantee capability, into ROS. First, build a multi-robot computing node environment. In this environment, the operating system Ubuntu, robot middleware ROS, and message real-time middleware that comply with DDS specifications are built. And the ROS / DDS protocol plug-in, the ROS / DDS protocol plug-in supports the real-time attribute setting of ROS messages, and realizes the mutual conversion between ROS messages and DDS messages, and uses the real-time message middleware that conforms to the DDS specification to send and receive messages. By adopting the present invention, under the condition that the existing multi-robot distributed application directly uses the ROS / DDS protocol plug-in without modification, the real-time performance of message transmission among multi-robots can be realized at the robot middleware layer.