联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2021-03-14 03:34

Optimal and Safe Control of Autonomous

Racing Vehicles

1 Introduction

Over the last few decades, the autonomous driving has become one of the most

active research areas in the field of computer science. The self-driving systems

are being developed to provide a safe and robust driving strategies for highways

and demanding urban areas.

However, if we consider an racing of autonomous vehicles problem where the

self-driving vehicles are competing against each other in a predefined track their

performance becomes as essential as their safety. The autonomous vehicle needs

to be controlled at its limit with self-driving controlling algorithms requiring to

consider the following aspects:

– dynamic environment with static and dynamic obstacles

– performance constraints (e.g. minimising lap time)

– autonomous car safety

The overall aim of this project is to investigate the application of autonomous

driving algorithms to the problem of vehicle racing. One of the main approaches

to controlling an autonomous car is based on the concept of the model-predictive

control [2]. The main idea behind model-predictive control is finding an optimal

driving trajectory by expressing racing as an optimisation problem. There are

few main features of the model-predictive control as visualised in Fig. 1.

– a mathematical model of the autonomous system; often expressed as a system

of differential equations (e.g. Equations 1-3).

– a cost (or objective) function which assigns a value to a particular vehicle

trajectory (e.g. time-to-goal)

– constraints are user provided predicates which limit the domain of modelpredictive

control optimization search

– an optimiser is a search engine which attempts to efficiently analyse the

dynamical model based on user provided constraints, evaluate results based

on the cost function and produce the most optimal system inputs.

2 Sergiy Bogomolov, Milad Kazemi, Sadegh Soudjani and Paulius Stankaitis

Fig. 1. A visual representation of the model-predictive control workflow [3]

2 Developing Model-Predictive Control Systems within

the F1Tenth Simulator

In this project, your team will develop a model-predictive controller of a virtual

autonomous vehicle within the F1Tenth simulator. Your developed controlling

system will improve autonomous vehicles performance by performing a modelbased

vehicle trajectory optimisation in a real-time. In order to complete your

project you are required to complete following tasks (Tasks 1 - 5):

Task 1: Literature Study Perform a literature review on the model-based

predictive control and the possible applications to the domain of self-driving

vehicles. Summarise a few techniques used in the literature to finding optimal

driving strategies and describe their features and properties. Make sure that you

understand the concepts and techniques. Include the details of your literature

study in your final group report. We provide some starting reading below:

– Camacho et al.: Model predictive control [2]

– Video MPC Overview: https://youtu.be/YwodGM2eoy4

– Rosolia and Borelly: Learning How to Autonomously Race a Car: a Predictive

Control Approach [6]

– Brunke: Learning Model Predictive Control for Competitive Autonomous

Racing [1]

Task 2: Download and Install F1Tenth ROS Simulator The Robot Operating

System (ROS) only runs natively in Linux so we are only supporting using

the simulator in Ubuntu at this time. If you do not have ROS Melodic installed,

follow the instructions from website below:

http://wiki.ros.org/melodic/Installation/Ubuntu

Optimal and Safe Control of Autonomous Racing Vehicles 3

Dependencies You will need the following dependencies:

– tf2-geometry-msgs

– ackermann-msgs

– joy

– map-server

Open the command line and install these packages using

sudo apt-get install ros-melodic-tf2-geometry-msgs

ros-melodic-ackermann-msgs ros-melodic-joy

ros-melodic-map-server

The full list of dependencies can be found in the package.xml file.

Package To install the simulator package, clone the simulator repository into

your catkin workspace:

cd ~

mkdir catkin_ws

cd catkin_ws

mkdir src

cd ~/catkin_ws/src

git clone https://github.com/f1tenth/f1tenth_simulator.git

Then run catkin make to build it:

cd ~/catkin_ws

catkin_make

source devel/setup.bash

Quick Start To run the simulator on its own, run:

roslaunch f1tenth_simulator simulator.launch

This will launch everything you need for a full simulation: roscore, the simulator,

a preselected map, a model of the racecar, and the joystick server.

F1TENTH gym environment ROS communication bridge For using gym environment

you can follow the steps of following repository to install the required

packages locally or as a docker.

https://github.com/f1tenth/f1tenth gym ros

The F1TENTH Gym environment For using gym environment without the ROS

communication you can follow the steps of the following repository.

https://github.com/f1tenth/f1tenth gym

4 Sergiy Bogomolov, Milad Kazemi, Sadegh Soudjani and Paulius Stankaitis

Building ROS Melodic with Python3 support If we look at ROS Melodic and

Kinect minimum requirement, they work with Python 2.7. In order to get Python

3 support in ROS Melodic, you can follow the steps of this article.

https://www.miguelalonsojr.com/blog/robotics/ros/python3/2019/08/20/

ros-melodic-python-3-build.html

By using the following command you can make sure you use the correct ROS

distribution and python:

printenv | grep ROS

Task 3: Model-based Analysis of Dynamical Systems Before your team

starts implementing a model-predictive vehicle controller, it is paramount to

understand how dynamical systems can be simulated, as it is an essential part

of model-predictive controllers. In this exercise, you are required to consider a

kinematic single-track model, which models a vehicle with on two wheels (front

and rear wheels are combined into a single wheel) as shown in Figure 2.

