Ensure mp_config defined for all envs, even if just using defaults.
This commit is contained in:
		
							parent
							
								
									7f95923cf4
								
							
						
					
					
						commit
						0629d1260c
					
				@ -10,6 +10,7 @@ class MPWrapper(RawInterfaceWrapper):
 | 
				
			|||||||
        'ProMP': {
 | 
					        'ProMP': {
 | 
				
			||||||
            'controller_kwargs': {
 | 
					            'controller_kwargs': {
 | 
				
			||||||
                'p_gains': 50.0,
 | 
					                'p_gains': 50.0,
 | 
				
			||||||
 | 
					                'd_gains': 1.0,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            'trajectory_generator_kwargs': {
 | 
					            'trajectory_generator_kwargs': {
 | 
				
			||||||
                'weights_scale': 0.2,
 | 
					                'weights_scale': 0.2,
 | 
				
			||||||
@ -18,6 +19,7 @@ class MPWrapper(RawInterfaceWrapper):
 | 
				
			|||||||
        'DMP': {
 | 
					        'DMP': {
 | 
				
			||||||
            'controller_kwargs': {
 | 
					            'controller_kwargs': {
 | 
				
			||||||
                'p_gains': 50.0,
 | 
					                'p_gains': 50.0,
 | 
				
			||||||
 | 
					                'd_gains': 1.0,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            'phase_generator': {
 | 
					            'phase_generator': {
 | 
				
			||||||
                'alpha_phase': 2,
 | 
					                'alpha_phase': 2,
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,12 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MPWrapper(RawInterfaceWrapper):
 | 
					class MPWrapper(RawInterfaceWrapper):
 | 
				
			||||||
 | 
					    mp_config = {
 | 
				
			||||||
 | 
					        'ProMP': {},
 | 
				
			||||||
 | 
					        'DMP': {},
 | 
				
			||||||
 | 
					        'ProDMP': {},
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def context_mask(self) -> np.ndarray:
 | 
					    def context_mask(self) -> np.ndarray:
 | 
				
			||||||
        return np.hstack([
 | 
					        return np.hstack([
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MPWrapper(RawInterfaceWrapper):
 | 
					class MPWrapper(RawInterfaceWrapper):
 | 
				
			||||||
 | 
					    mp_config = {
 | 
				
			||||||
 | 
					        'ProMP': {},
 | 
				
			||||||
 | 
					        'DMP': {},
 | 
				
			||||||
 | 
					        'ProDMP': {},
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Random x goal + random init pos
 | 
					    # Random x goal + random init pos
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MPWrapper(RawInterfaceWrapper):
 | 
					class MPWrapper(RawInterfaceWrapper):
 | 
				
			||||||
 | 
					    mp_config = {
 | 
				
			||||||
 | 
					        'ProMP': {},
 | 
				
			||||||
 | 
					        'DMP': {},
 | 
				
			||||||
 | 
					        'ProDMP': {},
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def context_mask(self):
 | 
					    def context_mask(self):
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MPWrapper(RawInterfaceWrapper):
 | 
					class MPWrapper(RawInterfaceWrapper):
 | 
				
			||||||
 | 
					    mp_config = {
 | 
				
			||||||
 | 
					        'ProMP': {},
 | 
				
			||||||
 | 
					        'DMP': {},
 | 
				
			||||||
 | 
					        'ProDMP': {},
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def context_mask(self):
 | 
					    def context_mask(self):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user