def __init__(self, env, name, geom):
    assert (env is not None)
    self.name = name
    self._env = env
    self._geom = geom
    if ((env.GetKinBody(name) == None) and (env.GetRobot(name) == None)):
        if isinstance(geom, Robot):
            self._add_robot(geom)
        elif isinstance(geom, Item):
            self._add_item(geom)
        else:
            raise OpenRAVEException(('Geometry not supported for %s for OpenRAVEBody' % geom))
    elif (env.GetKinBody(name) != None):
        self.env_body = env.GetKinBody(name)
    else:
        self.env_body = env.GetRobot(name)
    self.set_transparency(0.5)
def __init__(self, env, name, geom):
    assert (env is not None)
    self.name = name
    self._env = env
    self._geom = geom
    if ((env.GetKinBody(name) == None) and (env.GetRobot(name) == None)):
        if isinstance(geom, Robot):
            self._add_robot(geom)
        elif isinstance(geom, Item):
            self._add_item(geom)
        else:
            raise OpenRAVEException(('Geometry not supported for %s for OpenRAVEBody' % geom))
    elif (env.GetKinBody(name) != None):
        self.env_body = env.GetKinBody(name)
    else:
        self.env_body = env.GetRobot(name)
    self.set_transparency(0.5)