curobo.types.state module

class FilterCoeff(
position: 'float' = 0.0,
velocity: 'float' = 0.0,
acceleration: 'float' = 0.0,
jerk: 'float' = 0.0,
)

Bases: object

position: float = 0.0
velocity: float = 0.0
acceleration: float = 0.0
jerk: float = 0.0
class State

Bases: Sequence

blend(
coeff: FilterCoeff,
new_state: State,
)
to(
tensor_args: TensorDeviceType,
)
get_state_tensor()
apply_kernel(kernel_mat)
clone()
_abc_impl = <_abc._abc_data object>
_is_protocol = False
count(
value,
) integer -- return number of occurrences of value
index(
value[,
start[,
stop,]]
) integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

class JointState(position: 'Union[List[float], T_DOF]', velocity: 'Union[List[float], T_DOF, None]' = None, acceleration: 'Union[List[float], T_DOF, None]' = None, joint_names: 'Optional[List[str]]' = None, jerk: 'Union[List[float], T_DOF, None]' = None, tensor_args: 'TensorDeviceType' = TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32), aux_data: 'dict' = <factory>)

Bases: State

position: List[float] | Tensor
velocity: List[float] | Tensor | None = None
acceleration: List[float] | Tensor | None = None
joint_names: List[str] | None = None
jerk: List[float] | Tensor | None = None
tensor_args: TensorDeviceType = TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32)
aux_data: dict
static from_numpy(
joint_names: List[str],
position: ndarray,
velocity: ndarray | None = None,
acceleration: ndarray | None = None,
jerk: ndarray | None = None,
tensor_args: TensorDeviceType = TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),
)
static from_position(
position: Tensor,
joint_names: List[str] | None = None,
)
apply_kernel(kernel_mat)
repeat_seeds(num_seeds: int)
to(
tensor_args: TensorDeviceType,
)
clone()
blend(
coeff: FilterCoeff,
new_state: JointState,
)
get_state_tensor()
static from_state_tensor(
state_tensor,
joint_names=None,
dof=7,
)
stack(
new_state: JointState,
)
static from_list(
position,
velocity,
acceleration,
tensor_args: TensorDeviceType(),
)
copy_at_index(
in_joint_state: JointState,
idx: int | Tensor,
)

Copy joint state to specific index

Parameters:
copy_data(
in_joint_state: JointState,
)

Copy data from in_joint_state to self

Parameters:

in_joint_state (JointState) – _description_

_same_shape(
new_js: JointState,
)
copy_(
in_joint_state: JointState,
)
unsqueeze(idx: int)
squeeze(dim: int | None = 0)
calculate_fd_from_position(
dt: Tensor,
)
static zeros(
size: Tuple[int],
tensor_args: TensorDeviceType,
joint_names: List[str] | None = None,
)
detach()
get_ordered_joint_state(
ordered_joint_names: List[str],
) JointState

Return joint state with a ordered joint names :param ordered_joint_names: _description_ :type ordered_joint_names: List[str]

Returns:

_description_

Return type:

_type_

inplace_reindex(
joint_names: List[str],
)
get_augmented_joint_state(
joint_names,
lock_joints: JointState | None = None,
) JointState
append_joints(
js: JointState,
)
trim_trajectory(
start_idx: int,
end_idx: int | None = None,
)
scale(
dt: float | Tensor,
)
scale_by_dt(
dt: Tensor,
new_dt: Tensor,
)
property shape
index_dof(idx: int)
_abc_impl = <_abc._abc_data object>
_is_protocol = False
count(
value,
) integer -- return number of occurrences of value
index(
value[,
start[,
stop,]]
) integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

jit_js_scale(
vel: None | Tensor,
acc: None | Tensor,
jerk: None | Tensor,
dt: Tensor,
new_dt: Tensor,
)
jit_get_index(
position: Tensor,
velocity: Tensor | None,
acc: Tensor | None,
jerk: Tensor | None,
idx: Tensor,
)
fn_get_index(
position: Tensor,
velocity: Tensor | None,
acc: Tensor | None,
jerk: Tensor | None,
idx: Tensor,
)
jit_get_index_int(
position: Tensor,
velocity: Tensor | None,
acc: Tensor | None,
jerk: Tensor | None,
idx: int,
)