(self, walker)
Checks whether a given walker is compatible with this `WalkerInfo`.
Checks whether a given walker is compatible with this `WalkerInfo`.
Checks whether a given walker is compatible with this WalkerInfo .
def check_walker_is_compatible(self, walker):
    """Checks whether a given walker is compatible with this `WalkerInfo`."""
    mocap_model = getattr(walker, 'mocap_walker_model', None)
    if mocap_model is not None and mocap_model != self._proto.model:
      model_type_name = list(mocap_pb2.Walker.Model.keys())[list(
          mocap_pb2.Walker.Model.values()).index(self._proto.model)]
      raise ValueError('Walker is not compatible with model type {!r}: got {}'
                       .format(model_type_name, walker))
def check_walker_is_compatible ( self , walker ) : mocap_model = getattr ( walker , 'mocap_walker_model' , None ) if mocap_model is not None and mocap_model != self . _proto . model : model_type_name = list ( mocap_pb2 . Walker . Model . keys ( ) ) [ list ( mocap_pb2 . Walker . Model . values ( ) ) . index ( self . _proto . model ) ] raise ValueError ( 'Walker is not compatible with model type {!r}: got {}' . format ( model_type_name , walker ) )