智能电动模型小车车道跟踪和主动避障控制

 2022-08-11 04:08

论文总字数:60153字

摘 要

本文以遵循相似性原理设计的四轮独立驱动智能小车作为实验平台,为了在未来将算法应用到真实车辆中,针对小车运动控制问题中的车道跟踪和主动避障控制算法作为研究对象来进行研究和实验。本文的主要创新之处在于使用了多线程软件架构,使用多传感器检测环境来进行局部路径规划策略,使用模块化的上位机与下位机程序,并在此基础上提高了数据实时性、控制稳健性、软件可移植性。实验结果表明小车能稳健地同时完成车道跟踪和主动避障功能。

首先,本文在原有硬件基础上进行改装,重新设计智能小车的整体控制框架,使用上位机与下位机将程序分离为控制端与执行端。为了利用单目相机有效识别车道,使用Canny边缘检测与霍夫变换算法提取车道线。为了识别前方障碍物,本文利用迷你二维激光雷达得到外界信息,并使用程序提取和分析雷达数据,从而根据不同的雷达采样点特征来识别不同的障碍物。在该控制框架中,作为上位机的PC端对雷达和图像数据进行采集、处理与结合,并且进行单车道跟踪和主动避障控制算法的实现与转向数据的输出。上位机将采集到的信息处理完成后,给下位机发送转向指令,最后作为下位机的STM32单片机对四轮独立驱动智能小车的驱动电机与转向舵机使用PID控制和起停控制,实现智能小车的车道跟踪和主动避障功能。

关键词: 图像处理,车道跟踪,主动避障,局部路径规划,反馈控制,多线程

Abstract

This paper uses a four-wheel independent driving smart car designed according to the similarity principle as an experimental platform. In order to apply the algorithm to real vehicles in the future, the lane tracking and active obstacle avoidance control algorithms in the car motion control problem are studied as research objects. And experiment. The main innovation of this paper is the use of multi-threaded software architecture, the use of multi-sensor detection environment for local path planning strategies, the use of modular host computer and lower computer program, and on this basis to improve the real-time data, control of sound Sex, software portability. The experimental results show that the car can perform lane tracking and active obstacle avoidance functions at the same time steadily.

First of all, this article carries on the modification on the original hardware foundation, redesigns the overall control frame of the intelligent car, uses the upper computer and the lower computer to separate the procedure into the control end and the execution end. In order to use the monocular camera to effectively identify lanes, lane lines can be extracted using the Canny edge detection and Hough transform algorithms. In order to identify the obstacles in front, this article uses the mini two-dimensional laser radar to obtain external information, and uses procedures to extract and analyze radar data, so as to identify different obstacles according to different radar sampling point characteristics. In this control framework, the PC side of the host computer collects, processes and fuses radar and image data, and implements single-lane tracking and active obstacle avoidance control algorithm and steering data output. After the host computer processes the collected information, it sends a steering command to the lower computer. Finally, the STM32 single-chip microcomputer as the lower computer implements the PID control and start-stop control of the four-wheel independent drive smart car's drive motor and steering servo to realize the intelligent car. Lane tracking and active obstacle avoidance features.

KEY WORDS: image processing, lane tracking, active obstacle avoidance, local path planning, feedback control, multi-thread

目 录

第一章 绪论 1

1.1课题研究背景 1

1.1.1研究背景 1

1.1.2国内外现状 1

1.1.3小结 3

1.2课题研究内容 3

1.3课题研究意义 3

第二章 整体软硬件架构设计 5

2.1硬件设计 5

2.2硬件安装 6

2.2.1实验小车 6

2.2.2实车实验道路 6

2.3程序设计 8

2.3.1 PC程序架构 8

2.3.2小车单片机程序架构 9

2.4本章小结 10

2.4.1小结 10

2.4.2不足与展望 10

第三章 图像信号与雷达信号的采集与处理 11

3.1图像处理概述 11

3.2雷达概述 11

3.3图像处理算法原理 12

3.3.1 OpenCV简介 12

3.3.2图像帧提取、裁剪与灰度化 12

3.3.3图像的除噪 13

3.3.4 Canny边缘检测 13

3.3.5霍夫变换 14

3.4激光雷达通信原理 14

3.4.1雷达的通信接口协议与使用 14

3.4.2 SDK软件开发工具包的使用 16

3.5程序算法 16

3.5.1图像处理函数的算法实现流程 16

3.5.2雷达处理函数的算法实现流程 16

3.5.3算法代码 17

3.6实验结果 17

3.6.1图像处理实验 17

3.6.2雷达处理实验 17

3.7本章小结 18

3.7.1小结 18

3.7.2不足与展望 18

第四章 车道线跟踪与主动避障的路径规划设计 19

4.1概述 19

4.2算法实现 19

4.2.1车道线跟踪 19

4.2.2主动避障 19

4.2.3结合二者的局部路径规划 20

4.2.4程序代码 20

4.3本章小结 20

4.3.1小结 20

4.3.2不足与展望 21

第五章 小车控制算法与通信协议 22

5.1电机控制算法 22

5.1.1 PID控制器 22

5.1.2 PID的离散 22

5.2舵机控制算法 23

5.3串口通信原理 23

5.3.1通信协议 23

5.3.2使用API函数实现串口通信 23

5.4下位机异常或故障处理 24

5.4.1看门狗 24

5.4.2电机及舵机阈值 24

5.4.3异常通信 24

5.5程序实现 25

5.5.1下位机流程 25

5.5.2程序代码 25

5.6本章小结 25

第六章 实验结果与总结 26

6.1实验结果 26

6.1.1单直道跟踪与避障 26

6.1.2弯道跟踪 27

6.1.3实验结果视频 27

6.2总结 27

致 谢 29

参考文献 30

附录A 图像处理程序代码 31

剩余内容已隐藏,请支付后下载全文,论文总字数:60153字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;