shasta.primitives.formation#

Module Contents#

Classes#

Formation

Formation control primitive using region based shape control.

class Formation(config=None)[source]#

Bases: object

Formation control primitive using region based shape control. Coded by: Apurvakumar Jani, Date: 18/9/2019

calculate_vel(vehicle, dt, all_drones_pos, centroid_pos, path_vel, vmax, formation_type)[source]#

Calculate the vehicle velocity depending on the position of the peer vehicles

Parameters:
  • vehicle (class instance) – A class instance of UxV agent

  • dt (float) – Time step duration (in seconds) to use in next position calculation

  • all_drones_pos (aarray) – An array with position of all the vehicles in the group/platoon

  • centroid_pos (array) – An array specifying the centroid of the platoon

  • path_vel (float) – Path velocity calculated from next position and current position

  • vmax (float) – Maximum velocity of the vehicle

  • formation_type (str) – Whether the formation is solid or ring

Returns:

vehicle – A vehicle class instance with updated position

Return type:

class instance

execute(vehicles, next_pos, centroid_pos, formation_type)[source]#

Get the position of the formation control

Parameters:
  • vehicles (list) – A list containing UAV or UGV class

  • centroid_pos (array) – An array containing the x, y, and z position

  • dt (float) – Time step to be used for distance calculation