robomimic icon indicating copy to clipboard operation
robomimic copied to clipboard

wrong rendering

Open Howuhh opened this issue 3 years ago • 4 comments

Hi! I want to visualize my agent's rollouts. However, the resulting videos turns out to be strange, I see some color artifacts. Should it be like this?

What I do:

# on each step
render_frames.append(env.render(mode="rgb_array", width=256, height=256))

# at the end
imageio.mimsave(render_path, render_frames, fps=32)

Result: Screenshot-from-2022-02-21-16-11-13

Howuhh avatar Feb 21 '22 13:02 Howuhh

Hi @Howuhh ,

Thanks for bringing up this issue. Are you using any custom logic beforehand (e.g.: wrappers)? The color artifacts you see are actually the collision meshes for those objects, which should be hidden by default.

cremebrule avatar Feb 22 '22 19:02 cremebrule

I have gym.ObservationWrapper which only concats state dim's in one vector (names are in obs_dict below), other methods are not overloaded.

That's how I create env:

def create_env(hdf5_path="data/lift/ph/low_dim.hdf5", render=False):
    obs_dict = {
        "low_dim": [
            "robot0_eef_pos",
            "robot0_eef_quat",
            "robot0_gripper_qpos",
            "object"
        ]
    }
    initialize_obs_modality_mapping_from_dict(obs_dict)

    env_meta = get_env_metadata_from_dataset(hdf5_path)
    env = create_env_from_metadata(
        env_meta=env_meta,
        render=render,
        render_offscreen=False,
        use_image_obs=False
    )
    return env

Howuhh avatar Feb 22 '22 19:02 Howuhh

Can you make sure render_collision_mesh is set to False when you're creating the environment? You can check by simply calling env.render_collision_mesh. (this is a kwarg passed into all environment constructors)

cremebrule avatar Feb 22 '22 19:02 cremebrule

Yes, it is definitely set to False, I even make an assert on that.

Howuhh avatar Feb 23 '22 12:02 Howuhh

Closing this issue as it appears to be stale, and also more related to robosuite. Feel free to raise an issue there if problems persist.

amandlek avatar Jul 04 '23 01:07 amandlek