Exemplo n.º 1
0
def car():
    return SpaceDict({
        "sensors":
        SpaceDict({
            "position":
            spaces.Box(low=-100, high=100, shape=(3, )),
            "velocity":
            spaces.Box(low=-1, high=1, shape=(3, )),
            "front_cam":
            spaces.Tuple((
                spaces.Box(low=0, high=1, shape=(10, 10, 3)),
                spaces.Box(low=0, high=1, shape=(10, 10, 3)),
            )),
            "rear_cam":
            spaces.Box(low=0, high=1, shape=(10, 10, 3)),
        }),
        "ext_controller":
        spaces.MultiDiscrete((5, 2, 2)),
        "inner_state": {
            "charge":
            spaces.Discrete(100),
            "system_checks":
            spaces.MultiBinary(10),
            "job_status":
            SpaceDict({
                "task": spaces.Discrete(5),
                "progress": spaces.Box(low=0, high=100, shape=()),
            }),
        },
    })
Exemplo n.º 2
0
 def get_observation_space():
     """Return only position and gripper_width by default"""
     observation_space = {}
     observation_space["position"] = spaces.Box(
             low=np.array([0.3, -0.85, 0]), high=np.array([0.85, 0.85, 0.8]))
     observation_space["gripper_width"] = spaces.Box(low=0.03, high=0.11, shape=(1,))
     return SpaceDict(observation_space)
 def state_space(self):
     return SpaceDict({
         "joint_position":
         spaces.Box(low=0,
                    high=1,
                    shape=(AllegroHand.num_dof, ),
                    dtype=np.float32)
     })
 def action_space(self):
     return SpaceDict({
         "joint_torque":
         spaces.Box(low=0,
                    high=1,
                    shape=(AllegroHand.num_dof, ),
                    dtype=np.float32)
     })
 def get_gmm_update_parameter_space(self):
     parameter_space = {}
     parameter_space["mu"] = spaces.Box(low=-0.001,
                                        high=0.001,
                                        shape=self.mu.shape)
     parameter_space["priors"] = spaces.Box(low=-0.1,
                                            high=0.1,
                                            shape=self.priors.shape)
     #parameter_space["sigma"] = spaces.Box(low=-0.001, high=0.001, shape=self.mu.shape)
     return SpaceDict(parameter_space)
Exemplo n.º 6
0
 def get_observation_space(self):
     observation_space = {}
     observation_space["position"] = spaces.Box(
             low=np.array([0.3, -0.85, 0]), high=np.array([0.85, 0.85, 0.8]))
     if self.with_gripper_width:
         observation_space["gripper_width"] = spaces.Box(low=0.03, high=0.11, shape=(1,))
     if self.with_tactile_sensor:
         t_width, t_height = self.env.cfg.tacto.width, self.env.cfg.tacto.height
         observation_space["tactile_sensor"] = spaces.Tuple(
             tuple([spaces.Box(low=-np.ones((t_height,t_width)), high=np.ones((t_height, t_width)))
                    for _ in range(2)]))
     if self.with_force:
         observation_space["force"] = spaces.Box(
             low=np.array([0, 0]), high=np.array([2.0, 2.0]))
     return SpaceDict(observation_space)
Exemplo n.º 7
0
 def state_space(self):
     return SpaceDict({
         "end_effector": {
             "position":
             spaces.Box(
                 low=np.array([0.3, -0.85, 0]),
                 high=np.array([0.85, 0.85, 0.8]),
                 shape=(3, ),
                 dtype=np.float32,
             ),
             "orientation":
             spaces.Box(low=-np.pi,
                        high=np.pi,
                        shape=(4, ),
                        dtype=np.float32),
         },
         "gripper_width":
         spaces.Box(low=0.03, high=0.11, shape=(1, ), dtype=np.float32),
     })
 def state_space(self):
     return SpaceDict({
         "position":
         spaces.Box(low=0, high=1, shape=(), dtype=np.float32)
     })
 def action_space(self):
     return SpaceDict(
         {"force": spaces.Box(low=0, high=1, shape=(), dtype=np.float32)})
 def state_space(self):
     return SpaceDict({
         "image":
         spaces.Box(low=0, high=255, shape=(3, 4), dtype=np.uint8)
     })