PyRep icon indicating copy to clipboard operation
PyRep copied to clipboard

[BUG] The use of joint intervals in Gripper class is incorrect

Open CSCSX opened this issue 1 year ago • 0 comments

Description of the bug

The specification of joint intervals

The related codes are in line 151~162 of https://github.com/stepjam/PyRep/blob/master/pyrep/objects/joint.py, where it specifies interval[0] is the joint minimum allowed value, interval[1] is the joint range (the maximum allowed value is interval[0]+interval[1].

The incorrect use of joint intervals

The related codes are in line 102 of https://github.com/stepjam/PyRep/blob/master/pyrep/robots/end_effectors/gripper.py, where it goes like joint_range = joint_intervals[:, 1] - joint_intervals[:, 0], appearing to treat joint_intervals[1] as the maximum allowed value instead of the joint range.

My suggestions on improvement

  1. Change the code of 102 of https://github.com/stepjam/PyRep/blob/master/pyrep/robots/end_effectors/gripper.py to joint_rage = joint_intervals[:, 1].
  2. Check similar incorrect use of joint intervals and then fix them.

CSCSX avatar Aug 16 '24 12:08 CSCSX