def step(self, action):
    if self.demo:
        if (self.curr_path_length <= 20):
            action = [0, 1, (- 1), (- 1)]
        elif (self.curr_path_length <= 40):
            action = [0, 1, 1, 1]
        elif (self.curr_path_length <= 70):
            action = [0, 0.9, (- 0.25), 1]
        elif (self.curr_path_length <= 100):
            action = [0, (- 1), 1, (- 1)]
        noise = ((5 * 0.1) * np.random.uniform((- 1), 1, size=3))
        noise_4d = np.concatenate([noise, [0]])
        action = (np.array(action) + noise_4d)
    self.set_xyz_action(action[:3])
    self.do_simulation([action[(- 1)], (- action[(- 1)])])
    self._set_goal_marker(self._state_goal)
    ob = self._get_obs()
    (reward, reachReward, pickReward, placeReward, placingDist) = self.compute_reward(action, ob)
    self.curr_path_length += 1
    if (self.curr_path_length == self.max_path_length):
        done = True
    else:
        done = False
    return (ob, reward, done, OrderedDict({'epRew': reward, 'reachRew': reachReward, 'pickRew': pickReward, 'placeRew': placeReward, 'placingDist': placingDist}))
def step(self, action):
    if self.demo:
        if (self.curr_path_length <= 20):
            action = [0, 1, (- 1), (- 1)]
        elif (self.curr_path_length <= 40):
            action = [0, 1, 1, 1]
        elif (self.curr_path_length <= 70):
            action = [0, 0.9, (- 0.25), 1]
        elif (self.curr_path_length <= 100):
            action = [0, (- 1), 1, (- 1)]
        noise = ((5 * 0.1) * np.random.uniform((- 1), 1, size=3))
        noise_4d = np.concatenate([noise, [0]])
        action = (np.array(action) + noise_4d)
    self.set_xyz_action(action[:3])
    self.do_simulation([action[(- 1)], (- action[(- 1)])])
    self._set_goal_marker(self._state_goal)
    ob = self._get_obs()
    (reward, reachReward, pickReward, placeReward, placingDist) = self.compute_reward(action, ob)
    self.curr_path_length += 1
    if (self.curr_path_length == self.max_path_length):
        done = True
    else:
        done = False
    return (ob, reward, done, OrderedDict({'epRew': reward, 'reachRew': reachReward, 'pickRew': pickReward, 'placeRew': placeReward, 'placingDist': placingDist}))