curobo.rollout.cost.projected_dist_cost module

Distance cost projected into the null-space of the Jacobian

class curobo.rollout.cost.projected_dist_cost.ProjType(value)

Bases: Enum

An enumeration.

IDENTITY = 0
PSEUDO_INVERSE = 1
class curobo.rollout.cost.projected_dist_cost.ProjectedDistCostConfig(weight: Union[torch.Tensor, float, List[float]], tensor_args: curobo.types.base.TensorDeviceType = None, distance_threshold: float = 0.0, classify: bool = False, terminal: bool = False, run_weight: Optional[float] = None, dof: int = 7, vec_weight: Union[torch.Tensor, List[float], float, NoneType] = None, max_value: Optional[float] = None, hinge_value: Optional[float] = None, vec_convergence: Optional[List[float]] = None, threshold_value: Optional[float] = None, return_loss: bool = False, dist_type: curobo.rollout.cost.dist_cost.DistType = <DistType.L2: 1>, use_null_space: bool = False, eps: float = 0.0001, proj_type: curobo.rollout.cost.projected_dist_cost.ProjType = <ProjType.IDENTITY: 0>)

Bases: DistCostConfig

Parameters:
  • weight (Tensor | float | List[float]) –

  • tensor_args (TensorDeviceType) –

  • distance_threshold (float) –

  • classify (bool) –

  • terminal (bool) –

  • run_weight (float | None) –

  • dof (int) –

  • vec_weight (Tensor | List[float] | float | None) –

  • max_value (float | None) –

  • hinge_value (float | None) –

  • vec_convergence (List[float] | None) –

  • threshold_value (float | None) –

  • return_loss (bool) –

  • dist_type (DistType) –

  • use_null_space (bool) –

  • eps (float) –

  • proj_type (ProjType) –

eps: float = 0.0001
proj_type: ProjType = 0
class curobo.rollout.cost.projected_dist_cost.ProjectedDistCost(config)

Bases: DistCost, ProjectedDistCostConfig

Initialize class

Parameters:
  • config (Optional[CostConfig], optional) – To initialize this class directly, pass a config.

  • class (If this is a base) –

  • CostConfig. (it's assumed that you will initialize the child class with) –

  • None. (Defaults to) –

forward(disp_vec, jac_batch=None)

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_pinv_null_disp(disp_vec, jac_batch)