基于ROS系统的智能网联小车测试装调 中英

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

主讲人:刘顺祥

2024年6月
01 智能网联汽车概述
目 录
Overview of intelligent and connected vehicles
CONTENTS

02 ROS系统智能小车-及其功能
ROS system intelligent car overview of intelligent
connected vehicle system composition
智能网联汽车概述

l 定义

搭载先进的车载传感器、控制器、执行
器等装置,并融合现代通信与网络技术,
Definition: carrying advanced on-board sensors,
实现车与X(人、车、路、云端等)智能 controller, actuator device, and integration of
modern communication and network technology,
信息交换、共享,具备复杂环境智能感
realize car and X (people, car, road, cloud, etc.)
知、决策、控制等功能,可实现“安全、 intelligent information exchange, sharing, with
complex environment intelligent perception,
高效、舒适、节能”智能行驶,由智能
decision, control, and other functions, can realize
网联汽车智能驾驶系统协助或替代人类 "safe, efficient, comfortable, energy saving"
intelligent driving, by intelligent snatched car
驾驶员的新一代汽车。
intelligent driving system to assist or replace the
human driver of a new generation of cars.
智能网联汽车概述
l 汽车发展历程

基于新一代ICT的
智能化、网联化系统
新型
交通系统
21世纪

新型能源系统 绿色环保
1990年代末期 可持续

流水线
大规模制造 汽车开始普及
1913

内燃机汽车出现 告别马车时代
1886
Overview of intelligent
and connected vehicles
l Automobile
development
process Based on the new- late-
generation ICT
The 21st Intelligent and
model
century networked system traffic
system
New energy greens
system environme
In the late 1990s ntal
protection
pipeline sustainabl
1913 Cars are
mass e
manufacturi becoming
ng popular

Internal- 1886 Farewell to


combustion the carriage
engine cars era
appear
智能网联汽车概述

l 汽车交通系统技术发展历程

自 动 驾 驶 汽 车 智 能 网 联 汽 车

自动化

网联化
网 联 汽 车
智能网联汽车概述

l 解决什么问题

驾驶去人化

出行共享化

产业生态化
Overview of intelligent and
connected vehicles
l What problems to solve

1. Traffic safety: the traffic accident rate can be reduced to the current 1%;

2. Traffic efficiency: Internet of Vehicles technology can improve road traffic efficiency by 10%, and the large-scale

application of CACC system will further improve traffic efficiency;


Driving to human
3. Energy saving and emission reduction: the collaborative transportation system can improve the fuel economy of

the vehicle by 20% -30%, and the expressway formation driving can reduce the fuel consumption by 10% -15%;

4. Industry drive: The intelligent and connected automobile industry will drive the rapid development of machinery,

electronics, communication, Internet and other related industries

Travel sharing 5. Changes in transportation mode and business model: reduce the driving burden, entertainment, vehicle sharing,

convenient travel

6. hommization:So that the elderly, the disabled and so on have the right to drive

7. Comfort and convenience: improve driving comfort and liberate drivers


Industrial ecology
智能网联汽车概述

l 解决什么问题

1. 交通安全:交通事故率可降低到目前的 1%;

驾驶去人化 2. 交通效率:车联网技术可提高道路通行效率10%,CACC系统大规模应用将会进一步提高交通效率;

3. 节能减排:协同式交通系统可提高自车燃油经济性20%-30%,高速公路编队行驶可降低油耗10%-15%;

4. 产业带动:智能网联汽车产业将会拉动机械、电子、通信、互联网等相关产业快速发展

5. 交通方式及商业模式的改变:减轻驾驶负担,娱乐,车辆共享,便捷出行
出行共享化
6. 人性化:使老年人、残疾人等都拥有驾车出行的权利

7. 舒适和便捷:提高驾驶舒适性,解放驾驶员

产业生态化
Smart cars have entered a period of rapid
智能网联汽车概述Overview of development worldwide
intelligent and connected
vehicles
l 分级
智能汽车在全球范围内已进入快速发展期

Ø L1-L2 level driver assistance system has begun mass


