Combining ROS (Robot Operating System) and EtherCAT technologies, a concept of real-time robot control architecture for human–robot collaboration is presented in this research. The advantages of an ROS framework here are it is easy to integrate sensors for recognizing human commands and the well-developed communication protocols for data transfer between nodes. We propose a shared memory mechanism to improve the communication between non-real-time ROS nodes and real-time robot control tasks in motion kernel, which is implemented in the ARM development board with a real-time operating system. The jerk-limited trajectory generation approach is implemented in the motion kernel to obtain a fine interpolation of ROS MoveIt planned robot path to motor. EtherCAT technologies with precise multi-axis synchronization performance are used to exchange real-time I/O databetween motion kernel and servo drive system.