curobo.rollout.cost.cost_base module

class curobo.rollout.cost.cost_base.CostConfig(weight: 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: float | None = None, dof: int = 7, vec_weight: torch.Tensor | List[float] | float | NoneType = None, max_value: float | None = None, hinge_value: float | None = None, vec_convergence: List[float] | None = None, threshold_value: float | None = None, return_loss: bool = False)

Bases: object

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) –

weight: Tensor | float | List[float]
tensor_args: TensorDeviceType = None
distance_threshold: float = 0.0
classify: bool = False
terminal: bool = False
run_weight: float | None = None
dof: int = 7
vec_weight: Tensor | List[float] | float | None = None
max_value: float | None = None
hinge_value: float | None = None
vec_convergence: List[float] | None = None
threshold_value: float | None = None
return_loss: bool = False
update_vec_weight(vec_weight)
class curobo.rollout.cost.cost_base.CostBase(config=None)

Bases: Module, CostConfig

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) –

_init_post_config()
forward(q)

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.

disable_cost()
enable_cost()
update_weight(weight)
Parameters:

weight (float) –

property enabled
update_dt(dt)
Parameters:

dt (float | Tensor) –