Short-term ASV Collision Avoidance with Static and Moving Obstacles
Short-term ASV Collision Avoidance with Static and Moving Obstacles
Eriksen, Bjørn-Olav H.;Breivik, Morten
2019-07-10 00:00:00
Short-term ASV Collision Avoidance with Static and Moving Obstacles Bjørn-Olav H. Eriksen and Morten Breivik Centre for Autonomous Marine Operations and Systems, Department of Engineering Cybernetics, Norwegian University of Science and Technology (NTNU), NO-7491 Trondheim, Norway. E-mail: {bjorn-olav.h.eriksen, morten.breivik}@ieee.org July 12, 2019 Abstract 1 Introduction All parts of society are currently being automated at a rapid pace. One example is the development of autonomous This article considers collision avoidance (COLAV) for cars, as exemplified by the development efforts made by both static and moving obstacles using the branching- e.g. Tesla, Google and Uber. Such a trend is also ongoing course model predictive control (BC-MPC) algorithm, in the maritime domain, where autonomous technology which is designed for use by autonomous surface vehicles presents opportunities for increased cost efficiency, in ad- (ASVs). The BC-MPC algorithm originally only consid- dition to reducing the environmental impact of goods and ered COLAV of moving obstacles, so in order to make passenger transport. One example of this is the Yara Birke- the algorithm also be able to avoid static obstacles, we land project in Norway, where an electrically-powered au- introduce an extra term in the objective function based tonomous cargo ship will replace 40000 diesel-powered on an occupancy grid. In addition, other improvements truckloads of fertilizer each year by 2022 (Paris, 2017). are made to the algorithm resulting in trajectories with less Furthermore, it is reported that in excess of 75% of mar- wobbling. The modified algorithm is verified through full- itime accidents are caused by human errors (Chauvin, scale experiments in the Trondheimsfjord in Norway with 2011; Levander, 2017), which also reveals a potential for both virtual static obstacles and a physical moving obsta- increased safety by introducing autonomous technology at cle. A radar-based tracking system is used to detect and sea. Employing ASVs in areas where other vessels are track the moving obstacle, which enables the algorithm present does, however, require a robust COLAV system in to avoid obstacles without depending on vessel-to-vessel order to avoid collisions and operate safely. communication. The experiments show that the algorithm There exists several algorithms for ASV COLAV, e.g. is able to simultaneously avoid both static and moving the velocity obstacle (VO) algorithm (Kuwata et al., 2014), obstacles, while providing clear and readily observable the A* algorithm (Schuster et al., 2014) and algorithms maneuvers. The BC-MPC algorithm is compliant with based on model predictive control (MPC) and optimiza- rules 8, 13 and 17 of the the International Regulations tion (Benjamin et al., 2006; Švec et al., 2013; Abdelaal for Preventing Collisions at Sea (COLREGs), and favors and Hahn, 2016; Hagen et al., 2018). These algorithms maneuvers following rules 14 and 15. are, however, designed with the idea of “one size fits all”, Keywords: Autonomous surface vehicles, collision where the same algorithm is used to solve both situations avoidance, model predictive control requiring proactive and reactive behaviors. A challenge arXiv:1907.04877v1 [eess.SY] 10 Jul 2019 Lameijer, 2004). The short-term COLAV algorithm in- puts the modified trajectory from the mid-level algorithm, and should have low computational requirements ensur- ing that the COLAV system can react to sudden changes in the environment. This algorithm should also serve as a final safety barrier in situations where e.g. the mid-level algorithm fails to find a solution (Eriksen and Breivik, 2017b). In addition, the short-term algorithm should have a shorter planning horizon than the mid-level algorithm, making it inherently capable of handling situations where the COLREGs may require ignoring the maneuvering as- pects of rules 14 and 15 when moving obstacles do not comply with the COLREGs. The algorithm should, how- ever, maneuver in accordance with rules 14 and 15 when the situation allows it. The authors have performed a significant amount of work on the hybrid architecture in Figure 1, concerning e.g. model-based vessel controllers (Eriksen and Breivik, Figure 1: A hybrid architecture with three layers. The 2017a, 2018), short-term COLAV (Eriksen et al., 2018, support functions provide relevant information for the 2019b), mid-level COLAV (Eriksen and Breivik, 2017b) COLAV algorithms, including prediction of obstacle tra- and a high-level planner interfaced to the mid-level algo- jectories, static obstacles from electronic nautical charts rithm (Bitar et al., 2019). In an upcoming article (Erik- (ENC) and situational awareness in the form of COLREGs sen et al., 2019a), we populate the hybrid architecture situations. with algorithms including the BC-MPC algorithm dis- cussed in this article, and demonstrate COLAV compliant with COLREGs rules 8 and 13–17 in simulations. Work with this approach is that the algorithm must be able to has also been performed on obstacle trajectory prediction solve problems of a wide range sufficiently well, which (Hexeberg et al., 2017; Dalsnes et al., 2018). For the short- makes the algorithm difficult to design and tune. A differ- term COLAV layer, we initially focused on the dynamic ent approach is to utilize a hybrid architecture (Loe, 2008; window (DW) algorithm, using a radar-based tracking sys- Casalino et al., 2009), where the complementary strengths tem for detecting and tracking obstacles (Wilthil et al., of different algorithms can be combined in a layered archi- 2017). The reason for using exteroceptive sensors such as tecture. An example of a hybrid architecture is shown in radars for detecting obstacles is that they do not depend Figure 1, where the COLAV system is divided into three on vessel-to-vessel communication or collaboration with layers, namely a high-level, mid-level and a short-term other vessels, hence enabling avoidance of vessels which COLAV algorithm. The high-level planner performs long- do not have or use automatic identification system (AIS) term planning by finding a path or trajectory from an initial transponders. Another questionable aspect of AIS is that position to a goal position while being able to avoid static other vessels may provide incorrect information (Harati- obstacles, satisfy time constraints and minimize energy Mokhtari et al., 2007), which can be difficult to detect and consumption. The mid-level algorithm attempts to follow handle. However, there is a fair amount of noise on obsta- the planned path or trajectory from the high-level planner, cle estimates originating from systems using exteroceptive while making local modifications in order to avoid moving sensors, which the DW algorithm was shown not to handle obstacles. This algorithm should be designed to comply sufficiently well in full-scale experiments (Eriksen et al., with the maneuvering rules of the COLREGs, which dic- 2018). We therefore developed the BC-MPC algorithm for tates how vessels should behave in situations where there short-term COLAV (Eriksen et al., 2019b), which is based exists a risk of collision with other vessels (Cockcroft and on MPC and designed to be robust to obstacle estimate 2 noise. This algorithm is shown to have good performance each contains a sequence of maneuvers. Given this search in full-scale experiments, but originally only accounts for space, an objective function is computed on the trajecto- moving obstacles. ries, and the optimized trajectory is selected and used as In this article, we further develop the BC-MPC algo- the reference to the vessel controllers which control the rithm to also handle avoidance of static obstacles in addi- speed over ground (SOG) and course. The algorithm is tion to moving obstacles, as well as producing trajectories based on MPC, hence only the first part of the optimized with less wobbling. The modified algorithm is verified trajectory is used before a new solution is computed and in full-scale experiments in Trondheimsfjorden, Norway, implemented. showing good performance. The experiments are per- This section presents an overview of the BC-MPC al- formed with virtual static obstacles, while a moving ob- gorithm. Interested readers are referred to Eriksen et al. stacle is detected and tracked using a radar, not depending (2019b) for more details on the algorithm. In addition, this on vessel-to-vessel communication. section presents modifications enabling the algorithm to The rest of this article is organized as follows: Section 2 perform static obstacle avoidance and produce trajectories presents the BC-MPC algorithm and the modifications we with less wobbling than the original algorithm. do to it, Section 3 presents the experimental setup and results, while Section 4 concludes the article and points to 2.1 Trajectory generation possibilities for further work. At each iteration, a new finite search space of possible tra- jectories is generated. Every trajectory contains a number 2 The BC-MPC algorithm of sub-trajectories, each containing one maneuver. This naturally forms a tree structure, with the nodes represent- The BC-MPC algorithm (Eriksen et al., 2019b) is a ing vessel configurations and edges representing maneu- COLAV algorithm designed using sample-based MPC, vers. The initial condition is used as the root node, and intended for short-term COLAV for ASVs. Sample-based the depth of the tree is equal to the number of maneuvers MPC algorithms are based on computing an objective in each trajectory. function over a finite discrete search space and select- The trajectory generation is performed by a repeatable ing the optimized solution, rather than utilizing search maneuver-generation procedure, which when given a ves- algorithms as in gradient-based algorithms. A benefit of sel configuration computes a set of sub-trajectories each sample-based algorithms is that they do not have problems containing one maneuver. Piecewise linear acceleration with solving highly nonlinear and non-convex problems, profiles in speed and course serve as a template for the which in general is difficult for gradient-based algorithms. maneuvers. An example of 5 motion primitives based This makes sample-based algorithms well suited for use on the acceleration profiles in speed and course is shown in the short-term layer in Figure 1. Furthermore, the in Figure 2. The acceleration profiles are dependent on BC-MPC algorithm is designed to be robust with respect the step time length (the maneuver time length) T > 0, to noisy obstacle estimates, which is a significant source of disturbance when using exteroceptive sensors such as the ramp time T 2 ¹0; min¹ ; º¼ and the speed and ramp 2 4 radars for detecting and tracking obstacles. course maneuver lengths, T ; T 2 ¹0; T¼, respectively. With respect to the COLREGs, the BC-MPC algorithm Given a current vessel velocity, the maximum and mini- Û Û mum speed and course accelerations U ; U ; rÛ and complies with rules 8, 13 and 17, and favors maneuvers max min max rÛ are computed using a vessel model. following rules 14 and 15. In cases where the algorithm min chooses to ignore the maneuvering aspects of rules 14 and To improve the convergence properties of the algorithm, 15, which can be required when rule 17 revokes a stand-on we employ a guidance function which can modify some of obligation, the maneuvers have an extended clearance to the trajectories in the search space. This is done by moving obstacles. the closest acceleration sample in speed and course to a At each iteration, the algorithm computes a search space desired acceleration generated by the guidance function, consisting of a finite number of possible trajectories, which if this is inside the feasible acceleration region. 3 _ U 1 U 0 max −1 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time [s] T T T T T ramp U ramp U U 6 min 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time [s] (a) Speed acceleration motion primitives r_ Figure 3: Example of 5 speed trajectories with ramp time r_ max T = 1 s, and maneuver and step time lengths T = T = ramp U 5 s. Acceleration is shown in the top plot, while speed is shown in the bottom plot. T 2T T 2T T T T T ramp ramp ramp ramp the trajectory generation, we use an error model of the r_min vessel to generate feedback-corrected speed and course trajectories U ¹tº and ¯ ¹tº, which similarly as in (1) is d d combined in a set U . The feedback-corrected speed and (b) Course acceleration motion primitives. course trajectories are used to generate feedback-corrected Figure 2: Acceleration motion primitives, where T is the predicted pose trajectories: step time, T denotes the ramp time, while T and T ramp U ¯ ¯ ¯ H = ¯¹t; U¹tº; ¯¹tºº¹U¹tº; ¯¹tºº 2 U ; (2) are the SOG and course maneuver time lengths, respec- Û Û tively. The symbols U ; U ; rÛ and rÛ denote the max min max min where ¯¹t; U¹tº; ¯¹tºº denotes a kinematic simulation pro- acceleration limits of the vessel at the initial vessel state. cedure to obtain the vessel pose. A full trajectory search space is created by first gen- Desired speed and course trajectories U ¹tº and ¹tº d d erating a set of sub-trajectories by using the maneuver- are generated by analytically integrating the acceleration generation procedure initialized with the initial vehicle motion primitives. Numerical examples of 5 speed and 5 pose. At this stage, the prediction tree has a depth of course trajectories are shown in figures 3 and 4. It should one with the initial vessel pose as the root node and a set be noted that these trajectories are intended as reference of leaf nodes each reached by one maneuver. Following trajectories for the vessel controllers, hence they are ini- this, we append the trajectories with another maneuver by tiated in an open-loop fashion with the current desired repeating the maneuver-generation procedure, initialized speed and course in order to ensure continuous references on each of the leaf nodes, which increases the depth of for the vessel controllers. The desired speed and course the trajectory prediction tree with one level. This is re- trajectories are joined together in a union set of desired peated until the trajectory prediction tree has the desired velocity trajectories: depth, i.e. each trajectory has the desired number of ma- neuvers. This concept is illustrated in Figure 5. The U = fU ¹tº; U ¹tº; : : :; U ¹tºg acceleration profile parameters and number of speed and d d;1 d;2 d;N course motion primitives can be level-dependent, which f ¹tº; ¹tº; : : :; ¹tºg; (1) d;1 d;2 d;N allows for shaping the maneuvers differently and avoiding resulting in a total of N N desired velocity trajectories exponential growth with the number of levels. To reduce + + where N 2 Z and N 2 Z are the number of speed the complexity in tuning the algorithm, we use the same and course motion primitives. To include feedback in ramp time T and speed and course maneuver lengths ramp Speed [m/s] Acceleration [m/s ] 20 Level 0 −20 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Level 1 Time [s] Level 2 −20 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Figure 5: Illustration of a trajectory prediction tree with Time [s] two levels. The red node is the root node containing the initial vessel configuration. Other colors group nodes and edges associated with each maneuver-generation proce- −50 dure, which generate three maneuvers each time (given by 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 combinations of N and N satisfying N N = 3). The Time [s] U U tree contains a total of nine trajectories, each consisting of two sub-trajectories. Figure 4: Example of 5 course trajectories with ramp time T = 1 s, and maneuver and step time lengths ramp T = T = 5 s. Acceleration is shown in the top plot, rate The objective function is given as: in the middle plot and course in the bottom plot. G¹ ¯¹tº; u ¹tº; p ¹tºº = w align¹ ¯¹tº; p ¹tºº d al d d + w avoid ¹ ¯¹tºº + w avoid ¹ ¯¹tºº T and T throughout each level. For a desired trajec- av,m m av,s s tory tree depth B (B maneuvers in each trajectory), this + w tran ¹u ¹tºº + w tran ¹u ¹tºº; (4) t;U U d t; d leaves us with deciding the step time lengths of each level T = »T ; T ; : : :; T ¼, and the number of speed and course where w ; w ; w ; w ; w > 0 are tuning parame- 1 2 B al av,m av,s t;U t; maneuvers at each level N = »N ; N ; : : :; N ¼ and ters. U U;1 U;2 U;B N = »N ; N ; : : :; N ¼. The align¹º function assigns a value to following the ;1 ;2 ;B desired trajectory p ¹tº. The avoid ¹º function assigns A set of feedback-corrected predicted pose trajectories d m a cost to traveling close to moving obstacles, which de- for a trajectory generation with B = 3 levels is shown in pends on the distance to an obstacle for each point on Figure 6. The ramp time is T = 1 s, and the speed and ramp the predicted trajectories. The maneuvering rules in the course maneuver lengths are T = T = 5 s. The step time COLREGs, rules 13–15, require the vessel to maneuver lengths are T = »20; 30; 30¼ s, and the number of speed and to starboard in head-on situations, and recommend to pass course maneuvers are N = »1; 1; 1¼ and N = »5; 3; 3¼. behind an obstacle if the obstacle approaches from the starboard side. To motivate the algorithm to follow these rules, while being free to ignore the specific maneuver- 2.2 Selecting the optimized trajectory ing aspects if required in situations where the other vessel violates the COLREGs, we use the obstacle regions in Given a search space of vessel trajectories and a desired Figure 7 when calculating this cost. The regions can be trajectory p ¹tº 2 R , we solve an optimization problem d interpreted as follows: the margin region is allowable to to find the optimized desired velocity trajectory u ¹tº = enter, the safety region is not desirable to enter, while the U ¹tº ¹tº collision region should not be entered. Notice that the al- as: d d gorithm will require a larger clearance in situations where the maneuvering rules in the COLREGs are ignored, e.g. u ¹tº = argmin G¹ ¯ ¹tº; u ¹tº; p ¹tºº: (3) d;k d k ¯ if maneuvering to port in a head-on situation. See Eriksen ¹ ¯ ¹tº;u ¹tºº2¹H;U º d;k d ◦ ◦ ◦ 2 Course [ ] Rate [ /s] Acceleration [ /s ] 400 Ownship Collision Safety Margin region region region −400 −300 −200 −100 0 100 200 300 400 East [m] Figure 6: A set of predicted pose trajectories with three levels. Notice how the guidance function shifts some of the c maneuvers, marked in dark green, to converge towards the desired trajectory, which is a straight-north trajectory from the initial pose (not shown in the figure). For illustration Figure 7: Avoidance cost regions centered at the mov- purposes, the trajectories only contain course maneuvers. ing obstacle, each constructed by one circular and three elliptical segments. The green, yellow and red regions are named the margin, safety and collision regions, re- et al. (2019b) for more details on the align¹º and avoid ¹º spectively. The avoidance cost increases linearly with terms. different gradients inside the green and yellow regions, In this article, we introduce the avoid ¹º, tran ¹º and s U while the cost is constant inside the red region. The vari- tran ¹º terms. The avoid ¹º term assigns a cost to avoid- ables a ; b and c , i 2 f1; 2; 3g denote the region sizes, i i i ing static obstacles, while tran ¹º and tran ¹º are transi- where c = b + d with d controlling the i i COLREGs COLREGs tional cost terms increasing the robustness to noise. These COLREGs expansion. terms will be discussed in detail in the following two sec- tions. 2.4 Speed and course transitional costs 2.3 Static obstacle avoidance In order to improve the robustness to noise on obstacle estimates, transitional cost is included in the objective Static obstacles are modeled using an occupancy grid, function, which penalizes changing the planned trajectory which allows for easy representation of obstacles with ar- from iteration to iteration. In Eriksen et al. (2019b), a bitrary shapes like e.g. land and islands. In addition, single transitional cost term is used, which introduces a static obstacles are padded with a decaying gradient to in- cost if one selects a different speed and/or course than the troduce some smoothness to the static obstacle avoidance one closest to the one selected in the previous iteration. function. Given an occupancy grid O¹pº 2 »0; 100¼ where Note that the trajectory prediction is based on sampling O¹pº = 100 and O¹pº = 0 represents an occupied and the possible acceleration of the vessel in the current iter- empty cell, respectively, we define the static obstacle term ation, which implies that the exact trajectory selected in as: t +T 0 the previous iteration may not exist in the current search avoid ¹ ¯¹tºº = O¹p ¯¹
ººd
; (5) space. Here, it is proposed to split the transitional cost term where t denotes the initial time and ¯¹tº = into separate speed and course terms. This motivates the p ¯¹tº ¹tº . algorithm to not alter the course if the speed is changed North [m] and vice versa, which would not be the case when using a single transitional cost term. The transitional cost terms are defined as: t +T 0 1 1; U ¹
º