robosuite_task_zoo/environments/manipulation/kitchen.py
def reward(self, action=None):
        """
        Reward function for the task.

        Sparse un-normalized reward:

            - a discrete reward of 1.0 is provided if the drawer is opened

        Un-normalized summed components if using reward shaping:

            - Reaching: in [0, 0.25], proportional to the distance between drawer handle and robot arm
            - Rotating: in [0, 0.25], proportional to angle rotated by drawer handled
              - Note that this component is only relevant if the environment is using the locked drawer version

        Note that a successfully completed task (drawer opened) will return 1.0 irregardless of whether the environment
        is using sparse or shaped rewards

        Note that the final reward is normalized and scaled by reward_scale / 1.0 as
        well so that the max score is equal to reward_scale

        Args:
            action (np.array): [NOT USED]

        Returns:
            float: reward value
        """
        reward = 0.

        # sparse completion reward
        if self._check_success():
            reward = 1.0

        # Scale reward if requested
        if self.reward_scale is not None:
            reward *= self.reward_scale / 1.0

        return reward

        Reward function for the task.

        Sparse un-normalized reward:

            - a discrete reward of 1.0 is provided if the drawer is opened

        Un-normalized summed components if using reward shaping:

            - Reaching: in [0, 0.25], proportional to the distance between drawer handle and robot arm
            - Rotating: in [0, 0.25], proportional to angle rotated by drawer handled
              - Note that this component is only relevant if the environment is using the locked drawer version

        Note that a successfully completed task (drawer opened) will return 1.0 irregardless of whether the environment
        is using sparse or shaped rewards

        Note that the final reward is normalized and scaled by reward_scale / 1.0 as
        well so that the max score is equal to reward_scale

        Args:
            action (np.array): [NOT USED]

        Returns:
            float: reward value
        
Reward function for the task.
Sparse un-normalized reward.

a discrete reward of 1.0 is provided if the drawer is opened

Un-normalized summed components if using reward shaping.

in [0, 0.25], proportional to the distance between drawer handle and robot arm
Rotating: in [0, 0.25], proportional to angle rotated by drawer handled
Note that this component is only relevant if the environment is using the locked drawer version

Note that a successfully completed task (drawer opened) will return 1.0 irregardless of whether the environment
is using sparse or shaped rewards

Note that the final reward is normalized and scaled by reward_scale / 1.0 as
well so that the max score is equal to reward_scale
Reward function for the task . Sparse un - normalized reward . a discrete reward of 1 . 0 is provided if the drawer is opened Un - normalized summed components if using reward shaping . in [ 0 0 . 25 ] proportional to the distance between drawer handle and robot arm Rotating : in [ 0 0 . 25 ] proportional to angle rotated by drawer handled Note that this component is only relevant if the environment is using the locked drawer version Note that a successfully completed task ( drawer opened ) will return 1 . 0 irregardless of whether the environment is using sparse or shaped rewards Note that the final reward is normalized and scaled by reward_scale / 1 . 0 as well so that the max score is equal to reward_scale
def reward(self, action=None):
        reward = 0.
        if self._check_success():
            reward = 1.0
        if self.reward_scale is not None:
            reward *= self.reward_scale / 1.0
        return reward
def reward ( self , action = None ) : reward = 0. if self . _check_success ( ) : reward = 1.0 if self . reward_scale is not None : reward *= self . reward_scale / 1.0 return reward
Reward function for the task.
Reward function for the task .
"""
        Reward function for the task.

        Sparse un-normalized reward:

            - a discrete reward of 1.0 is provided if the drawer is opened

        Un-normalized summed components if using reward shaping:

            - Reaching: in [0, 0.25], proportional to the distance between drawer handle and robot arm
            - Rotating: in [0, 0.25], proportional to angle rotated by drawer handled
              - Note that this component is only relevant if the environment is using the locked drawer version

        Note that a successfully completed task (drawer opened) will return 1.0 irregardless of whether the environment
        is using sparse or shaped rewards

        Note that the final reward is normalized and scaled by reward_scale / 1.0 as
        well so that the max score is equal to reward_scale

        Args:
            action (np.array): [NOT USED]

        Returns:
            float: reward value
        """ # sparse completion reward # Scale reward if requested
None
float
self
action
None