Giter Club home page Giter Club logo

Comments (10)

stepjam avatar stepjam commented on August 15, 2024

Hi,
You are trying to fetch dems that do not exist. 'Saved' demos will be made available soon.
Instead of:

demos = task.get_demos(2)  # -> List[List[Observation]]

do:

demos = task.get_demos(2, live_demos=True)  # -> List[List[Observation]]

This is similar to what is happening in the imitation learning example.

from rlbench.

mtbthebest avatar mtbthebest commented on August 15, 2024

I actually did that. I used live demos but as you mentionned in the following line
demos = task.get_demos(2, live_demos=True) # -> List[List[Observation]]
I just had a list of observations only, there are not velocities. In imitation learning I need the velocities for training. How to extract them from the demos because I read your code there are no mention of them?

from rlbench.

raghada avatar raghada commented on August 15, 2024

I'm having the same issue. Did you solve it?

from rlbench.

adamconkey avatar adamconkey commented on August 15, 2024

The Observation class stores all of the data modalities as instance attributes, so you should be able to just do obs.joint_velocities where obs is one observation from your list of observations. In my data collection pipeline I've been doing something like this:

RLBENCH_MODALITIES = ['joint_positions', 'joint_velocities', 'joint_forces',
                      'gripper_open', 'gripper_pose', 'gripper_joint_positions', 'gripper_touch_forces',
                      'left_shoulder_rgb', 'left_shoulder_depth', 'left_shoulder_mask',
                      'right_shoulder_rgb', 'right_shoulder_depth', 'right_shoulder_mask',
                      'wrist_rgb', 'wrist_depth', 'wrist_mask']
demo, = task_env.get_demos(1, live_demos=True)
demo_data = {[] for modality in RLBENCH_MODALITIES}
for obs in demo:
    for attr in RLBENCH_MODALITIES:
        modality_data = np.expand_dims(getattr(obs, attr), 0)
        demo_data[attr].append(modality_data)

This just builds up a dictionary of the data which I can then easily convert to numpy arrays and save to an HDF5 file.

from rlbench.

raghada avatar raghada commented on August 15, 2024

Thanks for your input, the problem is that calling obs.joint_velocities returns None

from rlbench.

raghada avatar raghada commented on August 15, 2024

For Imitation Learning example

from rlbench.

adamconkey avatar adamconkey commented on August 15, 2024

Are all of the other data attributes populated? That is, is the problem specific to only joint velocities, or are there other modalities that are also None?

from rlbench.

raghada avatar raghada commented on August 15, 2024

Only images are not, everything else is.

from rlbench.

raghada avatar raghada commented on August 15, 2024

Ok I think I found the issue, in line 22 we are setting everything to false which includes the velocities.

So the solution is to enable them after this line, e.g. obs_config.joint_velocites = True

from rlbench.

stepjam avatar stepjam commented on August 15, 2024

Hi,

Yes the example was disabling velocity observations. I'll change it such that all the examples in V1.0.6 will have all observations on :)

from rlbench.

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.