curobo.wrap.reacher.mpc module

class MpcSolverConfig(
solver: curobo.wrap.wrap_mpc.WrapMpc,
world_coll_checker: curobo.geom.sdf.world.WorldCollision | None = None,
tensor_args: curobo.types.base.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),
use_cuda_graph_full_step: bool = False,
)

Bases: object

solver: WrapMpc
world_coll_checker: WorldCollision | 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)
use_cuda_graph_full_step: bool = False
static load_from_robot_config(
robot_cfg: str | dict | RobotConfig,
world_cfg: str | dict | WorldConfig,
base_cfg: dict | 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),
compute_metrics: bool = True,
use_cuda_graph: bool | None = None,
particle_opt_iters: int | None = None,
self_collision_check: bool = True,
collision_checker_type: CollisionCheckerType | None = CollisionCheckerType.PRIMITIVE,
use_es: bool | None = None,
es_learning_rate: float | None = 0.01,
use_cuda_graph_metrics: bool = False,
store_rollouts: bool = True,
use_cuda_graph_full_step: bool = False,
sync_cuda_time: bool = True,
collision_cache: Dict[str, int] | None = None,
n_collision_envs: int | None = None,
collision_activation_distance: float | None = None,
world_coll_checker=None,
step_dt: float | None = None,
use_lbfgs: bool = False,
use_mppi: bool = True,
)
class MpcSolver(
config: MpcSolverConfig,
)

Bases: MpcSolverConfig

Model Predictive Control Solver for Arm Reacher task.

Parameters:

MpcSolverConfig – _description_

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)
_update_batch_size(batch_size)
update_goal_buffer(
solve_state: ReacherSolveState,
goal: Goal,
) Goal
step(
current_state: JointState,
shift_steps: int = 1,
seed_traj: JointState | None = None,
max_attempts: int = 1,
)
step_once(
current_state: JointState,
shift_steps: int = 1,
seed_traj: JointState | None = None,
) WrapResult
_step(
current_state: JointState,
shift_steps: int = 1,
seed_traj: JointState | None = None,
)
_initialize_cuda_graph_step(
current_state: JointState,
shift_steps: int = 1,
seed_traj: JointState | None = None,
)
setup_solve_single(
goal: Goal,
num_seeds: int | None = None,
) Goal
setup_solve_goalset(
goal: Goal,
num_seeds: int | None = None,
) Goal
setup_solve_batch(
goal: Goal,
num_seeds: int | None = None,
) Goal
setup_solve_batch_goalset(
goal: Goal,
num_seeds: int | None = None,
) Goal
setup_solve_batch_env(
goal: Goal,
num_seeds: int | None = None,
) Goal
setup_solve_batch_env_goalset(
goal: Goal,
num_seeds: int | None = None,
) Goal
_solve_from_solve_state(
solve_state: ReacherSolveState,
goal: Goal,
shift_steps: int = 1,
seed_traj: JointState | None = None,
) WrapResult
fn()
update_goal(
goal: Goal,
)
reset()
reset_cuda_graph()
property rollout_fn
enable_cspace_cost(
enable=True,
)
enable_pose_cost(enable=True)
get_active_js(
in_js: JointState,
)
property joint_names
update_world(
world: WorldConfig,
)
get_visual_rollouts()
property kinematics
static load_from_robot_config(
robot_cfg: str | dict | RobotConfig,
world_cfg: str | dict | WorldConfig,
base_cfg: dict | 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),
compute_metrics: bool = True,
use_cuda_graph: bool | None = None,
particle_opt_iters: int | None = None,
self_collision_check: bool = True,
collision_checker_type: CollisionCheckerType | None = CollisionCheckerType.PRIMITIVE,
use_es: bool | None = None,
es_learning_rate: float | None = 0.01,
use_cuda_graph_metrics: bool = False,
store_rollouts: bool = True,
use_cuda_graph_full_step: bool = False,
sync_cuda_time: bool = True,
collision_cache: Dict[str, int] | None = None,
n_collision_envs: int | None = None,
collision_activation_distance: float | None = None,
world_coll_checker=None,
step_dt: float | None = None,
use_lbfgs: bool = False,
use_mppi: bool = True,
)
use_cuda_graph_full_step: bool = False
world_coll_checker: WorldCollision | None = None
property world_collision
solver: WrapMpc