Beispiel #1
0
def _make_walker(name, walker_id, marker_rgba):
    """Construct a BoxHead walker."""
    return BoxHead(
        name=name,
        walker_id=walker_id,
        marker_rgba=marker_rgba,
    )
Beispiel #2
0
def _make_walker(name, walker_id, marker_rgba, walker_type=WalkerType.BOXHEAD):
    """Construct a BoxHead walker."""
    if walker_type == WalkerType.BOXHEAD:
        return BoxHead(
            name=name,
            walker_id=walker_id,
            marker_rgba=marker_rgba,
        )
    if walker_type == WalkerType.ANT:
        return walkers.Ant(name=name, marker_rgba=marker_rgba)
    raise ValueError("Unrecognized walker type: %s" % walker_type)
Beispiel #3
0
def _make_walker(name, walker_id, marker_rgba, walker_type=WalkerType.BOXHEAD):
  """Construct a BoxHead walker."""
  if walker_type == WalkerType.BOXHEAD:
    return BoxHead(
        name=name,
        walker_id=walker_id,
        marker_rgba=marker_rgba,
    )
  if walker_type == WalkerType.ANT:
    return walkers.Ant(name=name, marker_rgba=marker_rgba)
  if walker_type == WalkerType.HUMANOID:
    initializer = mocap.CMUMocapInitializer()
    return Humanoid(
        name=name,
        marker_rgba=marker_rgba,
        walker_id=walker_id,
        visual=Humanoid.Visual.JERSEY,
        initializer=initializer)
  raise ValueError("Unrecognized walker type: %s" % walker_type)