production;
Ø The L3-L4 level autonomous driving system is in the
development and small-scale testing stage;
Ø Countries promote the opening of test roads and
Ø L1-L2级驾驶辅助系统已经开始大规模装车量产;
improve laws and regulations;
Ø L3-L4级自动驾驶系统处于研发和小规模测试阶段;
Ø Market entities are unprecedented rich, traditional
Ø 各国推动开放测试道路、完善法律法规等政策;
OEMs,Internet enterprises, ICT enterprises, travel
Ø 市场主体空前丰富,传统主机厂、互联网企业、ICT企业、
service enterprises and so on have joined in.
出行服务企业等纷纷加入。
智能网联汽车概述
ROS系统智能小车概述

l 智能网联汽车系统构成

lidar
7-inch touch screen

STM32 main control board depth camera

ROS main control


Overview of the ROS
system smart trolley

As an important piece of intelligent made cars,


automatic driving car focus on the car end intelligent
environment perception, prediction, planning decisions,
execution, etc., automatic driving car collection of
vehicle sensor intelligent sensing system, rich for
automatic driving system with the surrounding
environment and object information, including but not
limited to lane line, driving area, traffic signs, traffic
lights and motor vehicles, pedestrians, bicycles, position
obstacles of objects such as information properties,
location, speed, is the automatic driving system
information entrance, for the subsequent behavior and
function of the system perception basis.
ROS系统智能小车概述

作为智能网联汽车的重要一支,自动驾驶汽车
重点依靠车端智能实现对环境的感知、预测、规
划决策、执行等,自动驾驶汽车集合了丰富的车
载传感器组成智能感知系统,为自动驾驶系统提
供丰富的周围环境和物体信息,包括但不限于车
道线、可行驶区域、交通标志、交通信号灯等和
机动车、行人、自行车、位置障碍物等物体的类
别属性、位置、速度等信息,是自动驾驶系统的
信息入口,为后续各系统的行为和功能提供了感
知依据。
ROS系统智能小车概述

intelligent sensor
Devices or devices that obtain information of
intelligent vehicle environment and positioning, and
provide signal input for environmental perception
fusion and decision control system, mainly including
lidar, millimeter wave radar, visual camera, ultrasonic
radar, inertial navigation, etc.
ROS系统智能小车概述

l 车端架构

网联
感知融合 决策规划 控制执行

环境感知 底盘及附件
行为决 线控驱动 线控制动
毫米波雷达 信息融合 策模块
线控转向 线控附件

激光雷达 当前车辆行为

② 周围车辆行为意图

运动轨迹及目标车速

视觉传感器

状态感知 轨迹规 ②车辆运动目标点


路径跟踪系统
组合导航
信息融合 划模块 ③目标车速
Overview of the ROS
system smart trolley

l Car end
architecture
The network
Perceived fusion Decision Control
planning execution
Environmental Chassis and
Behavioral Line-
perception accessoriesLine
Intelligence determination controlled control
millimeter-wave radar drive
Fusion Cence module movement
Line
Line
control
control
attachmen
steering
t
ladar Current vehicle behavior

② Surrounding vehicle

behavior intention
Movement trajectory and
vision sensor target vehicle speed

② Vehicle
State perception Intelligen Track gaugemovement target
Path tracking system
integrated navigation
ce Draw the module
point
Fusion ③ target speed
ROS系统智能小车概述

l 智能传感器

获取智能汽车环境及定位等信息,为环境感
知融合和决策控制系统提供信号输入的器件
或装置,主要包含激光雷达、毫米波雷达、
视觉摄像头、超声波雷达、惯性导航等。
ROS系统智能小车概述

l 计算平台

内嵌ROS系统,以环境感知数据、导航定位
信息、车辆实时数据、云端智能计算平台数
据和其他V2X交互数据等作为输入,基于环境 GPU 128 核Maxwell

感知定位、智能规划决策和车辆运动控制等 CPU 四核 ARM® A57 @ 1.43 GHz

核心控制算法,输出驱动、转向和制动等执 内存 4GB 64 位 LPDDR4 25.6GB/s

存储 64GB
行控制指令,实现车辆智能驾驶路径的决策 连接 千兆位以太网、M.2 Key E

