planner.dynamics.action_trajectory#

Module Contents#

planner.dynamics.action_trajectory.zero_order_hold_trajectory(end_actions, trajectory_steps, dim)#
planner.dynamics.action_trajectory.first_order_hold_trajectory(start_actions, end_actions, trajectory_steps, dim)#
planner.dynamics.action_trajectory.create_action_trajectory(type: jacta.planner.core.types.ControlType, start_actions: torch.FloatTensor, end_actions: torch.FloatTensor, trajectory_steps: int) torch.FloatTensor#

Creates a zero- or first-order hold array of action vectors with length trajectory_steps.

Parameters:
  • type (jacta.planner.core.types.ControlType) – Create zero- or first-order hold action trajectory.

  • start_actions (torch.FloatTensor) – A (na) array containing the start action vectors of the desired trajectories.

  • end_actions (torch.FloatTensor) – A (na) array containing the end action vectors of the desired trajectories. For zero-order hold, only the end action vector will be used and held for the entire trajectory. For first-order hold, a linear interpolation between start and end action vector will be created.

  • trajectory_steps (int) – The length of the resulting action vector array.

Returns:

An action vector array (trajectory_steps, na).

Return type:

torch.FloatTensor

planner.dynamics.action_trajectory.create_action_trajectory_batch(type: jacta.planner.core.types.ControlType, start_actions: torch.FloatTensor, end_actions: torch.FloatTensor, trajectory_steps: int) torch.FloatTensor#

Creates a zero- or first-order hold arrays of action vectors with length trajectory_steps.

Parameters:
  • type (jacta.planner.core.types.ControlType) – Create zero- or first-order hold action trajectory.

  • start_actions (torch.FloatTensor) – A (n, na) array containing the start action vectors of the desired trajectories.

  • end_actions (torch.FloatTensor) – A (n, na) array containing the end action vectors of the desired trajectories. For zero-order hold, only the end action vector will be used and held for the entire trajectory. For first-order hold, a linear interpolation between start and end action vector will be created.

  • trajectory_steps (int) – The length of the resulting action vector array.

Returns:

An action vector array (n, trajectory_steps, na).

Return type:

torch.FloatTensor