ToolSolver#

The ToolSolver handles kinematic tools and end-effectors that drive other entities through one-way coupling into the soft solvers (MPM, FEM, PBD, SPH). A ToolEntity carries no internal dynamics and comes from a single mesh. It is a temporary workaround for differentiable rigid-soft interaction and will be removed once the RigidSolver supports differentiability directly.

Options#

class genesis.options.solvers.ToolOptions(*, dt: float | None = None, floor_height: float | None = None) None[source]#

Options configuring the ToolSolver.

Note

ToolEntity is a simplified form of RigidEntity. It supports one way tool->other coupling, but has no internal dynamics and can only be created from a single mesh. This is a temporal workaround for differentiable rigid-soft interaction. This solver will be removed once differentiable mode is supported by the RigidSolver.

Parameters:

floor_height (float, optional) – Height of the floor in meters. Defaults to 0.0.

ToolSolver#

class genesis.engine.solvers.tool_solver.ToolSolver(scene, sim, options)[source]#

Bases: TimeBasedMixin, Solver

Note

!! This class will be removed once we added differntiability to the RigidSolver. This is just a temporary solution to obtain rigid->soft one-way differeitable coupling.

material_cls#

alias of Tool

build()[source]#
property is_active#
setup_boundary()[source]#
add_entity(idx, material, morph, surface, visualize_contact=False, name: str | None = None, desc=None) ToolEntity[source]#
reset_grad()[source]#
get_state(f)[source]#
set_state(f, state, envs_idx=None)[source]#
process_input(in_backward=False)[source]#
process_input_grad()[source]#
substep_pre_coupling(f)[source]#
substep_pre_coupling_grad(f)[source]#
substep_post_coupling(f)[source]#
substep_post_coupling_grad(f)[source]#
add_grad_from_state(state)[source]#
collect_output_grads()[source]#

Collect gradients from downstream queried states.

save_ckpt(ckpt_name)[source]#
load_ckpt(ckpt_name)[source]#
pbd_collide(f, pos_world, thickness, dt)[source]#

See also#

  • Tool: the tool material and its parameters.

  • Couplers: coupling with other solvers.