Reference/API

Humanoid retargeter API

The humanoid retargeter maps a BodyFrame to a floating-base humanoid pose. See Humanoid retargeting for usage.

retargetingkit.retargeting.humanoid.online.HumanoidRetargeterConfig(
preset: Annotated[HumanoidRetargeterOnlineConfig, OPAQUE, tyro.conf.Suppress],
z_offset: float = 0.0
)
Bases: RetargeterConfig[BodyFrame, BasePoseQPosCommand]

One robokit humanoid preset plus output adjustment.

python
>>> HumanoidRetargeterConfig(HumanoidRetargeterOnlineConfig()).z_offset
0.0
Parameters
presetAnnotated[HumanoidRetargeterOnlineConfig, OPAQUE, tyro.conf.Suppress]required
z_offsetfloat= 0.0
Members
attribute[source]
HumanoidRetargeterConfig.preset: Annotated[HumanoidRetargeterOnlineConfig, OPAQUE, tyro.conf.Suppress]
attribute[source]
HumanoidRetargeterConfig.z_offset: float = 0.0
method[source]
HumanoidRetargeterConfig.build(
device: str
) -> HumanoidRetargeter

Build and warm up the online retargeter.

python
>>> HumanoidRetargeterConfig(g1_aligned).build("cpu")  # doctest: +SKIP
Parameters
devicestrrequired
Returns
HumanoidRetargeter
retargetingkit.retargeting.humanoid.online.HumanoidRetargeter(
config: HumanoidRetargeterConfig,
device: str
)
Bases: Retargeter[BodyFrame, BasePoseQPosCommand]

Named human body transforms to a floating-base robot command.

python
>>> HumanoidRetargeter(config, "cpu")  # doctest: +SKIP
Parameters
configHumanoidRetargeterConfigrequired
devicestrrequired
Members
method[source]
HumanoidRetargeter.solve(
frame: BodyFrame
) -> BasePoseQPosCommand
Parameters
frameBodyFramerequired
Returns
BasePoseQPosCommand
method[source]
HumanoidRetargeter.reset() -> None

Reset the solver.

python
>>> retargeter.reset()  # doctest: +SKIP
Returns
None