curobo.rollout.dynamics_model.kinematic_model module

class curobo.rollout.dynamics_model.kinematic_model.TimeTrajConfig(base_dt: float, base_ratio: float, max_dt: float)

Bases: object

Parameters:
  • base_dt (float) –

  • base_ratio (float) –

  • max_dt (float) –

base_dt: float
base_ratio: float
max_dt: float
get_dt_array(num_points)
Parameters:

num_points (int) –

update_dt(all_dt=None, base_dt=None, max_dt=None, base_ratio=None)
Parameters:
  • all_dt (float | None) –

  • base_dt (float | None) –

  • max_dt (float | None) –

  • base_ratio (float | None) –

class curobo.rollout.dynamics_model.kinematic_model.KinematicModelState(state_seq: curobo.types.state.JointState, ee_pos_seq: torch.Tensor | None = None, ee_quat_seq: torch.Tensor | None = None, robot_spheres: torch.Tensor | None = None, link_pos_seq: torch.Tensor | None = None, link_quat_seq: torch.Tensor | None = None, lin_jac_seq: torch.Tensor | None = None, ang_jac_seq: torch.Tensor | None = None, link_names: List[str] | None = None)

Bases: Sequence

Parameters:
  • state_seq (JointState) –

  • ee_pos_seq (Tensor | None) –

  • ee_quat_seq (Tensor | None) –

  • robot_spheres (Tensor | None) –

  • link_pos_seq (Tensor | None) –

  • link_quat_seq (Tensor | None) –

  • lin_jac_seq (Tensor | None) –

  • ang_jac_seq (Tensor | None) –

  • link_names (List[str] | None) –

state_seq: JointState
ee_pos_seq: Tensor | None = None
ee_quat_seq: Tensor | None = None
robot_spheres: Tensor | None = None
lin_jac_seq: Tensor | None = None
ang_jac_seq: Tensor | None = None
property ee_pose: Pose
_abc_impl = <_abc._abc_data object>
class curobo.rollout.dynamics_model.kinematic_model.KinematicModelConfig(robot_config: curobo.types.robot.RobotConfig, dt_traj_params: curobo.rollout.dynamics_model.kinematic_model.TimeTrajConfig, tensor_args: curobo.types.base.TensorDeviceType, vel_scale: float = 1.0, state_estimation_variance: float = 0.0, batch_size: int = 1, horizon: int = 5, control_space: curobo.types.enum.StateType = <StateType.ACCELERATION: 2>, state_filter_cfg: Optional[curobo.util.state_filter.FilterConfig] = None, teleport_mode: bool = False, return_full_act_buffer: bool = False, state_finite_difference_mode: str = 'BACKWARD', filter_robot_command: bool = False)

Bases: object

Parameters:
  • robot_config (RobotConfig) –

  • dt_traj_params (TimeTrajConfig) –

  • tensor_args (TensorDeviceType) –

  • vel_scale (float) –

  • state_estimation_variance (float) –

  • batch_size (int) –

  • horizon (int) –

  • control_space (StateType) –

  • state_filter_cfg (FilterConfig | None) –

  • teleport_mode (bool) –

  • return_full_act_buffer (bool) –

  • state_finite_difference_mode (str) –

  • filter_robot_command (bool) –

robot_config: RobotConfig
dt_traj_params: TimeTrajConfig
tensor_args: TensorDeviceType
vel_scale: float = 1.0
state_estimation_variance: float = 0.0
batch_size: int = 1
horizon: int = 5
control_space: StateType = 2
state_filter_cfg: FilterConfig | None = None
teleport_mode: bool = False
return_full_act_buffer: bool = False
state_finite_difference_mode: str = 'BACKWARD'
filter_robot_command: bool = False
static from_dict(data_dict_in, robot_cfg, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))
Parameters:

robot_cfg (Dict | RobotConfig) –

class curobo.rollout.dynamics_model.kinematic_model.KinematicModel(kinematic_model_config)

Bases: KinematicModelConfig

Parameters:

kinematic_model_config (KinematicModelConfig) –

update_traj_dt(dt, base_dt=None, max_dt=None, base_ratio=None)
Parameters:
  • dt (float | Tensor) –

  • base_dt (float | None) –

  • max_dt (float | None) –

  • base_ratio (float | None) –

get_next_state(curr_state, act, dt)

Does a single step from the current state Args: curr_state: current state act: action dt: time to integrate Returns: next_state TODO: Move this into tensorstep class?

Parameters:
  • curr_state (Tensor) –

  • act (Tensor) –

tensor_step(state, act, state_seq, state_idx=None)

Args: state: [1,N] act: [H,N] todo: Integration with variable dt along trajectory

Parameters:
Return type:

JointState

robot_cmd_tensor_step(state, act, state_seq, state_idx=None)

Args: state: [1,N] act: [H,N] todo: Integration with variable dt along trajectory

Parameters:
Return type:

JointState

update_cmd_batch_size(batch_size)
update_batch_size(batch_size, force_update=False)
forward(start_state, act_seq, start_state_idx=None)
Parameters:
  • start_state (JointState) –

  • act_seq (Tensor) –

  • start_state_idx (Tensor | None) –

Return type:

KinematicModelState

integrate_action(act_seq)
integrate_action_step(act, dt)
filter_robot_state(current_state)
Parameters:

current_state (JointState) –

get_robot_command(current_state, act_seq, shift_steps=1, state_idx=None)
Parameters:
  • current_state (JointState) –

  • act_seq (Tensor) –

  • shift_steps (int) –

  • state_idx (Tensor | None) –

Return type:

JointState

property action_bound_lows
property action_bound_highs
property init_action_mean
property retract_config
property cspace_distance_weight
property null_space_weight
property max_acceleration
property max_jerk
property action_horizon
get_state_bounds()
get_action_from_state(state)
Parameters:

state (JointState) –

Return type:

Tensor

get_state_from_action(start_state, act_seq, state_idx=None)

Compute State sequence from an action trajectory

Parameters:
  • start_state (JointState) – _description_

  • act_seq (torch.Tensor) – _description_

  • state_idx (Tensor | None) –

Returns:

_description_

Return type:

JointState