# Self-Configurable Centipede-Inspired Rescue Robot
## 2 Materials and Methods  
### Mechanical Structure Design  
A flat-structured robot was successfully constructed by utilizing SOLIDWORKS to design and analyze a multi-section centipede-inspired robot. Each individual component was initially printed out one by one using 3D printing technology and subsequently assembled to form a complete robot. Throughout the design process, particular enhancement was placed on the robot's capability to traverse uneven terrain [61]. As such, a three-DoF-legged structure was adopted, with servos employed to drive the movement of each joint. This design enables the robot to navigate small obstacles efficiently, with each segmented limb measuring 11 cm in length and 32 cm, as illustrated in Figure 1. The centipede robot consists of multiple sections of four-legged robot parts, interconnected via magnetic docking devices. With the exception of the head section, which is equipped with additional cameras and a Raspberry Pi 4B, all other sections share an identical structure and are individually controlled by Raspberry Pi Pico microcontrollers. Communication between these sections is facilitated through GPIO ports. The kinematics modeling and gait planning design of the centipede-inspired robot has been finalized, resulting in the development of a two-part control system. This system consists of an upper computer and a lower computer. The upper computer, operating on the Ubuntu system on a Raspberry Pi 4B platform, processes environmental information. However, the lower computer, utilizing the RP2040 chip Raspberry Pi Pico microcontroller, receives decision-making results from the upper computer, as illustrated in Figure 2. Thisconfiguration governs the overall movement and posture of the centipede robot, enabling it to execute specific tasks in the current scenario. Each four-legged module of the robot is equipped with a rechargeable battery, allowing it to autonomously carry out tasks. Additionally, the Raspberry Pi 4B is equipped with a separate power module that can be applied to power the camera. A magnetic docking device system has been designed to overcome the limitation of the robot's four-legged structure in traversing large obstacles or stairs. Illustrated in Figure 3, this system facilitates the connection of multiple sections (three or more) of the four-legged structures. By emulating the crawling form of the centipede, the robot acquires the ability to negotiate higher obstacles. This innovation significantly enhances the robot's flexibility and responsiveness. The docking magnets within the docking system are designed as electromagnets, controlled by the Raspberry Pi Pico through the application and removal of electrical current. Figure 1: SOLIDWORKS simulation diagram of the four-legged robot frame. Figure 3: Display of magnetic docking device: (**a**) When there is no power, the magnets separate and (**b**) After energization, the magnets attract each other. Figure 2: Schematic diagram of the internal structure of a single-segment quadrupedal robot. In the presented centipede robot, these magnetic docking devices serve to provide mechanical coupling, allowing for the transfer of mechanical forces and moments between adjacent robot sections. This ensures a secure and stable connection during movement. Additionally, the Raspberry Pi Pico microcontrollers facilitate the transmission of electrical power and data, enabling synchronized control and communication throughout the entire robot. It is noteworthy that the magnetic docking device does not compromise the robot's flexible body feature. Instead, it serves to provide mechanical coupling between adjacent robot sections, controlled by the Raspberry Pi Pico via electrical current manipulation. This mechanism ensures the secure and stable connection of the robot sections during movement. The robot's flexible body feature is achieved through other design considerations, such as the use of joint configurations, enabling the robot to bend and adapt to its environment.