curobo.util.trajectory module

class curobo.util.trajectory.InterpolateType(value)

Bases: Enum

An enumeration.

LINEAR = 'linear'

linear interpolation using scipy

CUBIC = 'cubic'

cubic interpolation using scipy

QUINTIC = 'quintic'

quintic interpolation using scipy

LINEAR_CUDA = 'linear_cuda'

cuda accelerated linear interpolation using warp-lang custom kernel :meth: get_cuda_linear_interpolation

KUNZ_STILMAN_OPTIMAL = 'kunz_stilman_optimal'

Uses “Time-optimal trajectory generation for path following with bounded acceleration and velocity.” Robotics: Science and Systems VIII (2012): 1-8, Kunz & Stillman.

curobo.util.trajectory.get_linear_traj(positions, dt=0.5, duration=20, tensor_args={'device': 'cpu', 'dtype': torch.float32}, max_traj_pts=None, compute_dynamics=True)
curobo.util.trajectory.get_smooth_trajectory(raw_traj, degree=5)
curobo.util.trajectory.get_spline_interpolated_trajectory(raw_traj, des_horizon, degree=5)
curobo.util.trajectory.get_batch_interpolated_trajectory(raw_traj, interpolation_dt, max_vel, max_acc, max_jerk, raw_dt, kind=InterpolateType.LINEAR_CUDA, out_traj_state=None, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32), max_deviation=0.1, min_dt=0.02, optimize_dt=True)
Parameters:
  • raw_traj (JointState) –

  • interpolation_dt (float) –

  • max_vel (Tensor) –

  • max_acc (Tensor) –

  • max_jerk (Tensor) –

  • raw_dt (float) –

  • kind (InterpolateType) –

  • out_traj_state (JointState | None) –

  • tensor_args (TensorDeviceType) –

  • max_deviation (float) –

  • min_dt (float) –

  • optimize_dt (bool) –

curobo.util.trajectory.get_cpu_linear_interpolation(raw_traj, traj_steps, out_traj_state, kind, opt_dt=None, interpolation_dt=None)
Parameters:

kind (InterpolateType) –

curobo.util.trajectory.get_cpu_kunz_stilman_interpolation(raw_traj, traj_steps, out_traj_state, max_velocity, max_acceleration, opt_dt, interpolation_dt, max_deviation=0.1)
Parameters:
  • raw_traj (JointState) –

  • traj_steps (int) –

  • out_traj_state (JointState) –

  • max_velocity (Tensor) –

  • max_acceleration (Tensor) –

  • opt_dt (float) –

  • interpolation_dt (float) –

  • max_deviation (float) –

curobo.util.trajectory.get_interpolated_trajectory(trajectory, out_traj_state, des_horizon=None, interpolation_dt=0.02, max_velocity=None, max_acceleration=None, max_jerk=None, kind=InterpolateType.CUBIC, max_deviation=0.05, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))
Parameters:
  • trajectory (List[Tensor]) –

  • out_traj_state (JointState) –

  • des_horizon (int | None) –

  • interpolation_dt (float) –

  • max_velocity (Tensor | None) –

  • max_acceleration (Tensor | None) –

  • max_jerk (Tensor | None) –

  • max_deviation (float) –

  • tensor_args (TensorDeviceType) –

Return type:

JointState

curobo.util.trajectory.linear_smooth(x, y=None, n=10, kind=InterpolateType.CUBIC, last_step=None, opt_dt=None, interpolation_dt=None)
Parameters:

x (array) –