# Jam Mitigation for Autonomous Convoys via Behavior-Based Robotics
## 3 Materials and Methods
### Behavior Manager
#### 3.3.2 Behaviors  
In general, behaviors are modular components that generate motor responses given some sensory stimulus which are run in a concurrent and distributed manner [32]. In the Motor Schema approach, the definition of behaviors is expanded, and they are categorized as either motor schemas, which generate motor responses per its defined behavior, or perceptual schemas, which provide sensor information to the other behaviors [33]. The Behavior Manager is based on the Motor Schema approach, and accordingly, categorizes its behaviors as either perceptual schemas or motor schemas.  
Behavior Manager perceptual schema behaviors utilize sensor data and generate behavioral costmaps based on the requirements of the behavior. For example, Figure 8 shows how a Keep-Standoff-Distance perceptual schema behavior would work. Figure 8 shows the world state, with the autonomous vehicle in the center, and an obstacle being detected in the upper right-hand corner. Figure 8 shows what the LiDAR readings would be, with a value of 253 being associated with the detected obstacle. Figure 8 shows the final behavioral costmap, with the perceptual schema increasing the costs in the area directly around the obstacle to meet the behavior's goal of keeping a standoff distance between the autonomous vehicle and objects detected by the sensors. Each perceptual schema has a gain that it assigns to its behavioral costmap to be used when combining the layers into a master costmap. Multiple perceptual schemas are run concurrently, creating multiple behavioral costmaps that are used by the greater Behavior Manager in individual behaviors and in overall path planning.  
Figure 7: Simplified example of 5 \(\times\) 5 behavioral costmaps, combined into a master costmap via addition.  
Behavior Manager motor schemas produce target goals, expressed as two-dimensional Cartesian coordinates \(\mathbf{T}\), based on the requirements of the behavior. For example, Figure 9 shows two different notional motor schema behaviors. Figure 9a represents a Stay-on-Road behavior. The target goal produced, represented by the star, causes the vehicle to stay on the road. Figure 9b on the other hand, represents a Follow-Leader behavior, with the leader being represented by a dog on the grass. The target goal produced directs the vehicle towards the leader. Each motor schema has a gain that it assigns to the goal that it produces. The goals and associated gains are utilized by the Behavior Manager to determine the final goal point for path planning.  
In the development of our autonomous convoy system, we created four behaviors to allow for leader following in the presence of jams: two motor schemas and two perceptual schemas. The behaviors are Move-to-Goal, Maintain-Formation, Avoid-Obstacle-Proximity, and Avoid-Leader-Zone, respectively.  
Move-to-Goal  
The Move-to-Goal motor schema behavior enables basic goal following. A high-level planner provides a coordinate \(\mathbf{B}\) as an input to the Move-to-Goal behavior. The behavior then publishes the coordinates as the target goal. For our autonomous convoy following  
Figure 8: A simplified example of a Keep-Standoff-Distance perceptual schema behavior: (**a**) the world state, with the autonomous vehicle in the center, and an obstacle being detected in the upper right-hand corner; (**b**) costmap with LiDAR readings; (**c**) final behavioral costmap, with the perceptual schema increasing the costs in the area directly around the obstacle.  
Figure 9: Two examples of motor schema behaviors: (**a**) Stay-of-Path; (**b**) Follow-Leader.  
system, Move-to-Goal is used by the vehicles to move towards GPS breadcrumbs provided by their respective leaders for a PF convoy approach as follows:  
\[\textbf{T}=\textbf{B}, \tag{1}\]  
where new GPS breadcrumb **B** coordinates are provided periodically.