文档库 最新最全的文档下载
当前位置:文档库 › 基于ROS系统的摄像头循迹小车设计

基于ROS系统的摄像头循迹小车设计

基于ROS系统的摄像头循迹小车设计
基于ROS系统的摄像头循迹小车设计

2019年第2期96计算机应用技术

信息技术与信息化基于ROS 系统的摄像头循迹小车设计

Design of Camera Tracking Car Based on ROS System

王 昊* 关 豪 王鹏飞 张映宏

WANG Hao GUAN Hao WANG Peng-fei ZHANG Ying-hong 摘 要 随着工业自动化和机器人技术的不断发展,机器人在工业生产领域的应用越来越广泛,具有循迹能力的

自动导引运输车(AGV)是工业机器人的一种典型应用,本文介绍了采用摄像头实现循迹功能的机器人小

车软硬件设计及算法实现。硬件层面,小车采用STM32微控制器和树莓派主板作为小车的控制核心;软

件层面,小车使用ROS 系统作为中间件,基于OpenCV 实现摄像头数据的读取和循迹算法。文中介绍的

小车由循迹层和运动控制层组成,循迹层采集摄像头数据并根据摄像头采集到的画面计算出小车的目标

运动速度和方向,运动控制层根据循迹层的计算结果控制驱动小车按照指定速度运动。实验表明,相较

于电磁导轨等循迹系统,小车采用摄像头实现循迹功能具备场地部署简单、成本低,循迹算法可以有效

工作的特点。

关键词 摄像头;循迹;ROS 系统;智能小车;颜色识别

Abstract With the continuous development of industrial automation and robotics, robots are more and more widely used in industrial production. The AGV (Automated Guided Vehicle) is a typical application of industrial robots. This paper introduces the use of cameras. The software and hardware design and algorithm implementation of the robot car that realizes the tracking function. At the hardware level, the car uses STM32 microcontroller and Raspberry Pi motherboard as the control core of the car; at the software level, the car uses the ROS system as the middleware, and realizes the camera data reading and tracking algorithm based on OpenCV. The car introduced in the paper consists of a tracking layer and a motion control layer. The tracking layer collects the camera data and calculates the target moving speed and direction of the car according to the picture captured by the camera. The motion control layer controls the driving car according to the calculation result of the tracking layer. Exercise at the specified speed. Experiments show that compared with the tracking system such as electromagnetic guide rail, the car adopts the camera to realize the tracking function, which has the characteristics of simple site deployment, low cost, and the tracking algorithm can work effectively.

Key words camera; tracking; ROS system; smart car; color recognition

doi:10.3969/j.issn.1672-9528.2019.02.026

* 西安石油大学计算机学院 陕西西安 710300

[基金项目]西安石油大学大学生创新创业训练计划资助,

项目编号:20171070501 0 引言

根据《中国制造2025》计划,中国将在10年内实现从“制

造大国”向“制造强国”的转变,制造业发展的重点之一,

就是工业自动化和机器人技术。而循迹小车作为工业机器人

的典型应用,其相关技术也成为研究的重点。以一个简单的应用场景为例:在自动化工厂中循迹小车沿预先铺设的引导线运输生产材料,在这一场景中,有很多种可用的循迹技术。例如,可以采用一组(一般为2-4个)水平排列的红外传感器采集小车前方的红外反射信号来判断引导线的位置并循迹[1];也可以采用预铺的电磁引导线并使用电磁传感器来

识别引导线[2];还有一种就是本文使用的方法,使用摄像头

采集车辆前方黄色引导线的图像,进行图像识别,并判断引导线的位置。采用红外传感器进行循迹时,由于红外传感器数量较少,只能得到简单的左偏或右偏的信息,无法精确的

相关文档
相关文档 最新文档