← Back to all projects← 返回所有项目
EECE 2160 · Embedded Design: Enabling Robotics嵌入式设计:赋能机器人

Autonomous Hexapod Spider Robot自主六足蜘蛛机器人

Embedded & FPGA嵌入式与 FPGA · Summer 20262026 年夏
C++ / OOPCyclone V SoCDE10-NanoEmbedded LinuxFPGA / QuartusMemory-Mapped I/OPWM ServosUltrasonic SonarRobotics

Overview项目概述

A six-legged (hexapod) walking robot controlled in C++ on a DE10-Nano (Intel Cyclone V SoC). The FPGA generates 18 servo PWM signals plus an ultrasonic ranging circuit, while an object-oriented control stack walks the robot with a tripod gait — and, in the capstone lab, reads a memory-mapped sonar to avoid obstacles autonomously.一个用 C++ 在 DE10-Nano(Intel Cyclone V SoC)上控制的六足步行机器人。FPGA 生成 18 路舵机 PWM 信号以及一个超声波测距电路,面向对象的控制栈以三足步态驱动机器人行走——并在结课实验中读取内存映射的声呐数据,实现自主避障。

The Robot这台机器人

The Terasic spider is a six-legged (hexapod) walking robot. Each of its six legs — right and left front, middle, and back — has three servo-driven joints (hip, knee, and ankle), for 18 servos in total. It runs on a DE10-Nano board built around an Intel Cyclone V SoC, which fuses an ARM processor running embedded Linux with FPGA fabric on a single chip.Terasic 蜘蛛是一台六足步行机器人。它的六条腿——左右各有前、中、后——每条腿都有三个由舵机驱动的关节(髋、膝、踝),共计 18 个舵机。它运行在一块基于 Intel Cyclone V SoC 的 DE10-Nano 开发板上,该芯片在单一芯片内融合了运行嵌入式 Linux 的 ARM 处理器与 FPGA 逻辑。

Hardware & FPGA硬件与 FPGA

The FPGA handles real-time signal generation while Linux runs the high-level control:FPGA 负责实时信号生成,Linux 负责高层控制:

Software Architecture (C++ OOP)软件架构(C++ 面向对象)

The control stack is layered and object-oriented:控制栈分层且面向对象:

Lab 9 — Adding Obstacle Avoidance (the hard one)实验 9 — 加入避障(最难的一关)

Earlier labs walked the robot open-loop, with no sensing. Lab 9 closes the loop with the sonar:之前的实验都让机器人在开环下行走,没有任何感知。实验 9 用声呐闭合了控制回路:

What this project shows这个项目体现了什么

Diagrams示意图

Ultrasonic SonarHC-SR04FPGA Sonar Circuit (Quartus)→ range in centimetresC++ ControlARM + Embedded LinuxReadRange() · decideFPGA18× PWM Generators18 Servos6 legs × 3 jointsSpider walksin the world trigger / echo pio_range @ 0x180 commands PWM tripod gait measures distance (closed loop)
Closed-loop control: the FPGA sonar circuit reports distance through a memory-mapped register; the C++ controller reads it and drives the 18 servos accordingly.闭环控制:FPGA 声呐电路通过内存映射寄存器报告距离;C++ 控制器读取后据此驱动 18 个舵机。
Alternating Tripod Gait forward RFRMRB LFLMLB Tripod 1 (RF · LM · RB) Tripod 2 (LF · RM · LB)
Alternating tripod gait — three legs (RF, LM, RB) stay planted while the other three (LF, RM, LB) swing, then they switch, producing stable forward motion.交替三足步态——三条腿(RF、LM、RB)着地支撑,另外三条(LF、RM、LB)摆动,随后交换,从而实现稳定的前进。
Object-Oriented Control Stack SpiderInit() · Standup()MoveForward / BackwardLeftTurn / RightTurnMoveSquare()SpiderLeg × 6Hip · Knee · AnkleMoveJoint(angle)Motor × 3set angle (PWM)MMap / RegisterMapmemory-mapped I/O owns 6 owns 3 register writes
Object-oriented control stack: one Spider owns six SpiderLeg objects, each with three Motor joints, all reaching the FPGA through a memory-map layer.面向对象的控制栈:一个 Spider 拥有六个 SpiderLeg,每个又含三个 Motor 关节,全部通过内存映射层与 FPGA 通信。
×❮
❯