RLBench icon indicating copy to clipboard operation
RLBench copied to clipboard

BUG: assertion condition mismatching

Open AlbertTan404 opened this issue 1 year ago • 0 comments

At gripper_action_modes.py line 61, the compound inequality mismatches the assertion:

if 0.0 > action[0] > 1.0:  # which is equivalent to 0.0 > action[0] AND action[0] > 1.0
    raise InvalidActionError(
        'Gripper action expected to be within 0 and 1.')

which should be:

if 0.0 > action[0] or action[0] > 1.0:
    raise InvalidActionError(
        'Gripper action expected to be within 0 and 1.')

or

if not 1.0 > action[0] > 0.0:
    raise InvalidActionError(
        'Gripper action expected to be within 0 and 1.')

image

AlbertTan404 avatar Aug 06 '23 08:08 AlbertTan404