Professional Documents
Culture Documents
Dissertation Final Report Santhosh
Dissertation Final Report Santhosh
Dissertation Final Report Santhosh
MASTER
Investigation of model based adaptive cyber physical system for autonomous trucks
Santhosh
Award date:
2019
Link to publication
Disclaimer
This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student
theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document
as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required
minimum study period may vary in duration.
General rights
Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners
and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.
• Users may download and print one copy of any publication from the public portal for the purpose of private study or research.
• You may not further distribute the material or use it for any profit-making activity or commercial gain
Department of Mathematics and Computer Science
Model Driven Software Engineering Research Group
Master Thesis
Dissertation for the completion of
Master’s Degree in Embedded Systems
Student Name:
Santhosh.S
Autonomous driving is the technology of the future. Though autonomous/self driving vehicle tech-
nology is emerging, their deployment in a large scale is absent. This could be attributed to social,
political will towards self driving cars, the infrastructure needed and safety concerns. This report is
primarily concerned with the dissertation for graduation thesis where the proposed topic is explored
as a solution towards an actual implementation of an autonomous truck driving in a distribution
centre. From a research standpoint, this report aims at an investigation of a model based cyber
physical system for autonomous trucks.
A model based cyber physical system for autonomous trucks in a distribution centre is aimed to
be developed to achieve its driving functionality. Model Based Software Development is taken up for
its advantages over the traditional method of software development. The goal is to develop a cyber
physical system, in the form of a control software. The software should be able to provide driving
commands to a truck-semitrailer in the distribution centre and achieve its motion. The development
of software has been done resembling the steps from a reference book eliciting the requirements of
a formal model based software design and the specific method used is Round Trip Engineering.
A cyber physical system in the case of driving could have uncertain environmental conditions.
Thus, there arises a requirement of adapting its behaviour at run-time. The programming frame-
work called OSGI is used as it is suited for the preceding definition of cyber physical system. OSGI
is a component based software framework based on Java and it needs a special container to be de-
ployed. Thus the importance of OSGI programming in cyber physical system and its applicability
in solving a real world problem is examined. A run-time environment to test the functioning of the
software was aimed to be the scaled model truck trailer and a distribution center which is present
in the campus of TU/e. Its digital twin is available in Unity simulator and hence it is taken up as
the primary run-time environment.
I am sincerely thankful to my supervisor dr.ir.Ion Barosan for deciding to supervise this Master’s
graduation thesis. I am also thankful to his project inputs, guidance, patience, cooperation, motiva-
tion during the various stages of this thesis. I thank dr.ir.Dip Goswami and dr.ir.Richard Verhoeven
for kindly deciding to be members of assessment committee. I also thank dr.ir.Igo Besselink for his
consulting hours. I am sincerely thankful to the almighty, my parents, relatives, near and dear
ones for their continuous support.
I thank Oskar Ljungqvist of Linköping University, Sweden for his vital inputs and help in solving
the motion primitives using ACADO Toolkit. I also thank Marcello Cirillo, Head of Motion Planning
and Control, Scania CV AB and Nishanth Nair of TU/e, for providing an explanation about using
motion primitives and discretization of the lattice space respectively.
This thesis is carried out in accordance with the TU/e Scientific Code of Conduct and the
vital energy is supplied by will power along with the guidance/ support by the institution. I am
thankful to TU/e for providing me an opportunity to pursue my Master of Science in this august
institution. I cherish the memories of scientists, professors and teaching staffs who inspired me by
their concept clarity and hard work.
Contents vii
List of Figures ix
1 Introduction 1
1.0.1 Model Based Cyber Physical System . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.0.2 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.0.3 Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Preliminaries 9
2.1 Problem Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Project Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Model Based Software Development . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.2 Open Source Gateway Initiative (OSGI) . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.3 Kinematic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.4 Motion Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.5 UNITY Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.6 ArUco Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3 System Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Platform Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4 Experimental Analysis 33
4.1 Vehicle Movement through Way-points- a Discussion . . . . . . . . . . . . . . . . . . . . 33
4.2 Comparison of the proposed Motion Planning Framework with that of a PID controller 37
4.2.1 Trajectory Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.2.2 Throttle/Velocity Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2.3 Steering Angle Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3 Experiments with Motion Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3.1 Maximum Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.3.2 Example Velocity used in our driving . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.3.3 Usage of Motion Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.4 Performance Comparison based on Target Platform . . . . . . . . . . . . . . . . . . . . 43
Bibliography 51
Appendix 53
B Keywords 54
Introduction
Autonomous driving in trucks is an exciting area of technological advancement that could be envi-
sioned. Companies like Amazon, Daimler and many others [27][30][33] have started testing their
autonomous truck technologies. They are majorly focused on driving on highways. The work taken-
up in this research is concerned with the development of an autonomous driving scheme in a distri-
bution/logistics centre for both forward mode driving and reverse mode docking. In the forthcoming
pats of the introduction, the significance of this research is highlighted, followed by the evolution
and types of automation trends in vehicle, followed by the state of the art in the context of autonom-
ous driving is presented.
The Significance of Logistics to the Economy of Netherlands is around 10 percent of its GDP
and thus Logistics is one of the most important focus sector of Netherlands [26]. The Autonomous
Vehicles Readiness index of 2019 ranks Netherlands as the global leader in terms of preparedness
to deploy autonomous vehicles [3]. This suggests that the scope for autonomous vehicles to be de-
ployed practically is ample.
The Netherlands has the highest number of distribution centers in Europe [26]. INTRALOG
project (Intelligent Truck Application in Logistics) has been started for identifying the potential of
automated driving within the logistics domain [16]. INTRALOG is a consortium of companies and
universities, in which our TU/e is a member[16]. One of the major focus of INTRALOG is dock-
ing semitrailers at distribution centers [16]. The INTRALOG project aims at exploring the added
planet, people and Profit value that automated guided trucks can bring to smart logistics operations
at distribution centers [12].
According to the news item in [38], there is reported shortage of truck drivers in the Netherlands
and other parts of Europe. This presents an opportunity for deploying autonomous trucks in the
Logistics sector without concerning the lack of jobs that adoption of autonomous driving is argued
to bring about. The movement of trucks if done by human drivers could be time dependent due to
their non-availability past work hours [9]. Thus autonomous trucks has the potential to improve
the efficiency of a distribution centre and making its operation less depended on human drivers.
A dock assist system has been developed by Eaton as discussed in [34]. With the supervision
of a human driver, assistance is provided only for the case of docking. It is reported that the dock
assist system made far more corrections and was slower compared to a human driver. Also the
most important limitation is that the driver needs to initially park the semitrailer parallel to the
docking station. According to [36], the most difficult professional skill is the docking of a truck.
Thus automated docking could be a significant step towards easing the manual effort required to
make the docking.
Network centric approaches stands between the vehicle and driver centric approaches. Teleop-
eration [19] can also be called network centric as it requires remote communication between the
vehicle and the human driver. This is an example of vehicle to infrastructure approach, whereas
concepts like platooning are example of a vehicle to vehicle approaches.
The approach of autonomous driving taken up in this research is a vehicle centric approach
and hence we do not need a human driver in the truck. A vehicle centric architecture model of a
control system is provided in Figure 1.3. This approach is provided for on road driving.In the case of
distribution centre, the perception system will be different. But other constituents like supervisory
control, vehicle state feedback, path and mission planner re common.
Autonomous movement of vehicles depends on the context in which it operates, for instance driv-
ing on road require factors like speed maintenance, lane following, avoiding risks to human life etc.
Distribution centres on the other hand require movement of vehicles once they are parked in the
parking stations to the docking station, where the goods brought by the truck are unloaded from its
semitrailer.
In vehicle automation, the state of the art is currently at the level of automation that can be
achieved. Figure 1.1 from [2] shows the different levels of automation. Level 3 refers to conditional
automation and the implementation done as a part of this research will belong to this category.
From the perspective of on road driving, Daimler has been able to test drive a Level 4 autonomous
truck on pubic road according to [32].
Though this table holds good for on road driving, this research also attempts driving but for a
fixed distance and within the fixed boundaries of the given distribution centre. The distance and
the requirement of the combination of forward and backward driving mode required depends on the
dimensions and the placement of static obstacles in the distribution centre. Trucks in distribution
centres need to be moved from parking to docking stations. The most important step in such a case
is the docking of semitrailers in one of the docking stations which requires the movement of the
truck and trailer in the reverse which is a difficult task as already discussed. Thus the context of
levels of automation in the case of on road and in the distribution centre can hold different set of
requirements.
A cyber physical system involves computation, communication and control as its three major
requirements. A cyber physical system can be envisaged as provided in Figure 1.2. Software de-
velopment was always based on a closed assumption, that the boundary between the system and
the milieu in which it is expected to operate is known during design time and is not subjected to
drastic changes [40]. But in the case of a cyber physical system, it is not possible to have a complete
knowledge about the system environment in which it operates.
Cyber physical systems are thus required to support modifications that are not expected at
design time as they are expected to be triggered by the system context at run time. Such modifica-
tions require a context aware working of the designed system which requires modifying the working
of the system without affecting the rest of the system [40]. This context aware working of the cyber
physical system is suited for the problem at hand and hence the need for a suitable programming
framework will be justified in the succeeding chapter.
Self adaptation is a feature of cyber physical system that is suitable to explore when the context
of the environment is subject to changes. For example, during the autonomous driving of a truck,
an unforeseen obstacle has been introduced and thus, the software needs to make run-time changes
in the actuation to avert a collision. Thus, it could be expected that the incorporation of self adapt-
ation features could lead to furthering of level of automation but realizing self adaptation features
depends on the target environment in which it operates. For example uncertainties and unexpected
events happening in the environment, which is otherwise not changing is required to best realize
the concept of self adaptation.
A path-finding algorithm is the first step in vehicle movement. Assuming a two dimensional
grid input to the algorithm, the problem and solution in such a case will be two dimensional. The
requirement of moving a truck and semitrailer is a third spatial dimensional problem and hence
the applicability of a two dimensional solution to a three dimensional spatial requirement must
be studied. The path finding algorithm for vehicle movement usually involves the kinematic con-
straints of the vehicle. Thus the requirement of kinematic model being incorporated in the path
planning algorithm can be examined. It could also be argued at this stage that, the ’motion’ of the
vehicle which must be made in accordance with its kinematic constraints. Thus integrating the
kinematic model into the motion planning framework could also be done.
The control software framework developed must be made to work in a target environment like a
simulation or in a scaled truck semitrailer. In the former case, a computer with a modern processor
is required to perform the computation and communicate with the simulator. In the latter case, a
single board computer can be mounted on the scaled truck to achieve the functionality.
Control software to be developed for autonomous trucks is aimed to be reactive, in the sense
of adapting/ using portions of code as required. For this purpose, a software framework called
OSGI which is based on Java is proposed and its features and advantages are covered in the
next chapter. Model based software development is attempted for its advantages over the tra-
ditional software development.
2. Can a path finding algorithm for autonomous truck semi trailer vehicle be integrated into the
developed framework above?
Path finding algorithms, when using a grid based reference provides two dimensional solu-
tions. The applicability of a two dimensional solution to a third dimensional spatial require-
ment of moving a truck semitrailer as discussed in the previous subsection presents us with
this research question.
3. How can the Kinematic Model of the Truck Semi Trailer be integrated into the Path finding
algorithm
Truck movement must be made in accordance with its kinematic model and also respecting its
non-holonomic constraints. Whether, the kinematic model of the vehicle be encoded in the path
planning algorithm, i.e., some aspects like the configuration of the vehicle being included in
the path planning algorithm similar to the one in [4] can be explored. It could also be argued at
this stage that, the ’motion’ of the vehicle which must be made in accordance with its kinematic
constraints. Thus integrating the kinematic model into the motion planning framework could
also be done.
4. Can the developed framework be implemented for a Raspberry Pi mounted on a miniature
autonomous truck?
The control software must be tested for its correctness. For this purpose, deploying them on
a single board computer or digital simulation environment like UNITY must be explored.
Preliminaries
This chapter introduces the preliminary ideas that lies behind this research, in the context of the
problem at hand, followed by the project/software context, system context and at last by the target
platform context.
A fully autonomous implementation from the perspective of Automotive engineering for steering
the vehicle has been developed [9]. The present approach in this research is from the perspective
of Embedded Systems using the programming framework OSGI with an aim of building a novel
control software that has the capability to adapt its behaviour is aimed.
The model of distribution centre taken up for this implementation is shown in Figure 2.2. This
is the Jumbo distribution centre in Veghel which is also discussed in [9]. A miniature concept of
the Jumbo distribution centre is available at the Truck Lab of Automotive Engineering Sciences at
TU/e and is shown in Figure 2.3. Its dimensions are scaled down in the ratio of 1:13.3 [9].
Figure 2.3: Model of Distribution Centre in Automotive Engineering Sciences Lab of TU/e
The problem context presents us with the following ideas about the preliminary requirements
for the research implementation which will be explored in depth in the succeeding chapter.
• A fixed parking station from where the initial movement must be made.
• A forward and a full scale reverse motion (with precision) must be made in tandem.
• The constraint of correct docking on one of the provided docking stations.
• Concepts of dynamic obstacle avoidance, that concerns on road driving safety for other vehicles/-
passengers and moving human obstacles.
• Observing the rules of lane and lane keeping as in a road driving.
Advantages of model based software development apart from the ones presented in the intro-
duction is provided below.
• It also helps in effective planning, as models helps us identify the precise nature of work to be
done [20].
The modelling spectrum from [20] is provided in Figure 2.4. In the code only approach, no
specific modelling approaches are taken into account. This makes the developed software/ system
difficult to understand [20]. The second category of the spectrum, code visualization where the
required functionality of the code to be achieved is visualized through separate models and they are
manually converted in to code [20]. The third category of the spectrum uses both code visualization
techniques and developing code based on models. This is Round-trip engineering and the approach
used for developing code using this category belongs to this method. A model centric approach was
originally aimed through Bit Reactive software but later it was dropped for the convenience of OSGI
framework like, Eclipse Equinox and also since most of the program functionality relies on OSGI.
The approach used in this research closely resembles the process of formal model based devel-
opment as shown in the Figure above and they are justified as follows.
1. At the Abstract Requirement modeling level, the variables that must be monitored and con-
trolled [13] were decided. In our development, the monitored variables is the position of the
truck. The controlled variables are the throttle and steering angles.
2. The properties of the desired system is determined [13]. The desired system must be able to
send control signals to the run-time environment to achieve the motion of truck and semitrailer
and receive position feedback on a continuous basis for analysis and deciding on further steps.
3. Creating concrete requirements model [13]. The concrete requirements are designed in such
a way that they address the system, sub systems , their functions and the amount of overlap
between the systems presents an opportunity for code reuse, which is also extensively used in
this research implementation.
4. Specification of the code Synthesis model. Here the concept of round-trip engineering comes
into picture.subsystems like path-planner and communication with the run-time environment
are developed as code and they are visualized later as models. subsystems like orientation
finder and motion planner are developed as models and subsequently developed as a code.
5. Synthesize the source code [13]. When OSGI bundles are run using Eclipse Equinox frame-
work, a validation check is performed to satisfy the external dependencies that are needed.
This is followed by resolving the internal run-time bundle requirements and packages that
are needed by one another. This is followed by checking the compilation requirements (if any
unresolved compilation is found, the program cannot run for example an typo/error in code).
Once all these phases are successful, the compiled executable code is generated and it runs.
A bundle refers to a unit of modularity and in a practical sense it is a Java .jar file. But there
is difference between a normal .jar file and an OSGI bundle. Bundles have OSGI metadata that
provides details about the bundle version, the packages within it that are visible and also informa-
tion about what packages need to be imported. Using this information, the OSGI framework does
not need to load all the classes in every bundle unlike .jar files. This aspect improves the speed of
the system [37].
Bundles can create objects and subsequently register them with the service registry. Other
bundles can get the registered services through this registry. This aspect has the advantage of
bundles getting swapped and updated without turning off the rest of the system [37]. Other ad-
vantages of OSGI is provided below.
Advantages of OSGI
1. OSGI allows to model segments of code as bundles, which can be used flexibly at run-time
[39].
2. Updating of components with less downtime i.e., bundles can be updated without turning off
the system [37].
3. Reduction in complexity [37], as component based models require reduction in the lines of code
needed to make a certain functionality.
4. OSGI also supports abstraction for the components to hide their inner workings [37].
Figure 2.7: Kinematic Model of a Singly Articulated Truck and Semitrailer from [18]
The vehicle shown in Figure 2.7 consists of a tractor with one front and one rear axle, a trailer
with one axle. A kingpin point, connects the tractor with the trailer. The steering angle input is
given by δ. v0 represents the longitudinal velocity. It is defined at the reference point (x0 , y0 ). θ0
and θ1 represents the heading angles of the tractor and semitrailer.
The heading angle of the tractor and semi-trailer are represented by θ0 and θ1 .γ represents the
articulation angle, which is the difference in heading angle between tractor and semi-trailer. L0
represents the wheelbase of the tractor. Lob represents the distance between rear of the tractor
and the kingpin (x1f , y1f ). L0b will be negative for a normal tractor-semitrailer combination. L1f
represents the distance between the kingpin and the axle of the semi-trailer (x1 , y1 ). The kinematic
model is based on the constraint that the wheels on the axles have no side-slip. The equations that
can be written down for the kinematic model from [18] of the vehicle is as follows.
The kinematic model of a singly articulated truck is prescribed by equations 2.1 to 2.11. The
global orientation of the trailer i.e. theta1 and the heading of the rear axle point of the semitrailer
(x1 , y1 ) is the most important requirement for the motion primitive trace graph that is required.
Thus we take up the parameters in the following form.
p = (x1 , y1 , θ1 , γ)
In order to obtain the motion primitive using the kinematic model from ACADO toolkit, the fol-
lowing boundary value problem is solved
Z T
minimizeu(.), T fo (p̄(t), u(t))dt
0
subject to
˙ = fo (p(t), γ(t))dt
p(t)
˙ =ω
δ(t)
˙ =u
ω(t)
This objective function is taken up as it is argued that it is possible to generate smooth steering
angles when possible [21]. f (p(t), γ(t)) is the model of the truck semitrailer system which is given
by the equations 2.1 to 2.11. u(.)andT are the decision variables of the problem. Here u(.) repres-
ents the rate of acceleration and T refers to the final time. T can either be minimized or it can be
provided with a lower and upper limit as an input to ACADO toolkit.
These equations and the concept of boundary value problem solving is from [21], which is de-
veloped for a full scale truck-semitrailer combination using ACADO toolkit. The specification of the
problem relies on taking up the upper maximum and minimum values for the parameters provided
in the Kinematic model. The velocity is fixed and the steering angle is to be input as a variable. The
experimental results with respect to the motion primitive graphs is covered in depth in chapter 4.
The primary deployment scenario of the developed control software is aimed to be the UNITY
simulation as envisaged in the previous section. However, the deployment of the developed software
is also aimed for a single board computer for mounting on experimental truck in the truck lab. The
Raspberry pi is chosen for the following reasons.
1. The working Random Access Memory (RAM) of Raspberry Pi is high. The memory complexity
of the code to be developed is aimed to be high as many functionalities along with the A*
algorithm is aimed to consume a high working memory.
2. Raspberry Pi supports C, C++, Java and Python [24]. In our case, OSGI is an extension of
Java and hence the support for Java remains handy.
3. It is possible to expand the circuit of the Raspberry Pi with other electronic components like
sensors and electronic circuits [24]. This is also suitable for this case of implementation as
sensors and other prototyping circuits must be employed for realizing the self adaptation fea-
tures offered by OSGI.
• It is noteworthy though both OSGI (which is based on Java) is platform independent i.e. it gets
converted to Byte-code. It could be interesting to make a comparison in such a case between
Raspberry Pi and the Intel processor. The metrics in such a case could be confined to run time
comparison between the processors for moving the truck up to a particular way-point.
This chapter is devoted to the design and implementation steps, specifically the design of OSGI
bundles. The implementation steps are taken up in a phased manner.
3.1 Requirements
The following requirements are identified for implementation.
• A motion planning framework must be present for actuating/ steering the vehicle.
• A dedicated orientation finder must be present for finding the orientation of the vehicle at any
given point of time.
• The motion of the vehicle must be made in accordance with its kinematic model.
• A dedicated communication module of the software must be present for communication with
the UNITY simulator as envisaged in the previous chapter.
• A master launcher module must activate/cooperate with other functionalities to achieve the
intended overall driving of the vehicle.
• The UNITY communication bundle also provides the feedback signal, i.e., position of the
ArUco markers.
• Throttle is constant and increases slightly for steeper angles according to the rationale that
steeper angles require more turning velocity. This is arrived by experimenting with the sim-
ulator.
• The time for which the actuation needs to be made is a constant and set along with the actu-
ation command. In the case of forward driving, a time unit of 5 seconds and for reverse driving
a time unit of 2 seconds is set for all possible steering angles.
• Checking for collision is a possibility with the simulator [7]. But it does not provide information
about the probability of collision.
A path planning algorithm forms the primordial step towards any driving, thus this subsection
focuses on the path planning algorithm used in this implementation. Among the graph search
algorithms, A* algorithm has completeness and optimality for a chosen cost function and it is the
suitable choice in most robotic path finding applications [6]. The scale of the provided simulator is
given in Figure 3.2. This scale is obtained by experimenting with the simulator and retrieving the
position information of the truck in all the four quadrants. For the purposes of this implementation
and to keep the grid dimensions as unsigned numbers for the convenience of programming in Astar
path-finding, it has been converted to the dimensions as shown in Figure 3.3.
Though in a mathematical sense, x and y axes are contrary to the one provided here, but since the
UNITY simulator y-axis is taken as x-axis, it will be convenient for the position parser subsystem
to convert the dimension from the UNITY position feedback. The dimensions presented in Figure
3.3 is provided as two dimensional grid input to the Astar algorithm. Path-planner is developed
as a separate OSGI bundle and it gets the source and destination coordinates as inputs and gives
out the closed list and its length as outputs. A brief routine of the algorithm inspired by [31] is
presented in Algorithm 1. If the source and the destination coordinates are similar, the algorithm
will prompt the user to change the coordinates.
end
The orientation of the vehicle can be envisaged in the figure above and the angles to which they
belong. This presents us with the information that angles 45, 135, 225 and 315 falls common to
two different orientations. Such scenarios need to be considered as intersection angles for motion
control.
• For an angle of 45 degrees the absolute difference y3-y1 is found to be 5 in the assumed simu-
lator scale. This is common to the angles 45, 135, 225 and 315 as provided in the orientation
angle diagram. These angles overlap between the orientations, however for the purposes of
this implementation they are clubbed with NS or SN orientation.
• This leaves us with the cases of absolute value of y3-y1 lesser than 5 to be less than 45 degrees
and hence they could be categorized to EW or WE orientation and absolute value of y3-y1
greater than 5 informs us angle greater than 45 degrees to belong to NS or SN orientations.
The motion planning framework takes the front ArUco marker for forward movement and into
account but it may-not place the truck-trailer always at the desired point. Thus it is important to
account for errors in the steering angle. Thus for froward motion, steering angle error is calculated
by algorithm 2. Figures 3.6 and 3.7 provides a visual representation of how steering angle error is
accounted for different orientations of the vehicle.
The nature of motion is determined by the sign of the steering angle as error can either be
negative or positive and hence it is appropriately added to account for steering angle errors. The
steering angle error calculation is not accounted for reverse motion planning framework, as rear
ArUco marker is used for reverse motion (using Astar) and hence accounting of errors based on rear
ArUco marker will be cumbersome. The case of reverse motion using motion primitives also does
not involve error computation as at present a precise motion is achieved without error computation.
Figures 3.6 a and b provides an idea about error computation with respect to steering angle
and since the orientations must be aligned to x-axis, correcting them with respect to x-axis alone
produces smooth driving. The same approach for North south and South North orientation with
respect to y-axis as shown in figures 3.7 a and b was previously included in the code, but later it
was not taken up as it produced incorrect results. Figures 3.8 to 3.11 provides the idea behind the
motion planning based on different orientations of the vehicle.
end
if West East Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
sinangle ←arcsin((dest.x − source.x)/hypotenuse)
if cosangle < 90(degrees) then
declare TURN INFEASIBLE
end
W estEaststeeringangle ←sinangle/scalingfactor
end
if North South Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
tanangle ←arctan(dest.x-source.x)/dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle < 0(degrees) then
declare TURN INFEASIBLE
end
N orthSouthsteeringangle ←tanangle/scalingfactor
end
if South North Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
tanangle ←arctan(dest.x-source.x)/(dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle > 0(degrees) then
declare TURN INFEASIBLE
end
SouthN orthsteeringangle ←–tanangle/scalingfactor
end
end
Add steeringangleerror from the previous step
Actuate the vehicle usingthecalculatedsteeringangle
end
end
if West East Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
sinangle ←arcsin((dest.x − source.x)/hypotenuse)
if cosangle > 90(degrees) then
declare TURN INFEASIBLE
end
W estEaststeeringangle ←sinangle/scalingfactor
end
if North South Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
tanangle ←arctan(dest.x-source.x/dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle > 0(degrees) then
declare TURN INFEASIBLE
end
N orthSouthsteeringangle ←–tanangle/scalingfactor
end
if South North Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y/hypotenuse))
tanangle ←arctan(dest.x-source.x)/(dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle < 0(degrees) then
declare TURN INFEASIBLE
end
SouthN orthsteeringangle ←tanangle/scalingfactor
end
end
Actuate the vehicle usingthecalculatedsteeringangle
end
end
if West East Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
sinangle ←arcsin((dest.x − source.x)/hypotenuse)
if cosangle > 90(degrees) then
declare TURN INFEASIBLE
end
W estEaststeeringangle ←sinangle/scalingfactor
end
if North South Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y)/hypotenuse)
tanangle ←arctan(dest.x-source.x/dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle > 0(degrees) then
declare TURN INFEASIBLE
end
N orthSouthsteeringangle ←–tanangle/scalingfactor
end
if South North Orientation
p then
hypotenuse ← (dest.x − source.x)2 + (dest.y − source.y)2
cosangle ←arccos((dest.y − source.y/hypotenuse))
tanangle ←arctan(dest.x-source.x)/(dest.y-source.y)
sinangle←arccos((dest.x − source.x)/hypotenuse)
if sinangle < 0(degrees) then
declare TURN INFEASIBLE
end
SouthN orthsteeringangle ←tanangle/scalingfactor
end
end
Actuate the vehicle usingthecalculatedsteeringangle
end
• For UNITY interface, most of the services offered by any bundle is not accessed through the
service registry, as services like path-planning, UNITY communication and parser for position
feedback information are meant to be static, i.e. their functionality does not changes during
the run-time of the program and hence they are imported as dependencies to the launcher
bundle. This performs the whole operation of running, thus the dynamism offered by OSGI
could not be best captured for UNITY simulator interface as it does not have say for example
a changing event notification like a sensor reading.
• Equinox OSGI framework offers two ways for bundles to use each other’s services. i.e., require
bundle gives all the classes and its sub dependencies in the bundle and hence it is tantamount
to importing the whole package (assuming one package per bundle), wheres import-package
offers a custom fit to add the specific classes in a particular bundle/package.
• Eclipse Equinox OSGI framework and Eclipse IDE are used, in combination with JAVA Stand-
ard Edition 1.8 and JAVA Standard Edition 1.7 as execution environments for Intel processor
and Raspberry Pi respectively.
Experimental Analysis
This chapter is dedicated for presenting the experimental results and analysis including motion
planning framework comparisons, motion primitives and finally the implementation on Raspberry
Pi is discussed.
The following rules for the choice of way-points are arrived after performing experiments with
the simulator.
• First way-point is chosen as the first exit on the right side as shown in the Figure 4.2. The
choice of this way-point is common for any possible combination of parking to docking stations.
• The exit on the left side has been avoided as the present orientation of the trailer is tilted
at an angle of 45 degrees to both the reference axes, a leftward movement cannot be made
without colliding with other trucks (assumed to be present but not shown in the simulator).
Such choices of way-point on the left side also leaves us with collision of the truck in the wall.
• The movement of the vehicle can be visualized in the following Figures from 4.1 to 4.5. The
movement from way-point 3 to the docking station is reverse mode driving.
• The choice of docking station can be selected in the program and hence the way-point 3 and
the subsequent reverse motion changes accordingly.
It takes a total of 22 seconds to make this trajectory and the reaching of central wall happens
around time t=12.5 seconds. Since the objective of truck movement from its initial position to the
first way-point tasks resembles our case, it presents an opportunity to analyze our motion panning
framework to the PID controller in-terms of linear velocity and steering angles.
The trajectory in Figure 4.8 is obtained using the developed control software. It must be seen
along with the full scale of the simulator (as shown in Figure 3.2.2 to have a clear overview). It
could be noted that the trajectory is for Front ArUco markers position and the line is a trace of
the corresponding marker. It could be observed from both the graphs that the distance travelled is
almost similar.
Figure 4.7: Trajectory of ArUco markers during simulation from [8] (Dimension scale as in Figure
3.2 all units in metres)
Apart form that, there may be situations in which a sharp turn with high throttle could be re-
quired. For example when moving the vehicle from its initial state, a steep turn is required to make
a right turn and at the same time avoid going closer to the front wall. Thus keeping throttle as
0.1 for all combination of steering angles mostly results in the collision with the wall. The present
combination produces smooth trajectories, obtained by experimenting with the simulator.
The control signal is only for setting the throttle, whereas linear velocity varies during the run-
time and thus it is relevant to plot the linear velocity of km/h over time in seconds. PID controller
model takes 22 seconds to achieve the motion until way-point 1 whereas the software developed in
this research requires 32 seconds to traverse the same distance. This could be attributed to the
lower throttle/ linear velocity setting in our case which is also evident from the graphs 4.8 and 4.9
where the throttle used in the case of PID controller is almost double to the one used in this imple-
mentation.
Linear velocity is almost a constant from our simulation, whereas in the scheme used in [8], it
has minute variations as it is understood that the throttle is varied according to feedback whereas
in our case it has been fixed for a particular set of steering angles.
Figure 4.10: Truck Linear Velocity from [8] using PID controller (X-axis-Time in Seconds and Y-
axis-Linear Velocity in km/h)
Figure 4.12: Steering angle from [8] using PID controller (X-axis-Time in Seconds and Y-axis-
Steering angle in degrees)
• The dimensions of the truck and semitrailer are taken up as provided in the report [18]. Ac-
cording to the report the dimensions are L1f = 7, L0b = -0.2, L0 = 3.8. (in meters)
• The velocity profile is in m/s whereas the simulator works with km/h.
• The motion primitive graph involving the heading angle of the trailer (i.e. θ1 could now be
generated. Thus it is important to do some experiments with different velocity profiles and
the rear axle position of the semitrailers (i.e. (x1 , y1 )) and they are presented in the following
subsection.
Figure 4.13: Plot of the rear point of trailer (left) and heading angle of trailer (right) with time
Figure 4.14: Plot of gamma (left) and delta (right) with time
Figure 4.15: Plot of the rear point of trailer (left) and heading angle of trailer (right) with time
Figure 4.16: Plot of gamma (left) and delta (right) with time
Figure 4.15a is the trace of the rear point of the trailer (x1,y1) that was discussed in the kinematic
model. The graph has (0,0) as the starting position of the trailer and (20,20) as the end position of
the rear marker which is set in the ACADO toolkit. From graph 4.15b it could be observed that a
time of approximately 600 seconds is needed for achieving this motion pattern. The heading angle
of the trailer during the motion will be as plotted in 4.15b.
To Conclude
This chapter revisits the proposed research questions to capture how far the research questions
are realized. This is followed by deviations from the original proposal, the conclusions that can be
drawn from the present research, limitations and finally the scientific contribution.
The implementation of a control software through an OSGI framework is realized. The char-
acteristics of self adaptation using OSGI could not be captured and its reasons are discussed
in Table 5.1 and Subsections 5.0.4 and 5.0.5. However adaptation of the working of software
between different docking choices, using motion primitives and using Astar algorithm is im-
plemented. This makes the control software an Adaptive Cyber Physical System.
2. Can a path finding algorithm for autonomous truck semi trailer vehicle be integrated into the
developed framework above?
A novel approach to motion planning based on the results of Astar algorithm is devised and
hence achieving the driving functionality. The initially proposed lattice time bounded Astar
was dropped for it was developed for a single body motion truck whereas the case of this re-
search is a singly articulated truck with a semitrailer. (Lattice Time Bounded Astar is presen-
ted in Appendix A)
3. How can the Kinematic Model of the Truck Semi Trailer be integrated into the Path finding
algorithm
The kinematically feasible motion primitives are generated using the ACADO Toolkit. An
elaborate discussion on motion primitives integration (tantamount to integration of the kin-
ematic model) is presented in Table 5.1. It could be argued that a partial integration of the
kinematic model in the control software (specifically in the motion planning framework and
not path finding algorithm) has been done.
The developed control software framework is run on Raspberry Pi. Since generation of motion
primitives forms part of offline planning, they are not taken-up to be solved on Raspberry Pi
and hence ACADO toolkit is not installed on Raspberry Pi.
5.0.3 Conclusions
Based on the answer to the research questions and the reasons for deviations in the previous sub-
sections, some conclusions can be drawn up and they are enumerated as follows.
1. A model based adaptive control software for autonomous trucks using OSGI programming is
realized with the run-time environment being UNITY digital simulation of the distribution
centre.
2. A path finding algorithm is integrated in the software framework. Kinematically infeasible
motions are coded in the motion planning framework, but the kinematic model of the vehicle
could not be fully integrated with the path finding algorithm as in the forward motion the
generated motion primitives are not suited to the present requirement. Still forward motion
is achieved in a kinematically feasible manner.
3. The ACADO toolkit was also not able to generate motion primitives for reverse motion but a
motion primitive using trail and error that achieves precise reverse motion with a straight
cabin in the end has been arrived at. This is used for docking choices 1 and 2. Whereas the
docking choices from 3 to 10 uses Astar algorithm. As the time required to arrive at the correct
motion primitive by trial and error is very high. This could be attributed to the higher number
of constraints in the kinematic model, the solutions space of correct motion primitive can be
less.
4. The control software developed based on OSGI is made to run both on an Intel processor and
Raspberry Pi and their run-time characteristics were assessed.
Self Adaptation the present run-time environ- yes, adaptation of the program
using OSGI ment is not subjected to a dy- for the reverse motion accord-
namic change as the driving of ing to the choice of docking is
the vehicle is made by determ- implemented. This makes the
inistic way-points, however self control software an Adaptive
adaptation using OSGI could Cyber Physical System
be best captured by a dynamic
event based notification like
a proximity sensor reporting
a sudden unexpected obstacle
placed in the usual determin-
istic route. Thus self adapta-
tion using OSGI has been re-
quested as a future work.
Lattice Time Lattice time bounded Astar yes, a simpler version of Astar
Bounded Astar seemed to be a complicated ap- algorithm suffices.
proach for it was originally de-
veloped for a single body mo-
tion truck whereas the case of
this research is confined to a
singly articulated truck with a
semitrailer .
• In the present run-time environment, a change in context in the working of the program can be
created by accidentally setting way-points that is expected to have a collision and let program
adopt to the change in context. However, it does not present us with an opportunity of an
unexpected event when the way-points are deterministic. Thus the concept of self adaption
using OSGI in a dynamic unexpected change in run-time context will be more suited. For
example, a sudden obstacle is placed in the usual route of a deterministic way-point and a
proximity sensor dynamically reports (an event based notification) which leaves us with a
change in context. Thus self adaptation using OSGI could be requested as a future work.
• The limitations of motion primitives generated using ACADO toolkit is discussed in subsection
4.3.3. The solution to overcome the limitations is to use a more robust solver like CASADI and
IPOPT as done in [11] and [28] could be considered. The implementation was tried as a part
of the present research but the finer implementation specifics are not clearly known from [11]
and [28]. Thus this task is also being requested as a future work.
Lattice Time Bounded A star algorithm is a variant of Astar algorithm as discussed in [23] which
was planned to be taken into implementation. One of the major limitations of its adoption is the
type of truck and trailer used in [23]. It is important to note that the algorithm is made for a truck
with short trailer [23]. The suitability of this algorithm to a singly articulated truck and semitrailer
is a major impediment. However it is interesting to present it from a theoretical standpoint.
Keywords
December 5, 2019
References
[1] Jumbo distribution centre, image reference, weblink, http://www.skyclean.nl/en/
projects-references/jumbo-supermarkten, dated:23/10/2019.
[2] Trucking automation – key deployment scenarios, automated vehicles symposium 2017, https:
//higherlogicdownload.s3.amazonaws.com/AUVSI/14c12c18-fde1-4c1d-8548-035ad166c766/
UploadedImages/2017/PDFs/Proceedings/BOs/Bo6-0.pdf dated: 23/10/2019.
[3] Autonomous Vehicles Readiness Index 2019. https://assets.kpmg/content/dam/kpmg/xx/pdf/
2019/02/2019-autonomous-vehicles-readiness-index.pdf. October 2015, pages 5–6.
[4] Sandip Aine and P. B. Sujit. Integrating planning and control for efficient path planning in the
presence of environmental disturbances. Proceedings of the Twenty-Sixth International Conference
on Automated Planning and Scheduling (ICAPS 2016), page 3.
[5] Fahad Al-Dhief, Naseer Sabri, and Musatafa Albadr. Performance comparison between tcp and
udp protocols in different simulation scenarios. 12 2018.
[6] Yoko Watanabe Mathieu Rognant Michel Devy Alexandru Rusu, Sabine Moreno. State lattice
generation and nonholonomic path planning for a planetary exploration rover. 65 th International
Astronautical Congress.
[7] OSGI Architecture. https://www.osgi.org/developer/architecture/ dated 05/10/2019.
[8] Arash Arjmandi. Truck docking station simulation.
[9] Irfan Mashood Badshah. Master thesis report,automated docking of a scaled tractor semi-trailer.
[10] OSGI Benefits. web link https://www.osgi.org/developer/benefits-of-using-osgi/ dated
05/10/2019.
[11] Kristoffer Bergman, Oskar Ljungqvist, and Daniel Axehill. Improved optimization of motion
primitives for motion planning in state lattices, 01 2019.
[12] INTRALOG Defenition by HAN. https://www.han.nl/onderzoek/werkveld/projecten/
intralog-automotive-resea/ dated 27/11/2019.
[13] M. M. Archer C. L. Heitmeyer, S. Shukla and E. I. Leonard. On model-based software development.
pages 1–8.
[14] Kinematics Definition. https://en.wikipedia.org/wiki/Kinematics dated 23/11/2019.
[15] Vehicle Teleoperation Example. https://www.trucks.com/2019/06/26/
starsky-robotics-autonomous-truck-drive/ dated 02/12/2019.
[16] B. Gerrits. Multi-agent system design for automated docking of semi-trailers by means of
autonomous vehicles, April 2016, page 1.
[17] M.A.M. Hertogh. Development of a virtual environment and supervisory control for trucklab, 2018.
1
[18] Tony Hertogh. Automatic docking of articulated vehicles. Master’s Thesis, pages 5–6.
[19] Javier Ibanez-Guzman, Christian Laugier, John-David Yoder, and Sebastian Thrun. Autonomous
driving: Context and state-of-the-art. Handbook of Intelligent Vehicles (03/2012), pages 1271–
1310.
[20] Stephen W. Liddle. Book, model-driven software development. pages 1,5,6.
[21] O. Ljungqvist, N. Evestedt, M. Cirillo, D. Axehill, and O. Holmer. Lattice-based motion planning
for a general 2-trailer system. In 2017 IEEE Intelligent Vehicles Symposium (IV), pages 1–6, June
2017.
[22] M.F.J. Luijten. Lateral dynamic behaviour of articulated commercial vehicles. Master’s thesis,
Eindhoven, August, 2010, page 121.
[23] Sodertalje Sweden Marcello Cirillo, Scania Technical Centre. From videogames to autonomous
trucks: A new algorithm for lattice-based motion planning.
[24] Nikola Davidovic Vladimir Milosevic Mirjana Maksimovic, Vladimir Vujovic and Branko Perisic.
Raspberry pi as internet of things hardware: Performance and constraints. pages 6–7.
[37] Norwegian University of Science Sandstad, Eivind and Trondheim Technology. Building intelligent
transport systems with reactive blocks and osgi. pages 6 to 15, 48.
2
[38] Netherlands Truck Driver Shortages. https://trans.info/en/
lack-of-drivers-in-the-netherlands-every-second-company-has-trouble-finding-workers-79697
dated 24/11/2019.
[39] Alexander Svae, Amir Taherkordi, Peter Herrmann, and Jan Blech. Self-adaptive control in cyber-
physical systems: the autonomous train experiment. 04 2017.
[40] Networked European Software White Paper and Services Initiative. Cyber physical systems,
opportunities and challenges for software, services, cloud and data. October 2015, pages 5–6.