Servo actuated quadroped walking robot, Crabbaro
Assignment 4 in IN5590 By Kristian Isaksen & Magnus Bærø Undhjem Printer: bjarne. Topic B (Servo actuated quadroped walking robot)
Assignment text can be found here.
Topic and motivation
Most people know the feeling of a happy dog spotting you and coming towards you. It is a simple behaviour, but it gives a strong impression of personality and intent. We want to find out whether a small, servo-driven quadruped robot can recreate some of that feeling with our crab-like robot.
We chose the quadruped topic because it combines the two things we find most interesting in the courses: designing a walking mechanism from scratch, and connecting it to perception so the robot reacts to its surroundings. A walking robot that only walks forward is just a mechanics exercise. A robot that notices something and goes to it feels alive, which is what we want to explore. Four legs also make the robot relatively stable, so we can spend our time on the movement and behaviour instead of on balance.
TL;DR: A robot that follows a colour and shape:)
Goals
The goal of this project is to design and build a quadrupedal walking robot that can detect a coloured target object and orient itself towards it. The main focus of the project will be the physical design of the robot, including the leg structure, placement of the servo motors, joint design, balance, and stability while turning and walking.
The robot will use a camera to identify a target object selected by the user, for example a red, blue, or green object. Object recognition is needed because the detected object will act as the target that the robot must face and move towards.
The primary performance goal is fast and accurate orientation rather than high walking speed. For this project, “fast” means that the robot should rotate towards a target that is initially up to 50° away within 5 seconds. The robot should stop with an angular error of no more than 15° from the centre of the target.
The project will be considered successful if the robot can:
- Detect a user-selected coloured object at a distance of at least 1 metre.
- Turn in place towards the detected object.
- Rotate up to 50° in less than 5 seconds.
- Face the target with an error of less than 15°.
- Walk forward for at least 1 metre after orienting itself.
- Remain stable while turning and walking, without falling over.
The aspect that will be optimized is the turning performance. We will test different leg positions, turning gaits, servo speeds, and body designs to find a solution that gives the shortest turning time while keeping the robot stable and accurate.
We take inspiration from these robots:
- The first one is a project from the Arduino forum by user aplux ^1. The main takeaway from this project is the design, and where to put the servos.
- The second project is this one from the STEMpedia website^2. It has very similar joints to the other robot, but the main inspiration from this one is the camera and how it recognises objects.
Sketch

Design. Crabbaro has a rectangular 3D-printed body with four legs in an X-shape, as seen from above in the sketch. Each leg has two Dynamixel AX12 servos (red boxes): a hip servo that swings the leg forward and backward, and a knee servo that lifts and lowers the foot. The Raspberry Pi 5 sits on top of the body. The camera is mounted at the front, so the robot "looks" where it walks. The camera has built-in distance sensing, so it is also used to measure the distance to the target.
How it works. All processing runs on the Raspberry Pi:
- User input: The user selects the target colour (red, blue or green) from a laptop connected to the Raspberry Pi.
- Search: If the target is not visible, Crabbaro turns in place until the camera finds an object of the selected colour.
- Orient: Crabbaro turns in place until the target is in the centre of the camera image, within 15°.
- Approach: Crabbaro walks forward towards the target, and turns again to correct its heading if the target drifts away from the centre of the image.
- Stop: The camera's distance sensing measures how far away the target is, and Crabbaro stops when it is about 20 cm from it. If the target is lost at any point, Crabbaro goes back to searching.
Scope and autonomy. Crabbaro is fully autonomous after the user has selected a colour, and there is no remote control while it moves. Obstacle avoidance, uneven terrain and running on battery are outside the scope of the project.
Power and weight. A power supply is heavy, and carrying it would make walking and fast turning harder. The power supply is therefore placed next to the robot and connected with a cable, so the robot only carries the Raspberry Pi, the camera and the servos. We will also keep the 3D-printed parts as light as possible.
Bill of materials (BOM)
| Item | Description | Quantity |
|---|---|---|
| 1 | Dynamixel AX12 | 8 |
| 2 | Raspberry Pi 5 | 1 |
| 3 | Raspberry Pi camera | 1 |
| 4 | 12v 5A powersupply | 1 |
Plan
| Task | Responsibility | Deadline |
|---|---|---|
| 3D-model parts | Kristian | October 26th |
| Print parts | Kristian | October 28th |
| Assemble parts | Both | November 2nd |
| Program object recognition | Magnus | November 9th |
| Program robot turning and searching function | Magnus | November 11th |
| Program robot straight forward walk | Kristian | November 9th |
| Assemble programs to one project | Both | November 13th |
| Evaluation and optimizing | Both | November 24th |