Repository: stepjam/RLBench
Issue: Bug report. Items inside obs got re-arranged after using pyrep 
Root cause: Documentation Deficiency

Hi
We have been playing with the pick and lift task. We start with letting the gripper grab the block by using arm.get_path() from Pyrep with the position of the target block and quarternion of the waypoint0.
However we found out that after the first episode, the items inside the obs returned by the env got re-arranged, we wonder if using Pyrep has anything to do with the change. 
You can reproduce the issue by running the following code. 

```
import gym
import rlbench.gym
from rlbench.action_modes import ActionMode, ArmActionMode

#pyrep stuff
from pyrep.robots.end_effectors.panda_gripper import PandaGripper
from pyrep.objects.shape import Shape
from pyrep.robots.arms.panda import Panda
from pyrep.objects.dummy import Dummy
import pdb
import copy
import numpy as np

# initial value of target_quaternion points the gripper face down, ready to grab object
def initialize_arm_position(arm, env, target_position, target_quaternion=[0,1,0,0]):

    arm.set_control_loop_enabled(True)
    done = False
    try:
        path = arm.get_path(position=target_position,quaternion=target_quaternion)

        while not done:
            done = path.step()
            env.task._task.pyrep.step()
    except Exception:
        print("Unable to move arm to initialization space, defaulting to random location")
    arm.set_control_loop_enabled(False)
    close_tip_steps = 5
    for step in range(close_tip_steps):
        action = [0,0,0,0,0,0,0,0]
        env.step(np.array(action))


env = gym.make('pick_and_lift-state-v0' , render_mode="human")

training_episodes = 8
total_steps = 100
target_block = Shape('pick_and_lift_target')
waypoint0 = Dummy('waypoint0')
arm = Panda()

for e in range(training_episodes):
    obs = env.reset()
    target_tip_position = waypoint0.get_position()
    target_tip_quarternion = waypoint0.get_pose()[-4:]

    initialize_arm_position(arm, env, target_tip_position, target_tip_quarternion)
    print("----------------------------episode", e, '-------------------------')

    for step in range(total_steps):
        action = env.action_space.sample()
        action[7] = 0
        obs, reward, terminate, _ = env.step(action)

        print("obs 44-51:", obs[44:51])
        print('target block:', target_block.get_pose())
        env.render()
env.close()

```

Hi.
Thanks for sharing. I will resolve this issue in the new 1.1.0 version, which will be released soon.
RLBench gives you a simple way of selecting what low dim observations you want; see reach_target: https://github.com/stepjam/RLBench/blob/master/rlbench/tasks/reach_target.py#L46

This has only been done for 1 or two tasks, as low dim obs is not the focus of this benchmark; So a quick fix for you would be to simply override the `get_low_dim_state` for your task (e.g. like the reach_target task); remember to reinstall after updating the task .py.

the bug you are seeing is because in the event that the `get_low_dim_state` is not overridden, then it gives a scene dump of all objects, and you cant rely on the order of these being consistent.