Fig. 2. Mathematical representation of the Kinematic Single-Track Model [5]

The kinematic single-track model has a number variables, which are used to

mathematically define the dynamical model. In this part of project, your group

should complete following tasks:

Task 3.1 Understanding Kinematic Model Your team will need to understand

the kinematic single-track model (Equations 1 - 3). More information

about the Kinematic Single-Track Model can be found in:

– Chapter 2 of Vehicle dynamics and control [5] book

– https://github.com/MPC-Berkeley/barc/wiki/Car-Model

– https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/blob/master

/vehicleModels commonRoad.pdf

Optimal and Safe Control of Autonomous Racing Vehicles 5

x˙ = v · cos(ψ + β) (1)

y˙ = v · sin(ψ + β) (2)

ψ˙ =

v

lr

· sin(β) (3)

Task 3.2 Modeling and Simulating Kinematic Model You will need to

model and simulate Kinematic Single-Track Model with the Python or C++

programming language. There are a number of available libraries, which simplify

dynamical system modelling and enable simulating them given initial system

states.

Task 4: Linearisation of Dynamical Systems A lot of real-world physical

systems, cannot easily be specified with differential equations or the set of differential

equations are complex and cannot be easily analysed. In particular, for

the model-predictive control efficiently simulating a model of a dynamical system

is crucial, as inputs to the actual system have to be derived repeatedly and

quickly. One of the more popular ideas for making model-predictive systems or

optimation engines more efficient is approximating complex system dynamics.

The basic idea is that (in most circumstances) one can approximate the

nonlinear differential equations that govern the behavior of the system by linear

differential equations. We can solve the resulting set of linear ODEs, whereas we

cannot, in general, solve a set of nonlinear differential equations. Therefore, in

this exercise, you are required:

Task 4.1: Understand Dynamical System Linearisation Your first tasks

is to understand the process of approximating complex dynamical systems.

Task 4.2: Approximating Kinematic Model Simplify the dynamical system

presented in the previous task by applying the mathematical method of

linearisation.

Task 4.3:Compare You should compare an approximated and an actual

model of the kinematic single-track model.

Task 5: Implementing a Reference Tracking Algorithm by using MPC

The main deliverable of this project is a reference trajectory tracking controller

which should be implemented by using a model-based predictive control approach

(see Fig. 3). Your team will be provided with a F1Tenth simulator map

(Skirk) and a reference trajectory - a set of x, y coordinates stored in a .csv file.

A screenshot of the map, provided trajectory and vehicle is shown in Fig. 4.

In the following paragraphs a high-level description sub-tasks of the reference

trajectory tracking algorithm are provided.

Task 5.1: Localising Vehicle In the first step, a control system of your autonomous

vehicle should be able to localise itself, or in order words, determine

its coordinates (xv, yv). F1Tenth simulator provides a virtual odometry device

as a ROS node with communication topic (/odom) which can be subscribed to.

6 Sergiy Bogomolov, Milad Kazemi, Sadegh Soudjani and Paulius Stankaitis

(xv, yv)

(xr, yr)

Fig. 3. A visual depiction of the reference trajectory tracking based on the modelpredictive

control

Therefore, as the first step, your control algorithm should subscribe to the /odom

and receive coordinates of the vehicle.

Task 5.2: Determining Reference Coordinate In the second step, your

vehicle control algorithm should determine the next reference coordinate (xr

, yr)

from the set of coordinates provided in the trajectory .csv file. The (xr

, yr) coordinate

should be determined, so it reflects the correct vehicle travelling direction.

Fig. 4. A Skirk map with a visualised trajectory to be followed [4]

Task 5.3: Implementing MPC Problem In the third and the main step,

you should implement a model-based predictive control system. There are a num-

Optimal and Safe Control of Autonomous Racing Vehicles 7

ber of existing model-predictive control Python, C++ programming languages

libraries, therefore, it is highly suggested to investigate and evaluate few of existing

libraries. Nonetheless, regardless of the library or skeleton code selected

your will still be required to define the following in your algorithm:

Define Vehicle Dynamics

Define Cost Function

Define MPC Constraints

Task 5.4: Actuating In the last step, your virtual vehicle should be actuated

with controller inputs generated by your developed model-based predictive

control system. F1Tenth simulator provides a ROS node with communication

topic (/drive) which can be published to. Therefore, as the last step, your control

algorithm should publish velocity and driving angle to the /drive in order

to actuate virtual vehicle.

References

1. Brunke, L.: Learning model predictive control for competitive autonomous racing

(2020)

2. Camacho, E.F., Alba, C.B.: Model predictive control. Springer Science & Business

Media (2013)

3. El Ferik, S.: Automation technology in hydrocarbon fuel processing plant. In:

Khan, M.R. (ed.) Advances in Clean Hydrocarbon Fuel Processing, pp. 463 – 495.

Woodhead Publishing Series in Energy, Woodhead Publishing (2011)

4. Norouzi, P.: https://github.com/pnorouzi/rl-path-racing

5. Rajamani, R.: Vehicle dynamics and control. Springer Science & Business Media

(2011)

6. Rosolia, U., Borrelli, F.: Learning how to autonomously race a car: a predictive

control approach (2019)


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp