curobo.cuda_robot_model.cuda_robot_model module

class curobo.cuda_robot_model.cuda_robot_model.CudaRobotModelConfig(tensor_args: 'TensorDeviceType', link_names: 'List[str]', kinematics_config: 'KinematicsTensorConfig', self_collision_config: 'Optional[SelfCollisionKinematicsConfig]' = None, kinematics_parser: 'Optional[KinematicsParser]' = None, compute_jacobian: 'bool' = False, use_global_cumul: 'bool' = False, generator_config: 'Optional[CudaRobotGeneratorConfig]' = None)

Bases: object

Parameters:
tensor_args: TensorDeviceType
kinematics_config: KinematicsTensorConfig
self_collision_config: SelfCollisionKinematicsConfig | None = None
kinematics_parser: KinematicsParser | None = None
compute_jacobian: bool = False
use_global_cumul: bool = False
generator_config: CudaRobotGeneratorConfig | None = None
get_joint_limits()
static from_basic_urdf(urdf_path, base_link, ee_link, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))

Load a cuda robot model from only urdf. This does not support collision queries.

Parameters:
  • urdf_path (str) – Path of urdf file.

  • base_link (str) – Name of base link.

  • ee_link (str) – Name of end-effector link.

  • tensor_args (TensorDeviceType) – Device to load robot model. Defaults to TensorDeviceType().

Returns:

cuda robot model configuration.

Return type:

CudaRobotModelConfig

static from_basic_usd(usd_path, usd_robot_root, base_link, ee_link, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))

Load a cuda robot model from only urdf. This does not support collision queries.

Parameters:
  • urdf_path – Path of urdf file.

  • base_link (str) – Name of base link.

  • ee_link (str) – Name of end-effector link.

  • tensor_args (TensorDeviceType) – Device to load robot model. Defaults to TensorDeviceType().

  • usd_path (str) –

  • usd_robot_root (str) –

Returns:

cuda robot model configuration.

Return type:

CudaRobotModelConfig

static from_robot_yaml_file(file_path, ee_link=None, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))
Parameters:
  • file_path (str) –

  • ee_link (str | None) –

  • tensor_args (TensorDeviceType) –

static from_data_dict(data_dict, tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32))
Parameters:
static from_config(config)
Parameters:

config (CudaRobotGeneratorConfig) –

property cspace
class curobo.cuda_robot_model.cuda_robot_model.CudaRobotModel(config)

Bases: CudaRobotModelConfig

CUDA Accelerated Robot Model

NOTE: Currently dof is created only for links that we need to compute kinematics. E.g., for robots with many serial chains, add all links of the robot to get the correct dof. This is not an issue if you are loading collision spheres as that will cover the full geometry of the robot.

Parameters:

config (CudaRobotModelConfig) –

update_batch_size(batch_size, force_update=False, reset_buffers=False)
forward(q, link_name=None, calculate_jacobian=False)
get_state(q, link_name=None, calculate_jacobian=False)
Return type:

CudaRobotModelState

get_robot_as_mesh(q)
Parameters:

q (Tensor) –

get_robot_as_spheres(q, filter_valid=True)
Parameters:
  • q (Tensor) –

  • filter_valid (bool) –

Parameters:
  • q (Tensor) –

  • link_names (List[str]) –

Return type:

Pose

_cuda_forward(q)
property all_articulated_joint_names
get_self_collision_config()
Return type:

SelfCollisionKinematicsConfig

Parameters:

link_name (str) –

Return type:

Mesh

Parameters:

link_name (str) –

Return type:

Pose

Return type:

Pose

get_dof()
Return type:

int

property joint_names: List[str]
property total_spheres: int
property lock_jointstate
update_kinematics_config(new_kin_config)
Parameters:

new_kin_config (KinematicsTensorConfig) –

property retract_config