规划控制系统。车载计算平台是一切智能驾 系统 ubuntu 18+ROS

10英寸HDMI 显示器
驶功能的实现基础。 显示
USB 4 个 USB 3.0、USB 2.0 Micro-B
ROS系统智能小车概述

l computing
platform

Embedded ROS system, with environment perception data,


navigation and positioning information, vehicle real-time data, the
cloud intelligent computing platform data and other V2X interactive
data as input, based on environment perception positioning,
intelligent planning decision and vehicle motion control core control
algorithm, such as output drive, steering and braking execution
control instructions, realize the vehicle intelligent driving path
decision planning control system. On-board computing platform is the
basis of all intelligent driving functions.
ROS系统智能小车概述

l 线控底盘

智能网联汽车基于计算平台的决策规划进行专
项和加减速的执行系统,包括线控转向、线控制
动、线控驱动等软硬件。

l Line control chassis


Based on the decision-making planning of the
computing platform, intelligent connected vehicles
conduct special and acceleration and deceleration
execution systems, including wire-controlled steering,
wire-controlled movement, wire-controlled drive and
other hardware and software.
2D 建图导航功能

2D 建图导航功能是通过激光雷达结合 SLAM 算法实现的,在 2D 建图导航


功能中,仅使用了激光雷达而没有使用摄像头,因此所建地图效果为 2D 平面效 果。

2D 建图功能
1 2D 建图功能实现操作

首先运行开启 2D 建图功能的命令行

图 7-1 roslaunch turn_on_wheeltec_robot mapping.launch

接着在虚拟机端打开 rviz 可视化工具,


2D map building and
navigation function
2D map navigation function is realized through lidar combined with SLAM algorithm, in 2D
map navigation
In the function, only lidar is used without a camera, so the map effect is 2D plane effect.

2D building and drawing function


1 2D map building function to realize the operation

First, run the command line to start the 2D mapping function

Then open the rviz visualization tool on the


virtual machine side,
2D 建图导航功能

在 rviz 中我们可以看到小车已经通过激光雷达的运转建立了一部分地图,我们可以采用键盘
控制方式来使小车运动,从而将一定空间内的地图建立完整,此时不需要再开启初始化节点,
因为 2D 建图的 launch 文件中已经嵌套了turn_on_wheeltec_robot.launch 文件,还可以采用蓝牙
控制、手柄控制、航模控制 或 APP 控制的方式来使小车运动

In rviz, we can see that the car has built a part of the map through the operation of lidar, and we can use
the keyboard control mode to make the car move, so as to establish a complete map in a certain space. At
this time, there is no need to open the initialization node, because the launch file of 2D map has been nested
with turn_on_wheeltec_robot.launch File, can also use Bluetooth control, handle control, model aircraft
control or APP control to make the car movement
2D 建图导航功能

图 2-3 刚开启建图节点时的 rviz 显示界面


Figure 2-3: rviz when map node, display interface
2D 建图导航功能
开启建图节点打开 rviz 后,
有可能出现以下情况,即小车
车身在 rviz 中的显 示是歪斜的,
这种情况下的建图效果是比较
差的,且地图容易发生偏移

After opening the map node and


opening rviz, there may be the
following situation, that is, the
display of the car body in rviz is
askew, in this case, the drawing effect
is relatively poor, and the map is
prone to offset
图 2-4 小车车身歪斜
2D 建图导航功能

解决方法是将小车放在所要建图的空间的地面后按
下 STM32 主控上的复位按键或用户 按键,然后重新
开启建图节点,此时小车的姿态被重新复位,继续操
作进行建图 即可。

The solution is to put the car on the ground of the


space to be built and press the reset button or user
button on the STM32 main control, and then restart
the map node. At this time, the posture of the car is
reset and continue to operate to build the map.
图 2-5 ROS 教育机器人双击用户按键
或者单击复位按键进行姿态复位

Figure 2-5 The ROS education robot can double-click the user
button or click the reset button to reset the posture
2D 建图导航功能

通过使小车在一定范围内运动后,就可以建立一个
相对比较完整的 2D 地图 了,建图过程中出现的连续
红点为雷达实时所探测到的障碍物,而黑色为雷达所

