Git Product home page Git Product logo

Comments (4)

xuanlinli17 avatar xuanlinli17 commented on July 21, 2024

The two code snippets seem like different environments. Looks like your {env_id} is not OpenCabinetDrawer-v1. Note that OpenCabinetDrawer-v1 doesn't support pd_ee_delta_pose (since the environment has a mobile base, you should use base_pd_joint_vel_arm_pd_joint_vel as the controller, which is also the controller in demonstrations).

from maniskill.

skylar93 avatar skylar93 commented on July 21, 2024

Hi,

Thanks for your reply. I'm trying to match the environment up right now.

env_id = "OpenCabinetDrawer-v1"

!python -m mani_skill2.utils.download_asset partnet_mobility_cabinet

# download the raw dataset
!python -m mani_skill2.utils.download_demo {env_id} -o demos 

# Directly download the converted demonstrations dataset files
!gdown "https://drive.google.com/drive/folders/1oNLgMVkByoHMv6mio-KxTkd7DrE6amKZ?usp=share_link" --folder -O "demos/rigid_body/{env_id}"

Retrieving folder list
Processing file 1QkkKDKfoJgu2Mv02687vFMEsGiJRkgx3 trajectory.h5
Processing file 1LfZPUN88izYPl7sjd6KK7FZSQnE8zleo trajectory.json
Processing file 1zrO6YDCOym8XfJbsg43H6VXkwqNpF9_Z trajectory.rgbd.pd_ee_delta_pose.h5
Processing file 1nInnP1uw9dyUuKdCwl_mtzAnnlbEoyso trajectory.rgbd.pd_ee_delta_pose.json
Processing file 1RSvvATA1UtPfA6lMJvdBXS4UY2Nn10-v trajectory.state.pd_ee_delta_pose.h5
Processing file 1kUxQfGp-gycODCxRnV6uulpnyxmIYHdJ trajectory.state.pd_ee_delta_pose.json

As you suggested, I used the trajectory.h5 file because everything else had the pd_ee_delta_pose on it.

# convert the dataset to include state observations.
!python -m mani_skill2.trajectory.replay_trajectory --traj-path \
    demos/rigid_body/{env_id}/trajectory.h5 --save-traj \
    --obs-mode state --target-control-mode pd_joint_vel --num-procs 10
dataset = ManiSkill2Dataset(f"demos/rigid_body/{env_id}/trajectory.state.pd_joint_vel.h5")
dataloader = DataLoader(dataset, batch_size=256, num_workers=0, pin_memory=True, drop_last=True, shuffle=True)
obs, action = dataset[0]
Observation: torch.Size([42])
Action: torch.Size([8])

I get 42 and 8. For the env.reset() however, I get:

obs_mode = "state"
control_mode = "base_pd_joint_vel_arm_pd_joint_vel"
env = gym.make("OpenCabinetDrawer-v1", obs_mode=obs_mode, control_mode=control_mode)
obs = env.reset()
obs.shape (75, )

When I look into the document,

    if args.env_id in MS1_ENV_IDS:
        if args.control_mode is not None and not args.control_mode.startswith("base"):
            args.control_mode = "base_pd_joint_vel_arm_" + args.control_mode

this suggests putting the pd_joint_vel is sufficient to make the control_mode to "base_pd_joint_vel_arm_pd_joint_vel". Is there anything wrong in the order of the codes or how I should format them?

from maniskill.

xuanlinli17 avatar xuanlinli17 commented on July 21, 2024

https://drive.google.com/drive/folders/1oNLgMVkByoHMv6mio-KxTkd7DrE6amKZ

This google drive folder corresponds to LiftCube-v0, not OpenCabinetDrawer-v1.

from maniskill.

xuanlinli17 avatar xuanlinli17 commented on July 21, 2024

You can see the list of files here: https://drive.google.com/drive/u/1/folders/1pd9Njg2sOR1VSSmp-c1mT7zCgJEnF8r7

from maniskill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.