trajectory_supervisor.helper_funcs.src.reachable_set_turn_limit module

class trajectory_supervisor.helper_funcs.src.reachable_set_turn_limit.ReachSetTurnLimit(bound_l: numpy.ndarray, bound_r: numpy.ndarray, localgg: numpy.ndarray, closed: bool, trim_set_to_bounds: bool = False)[source]

Bases: object

Class that supports the calculation of a simple reachable set, that is limited by the a turn radius curve to the left and right.

Parameters
  • bound_l – coordinates of the left bound (numpy array with columns x, y)

  • bound_r – coordinates of the right bound (numpy array with columns x, y)

  • localgg – maximum g-g-values at a certain position on the map (currently, only the max a used)

  • trim_set_to_bounds – if set to ‘True’, regions of the reachable set outside of the track are removed (computationally demanding)

calc_reach_set(obj_pos: numpy.ndarray, obj_heading: float, obj_vel: float, obj_length: float, obj_width: float, obj_turn: float, dt: float, t_max: float)tuple[source]

Calculates a simple reachable set, that is limited by the a turn radius curve to the left and right

Parameters
  • obj_pos – position of the vehicle (x and y coordinate)

  • obj_heading – heading of the vehicle

  • obj_vel – velocity of the vehicle

  • obj_length – length of the vehicle [in m]

  • obj_width – width of the vehicle [in m]

  • obj_turn – turn radius of the vehicle [in m]

  • dt – desired temporal resolution of the reachable set

  • t_max – maximum temporal horizon for the reachable set

Returns

  • poly - dict of reachable areas with:

    • keys holding the evaluated time-stamps

    • values holding the outlining coordinates as a np.ndarray with columns [x, y]

  • outline - outline of shape that is removed from the reachable set

trajectory_supervisor.helper_funcs.src.reachable_set_turn_limit.get_con_turn_trajecory(object_x: float, object_y: float, object_theta: float, object_vel: float, direction: float, localgg: numpy.ndarray, turn_rad: float, object_length: float, object_width: float, step_size: float = 3.0)[source]

Calculates a conservative steering trajectory by using maximum longitudinal and lateral acceleration (decoupled), until the turn-radius is the limiting factor.

Parameters
  • object_x – x-position of the vehicle

  • object_y – y-position of the vehicle

  • object_theta – heading of the vehicle

  • object_vel – absolute velocity of the vehicle

  • direction – 1:left -1: right

  • localgg – maximum g-g-values at a certain position on the map

  • turn_rad – turning radius of vehicle

  • object_length – length of the vehicle

:param object_width : width of the vehicle :param step_size: size of steps along the planned trajectory :returns:

  • trajectory - pure steering trajectory as a np.ndarray with columns [x, y, heading]

trajectory_supervisor.helper_funcs.src.reachable_set_turn_limit.get_pure_turn_trajectory(object_x: float, object_y: float, object_theta: float, direction: float, turn_rad: float, object_length: float, object_width: float)[source]

Calculate a trajectory sticking to the specified turing radius (no lateral forces assumed).

Parameters
  • object_x – x-position of the vehicle

  • object_y – y-position of the vehicle

  • object_theta – heading of the vehicle

  • direction – 1:left -1: right

  • turn_rad – turning radius of vehicle

  • object_length – length of the vehicle

:param object_width : width of the vehicle :returns:

  • trajectory - pure turn radius trajectory as a np.ndarray with columns [x, y]

trajectory_supervisor.helper_funcs.src.reachable_set_turn_limit.rotation_matrix(angle: float)[source]