确定的障碍物边界。
After building the map, we need to save it and
run roslaunch turn _ on _ wheeltec _ robot map _
server.launch, The corresponding map file will be
saved in the workspace
Under the turn_on_wheeltec_robot function
package map, path, the file name is WHEELTEC.
Note that the map node cannot save the map
after quitting, so be sure to save it
before quitting.
图 1-7 建完后的完整地图
2D 建图导航功能
建完地图后我们需要进行保存操作,运行 roslaunch
turn_on_wheeltec_robot map_saver.launch,相应地图文件
会保存在工作空间的
turn_on_wheeltec_robot 功能包下的 map 路径中,文件名
为 WHEELTEC。注意建图节点退出后是无法保存地图的,
因此一定要先保存后退出。
After building the map, we need to save it and run roslaunch turn
_ on _ wheeltec _ robot map _ server.launch, The corresponding
map file will be saved in the workspace
Under the turn_on_wheeltec_robot function package map, path, the
file name is WHEELTEC. Note that the map node cannot
save the map after quitting, so be sure to save it
before quitting.
2D 建图导航功能

保存后可在文件管理器中查看所保存地图
的图片形式,为 pgm 格式。

After saving, you can view the picture


form of the saved map in the file manager,
in pgm format.

图 7-9 自定义保存地图文件的路径与名称
2D 导航功能

1 2D 导航功能实现操作

2D 导航功能的实现需要提前进行建图,且导航起点要与建图起点一致,建
议建图起点选好参照物,这样在导航前放置小车时,导航起点与建图起点就不
会 有太大的偏差,将小车放在建图起点后开启 2D 导航功能

此处我们设定了导航所用地图为刚才所建的 WHEELTEC.yaml 文件,打开


rviz,可以看到所设置的导航地图,注意,要等2D 导航节点完全开启后再运行
rviz,这样可以避免因为节点还未完全开启而导致的地图加载失败。
The 2D navigation function
The 1 2D navigation function implements the operation

The realization of 2D navigation function needs to build the map in advance, and the
starting point of navigation should be consistent with the starting point of the map. It
is suggested that the reference is selected for the starting point of the map, so that
there will be no much deviation between the starting point and the starting point of the
construction of the map, and put the car at the starting point of the map

图 7-12 roslaunch turn_on_wheeltec_robot navigation.launch

Here we set the map for navigation as the WHEELTEC. The yaml file, open rvz, you
can see the set navigation map. Note that wait for the 2D navigation node to be fully
opened before running rviz, so as to avoid the map load failure because the node is
not fully opened.
2D 建图导航功能
导航模式有两种,一种是单点导航,点击 rviz
上的 2D Nav Goal 按键, 然后在地图中选定
导航点与方向,单击鼠标确定导航目标点位
置,并且不要 松开,继续拖动选择导航目标
方向,确定后松手,小车就会运动到所指定
的 目标点,在运行 rviz 的终端也会显示目标
点的坐标

There are two navigation mode, one is a single


point of navigation, click 2D Nav Goal button on rviz,
and then select the navigation point and direction in
the map, click the mouse to determine the navigation
target location, and don't loosen, continue to drag
to select the navigation target direction, after let
go, the car will move to the specified target point,
in the running rviz terminal will also show the
coordinates of the target point

图 1-13 2D 导航功能开启后 rviz 的显示界面


2D 建图导航功能

注意如果给了目标点但小车并不运动,当 机器人低于 10V会因电量不足而无法运动,


电量可在 STM32 主控 板上的 OLED 屏幕右下角进行查看,也有可能是小车之前按下
了急停开关或 使能开关拨在 OFF 处,可以查看小车 32 端显示屏下方为 ON 或 OFF 字
样进行判断。Note if gave the target point but the car is not moving, when
the robot below 10V due to insufficient power, power in the STM32 control
panel of the OLED screen to view, is also possible to be the car before
pressing the emergency stop switch or enabling switch dial OFF, can view the
car 32 end display for ON or OFF words.
2D 建图导航功能

图 7-14 2D 导航功能——单点导航Figure 7-14 2D navigation


function —— single point navigation

You might also like