stepjam / RLBench

A large-scale benchmark and learning environment.
https://sites.google.com/corp/view/rlbench
Other
1.03k stars 218 forks source link

Question: How to set the table texture (domain randomization) #191

Closed wpumacay closed 11 months ago

wpumacay commented 11 months ago

Hello. I've been trying to test the domain randomization module from domain_randomization.py and domain_randomization_scene.py, but so far I'm not able to point to the right images directory that contains the required textures. I'm trying to set the texture of the table the arm sits on to a random texture, so I was trying using the modules from sim2real to no avail. I've tried using the textures from the test folder, but it keeps crashing on me.

It'd be great if you could help me get the domain randomization module running, or even better, how to set the texture of the table (as this is a compound shape, I'm not sure how you set a texture in this case)

wpumacay commented 11 months ago

I checked the domain_randomization module and noticed how you handle compound shapes. I've got the table texture changing in my experiments :smile:. In case anyone need this as well, here is the snippet I mentioned.

    try:
        obj.set_texture(texture, **TEX_KWARGS)
    except RuntimeError:
        ungrouped = obj.ungroup()
        for o in ungrouped:
            o.set_texture(texture, **TEX_KWARGS)
        self.pyrep.group_objects(ungrouped)