刘汉忠 俞鹏 谢秦韬
摘 要: 设计一种基于STM32为主控芯片的循迹机器人小车,用CCD摄像头作为路径识别装置,采用边缘检测算法提取路径中线,根据小车的速度与转弯半径,采用模糊控制调节小车左右轮的速度差,达到路径识别与跟踪的目的。设计中通过建立里程计模型把小车的实时理想位置通过蓝牙传送至PC端,PC端通过数据处理将理论轨迹和实际运行轨迹进行对比,实验结果表明,小车可以依靠CCD摄像头很好地识别任意路径轨迹,在不同的运行速度下,模糊控制都有较理想的循迹控制效果。
关键词: CCD摄像头; 循迹; STM32; 模糊控制; 控制器; 路径识别
中图分类号: TN876?34; TP242.6 文献标识码: A 文章编号: 1004?373X(2019)09?0095?03
Research and realization of CCD camera based fuzzy control method
for tracking robot car
LIU Hanzhong, YU Peng, XIE Qintao
(School of Automation, Nanjing Institute of Technology, Nanjing 211167, China)
Abstract: A tracking robot car taking STM32 as main control chip is designed, in which CCD camera is deemed as the path recognition device, and the edge detection algorithm is used to extract the path central line. According to the speed and turning radius of the car, the fuzzy control is used to adjust the speed difference of the left and right wheels to achieve the purpose of path recognition and tracking. The real?time ideal position of the robot car is transmitted to the PC end by establishing the odometer model. The theoretical trajectory and actual running trajectory are compared by means of data processing on the PC end. The experimental results show that the robot car can accurately recognize any path by means of CCD camera, and the fuzzy control can obtain the ideal tracking control effect at different running speeds.
Keywords: CCD camera; tracking; STM32; fuzzy control; controller; path recognition
0 引 言
餐厅服务机器人以及工业应用中的AGV小车,其动力驱动系统都是建立在循迹小车这一基本模型之上的。循迹小车涉及的主要技术有传感器技术、运动控制等,通常装有红外传感器、超声波传感器、扫描激光雷达以及视觉传感器等[1?10]。红外和超声传感器通常需要安装多个,路径识别度较低,但应用简单。目前扫描激光雷达及视觉CCD传感器是循迹小车发展的主流[1,3?4,7],识别度高,但使用复杂。循迹控制算法通常有基于運动学方程[1,3]、PID控制[8]等常规控制方法,也有一些智能控制方法[1?3]。研究循迹小车的控制算法能够有助于更好地这些技术运用于生活以及工业生产中。本文主要介绍基于线阵CCD的路径识别方法及基于模糊控制的循迹控制方法。
1 系统原理
机器人小车采……