Beispiel #1
0
 def reload_positions(self):
     """
     Reloads the initial/target positions and images.
     This is called after the target number of actuator type have changed.
     """
     self._initial_position = load_pose_from_npz(self._target_filename,
                                                 self._actuator_name,
                                                 str(self._target_number),
                                                 'initial')
     self._target_position = load_pose_from_npz(self._target_filename,
                                                self._actuator_name,
                                                str(self._target_number),
                                                'target')
     self._initial_image = load_data_from_npz(self._target_filename,
                                              self._actuator_name,
                                              str(self._target_number),
                                              'initial',
                                              'image',
                                              default=None)
     self._target_image = load_data_from_npz(self._target_filename,
                                             self._actuator_name,
                                             str(self._target_number),
                                             'target',
                                             'image',
                                             default=None)
Beispiel #2
0
 def set_image_overlays(self, condition):
     """
     Sets up the image visualizer with what images to overlay if
     "overlay_initial_image" or "overlay_target_image" is pressed.
     """
     if not config['image_on'] or not self._target_filename:
         return
     initial_image = load_data_from_npz(self._target_filename,
             config['image_overlay_actuator'], str(condition),
             'initial', 'image', default=None)
     target_image  = load_data_from_npz(self._target_filename,
         config['image_overlay_actuator'], str(condition),
             'target',  'image', default=None)
     self._image_visualizer.set_initial_image(initial_image,
             alpha=config['image_overlay_alpha'])
     self._image_visualizer.set_target_image(target_image,
             alpha=config['image_overlay_alpha'])
Beispiel #3
0
 def set_image_overlays(self, condition):
     """
     Sets up the image visualizer with what images to overlay if
     "overlay_initial_image" or "overlay_target_image" is pressed.
     """
     if not config['image_on'] or not self._target_filename:
         return
     initial_image = load_data_from_npz(self._target_filename,
             config['image_overlay_actuator'], str(condition),
             'initial', 'image', default=None)
     target_image  = load_data_from_npz(self._target_filename,
         config['image_overlay_actuator'], str(condition),
             'target',  'image', default=None)
     self._image_visualizer.set_initial_image(initial_image,
             alpha=config['image_overlay_alpha'])
     self._image_visualizer.set_target_image(target_image,
             alpha=config['image_overlay_alpha'])