Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix joint limits for all supported variants #513

Conversation

gavanderhoorn
Copy link
Member

@gavanderhoorn gavanderhoorn commented Jun 16, 2020

I'm somewhat confused as to where the previous values for the limits came from, as there seemed to be quite some deviations from the specs (except for the UR16e, but that was only added very recently).

First commit fixes the limits (position, velocity and effort) based on the specs in the linked documents (user manuals and the support site article).

Second commit changes the _macro.xacro to accept joint limit data in degrees and degrees/sec (instead of radians). This makes it much easier to compare the limits in the files with the ones on the datasheets and the manuals.

Table used for joint torque limits (from here, but with torques instead of motor sizes):

Joint     UR3/UR3e     UR5/UR5e      UR10/UR10e    UR16e
Base      56 Nm (Sz2)  150 Nm (Sz3)  330 Nm (Sz4)  330 Nm (Sz4)
Shoulder  56 Nm (Sz2)  150 Nm (Sz3)  330 Nm (Sz4)  330 Nm (Sz4)
Elbow     28 Nm (Sz1)  150 Nm (Sz3)  150 Nm (Sz3)  150 Nm (Sz3)
Wrist 1   12 Nm (Sz0)   28 Nm (Sz1)   56 Nm (Sz2)   56 Nm (Sz2)
Wrist 2   12 Nm (Sz0)   28 Nm (Sz1)   56 Nm (Sz2)   56 Nm (Sz2)
Wrist 3   12 Nm (Sz0)   28 Nm (Sz1)   56 Nm (Sz2)   56 Nm (Sz2)

@gavanderhoorn gavanderhoorn added this to the melodic-devel-staging milestone Jun 16, 2020
@gavanderhoorn
Copy link
Member Author

gavanderhoorn commented Jun 16, 2020

I'm somewhat confused as to where the previous values for the limits came from, as there seemed to be quite some deviations from the specs

Because of this I'll look at the history of the various .xacros and see whether there were any specific reasons for why the limits were so different from the (edit) current specs.

@gavanderhoorn
Copy link
Member Author

gavanderhoorn commented Jun 17, 2020

For the UR10 specifically, the incorrect joint limits (mostly velocity) were introduced in 78b2702.

Then changed again (to correct ones I believe) in 953d046.

And then changed a few times more. At least for the UR10, it's a bit unclear where 2.16 (rad/s) comes from in 78b2702. 120 deg is 2.09 rad. A lower value than this could've made sense, but a higher value I don't understand.


Edit: ah. urcontrol.conf from a v1.5.x version of ursim specs the first joint of a UR10 as a joint_size4_rev1.conf. That file states:

[Joint]
min_limit = -6.2831853071795862
max_limit = 6.2831853071795862
v_max = 2.16 # 2.16 = 2/3 * 3.2
a_max = 60.0 # Guess
torque_max = 330

So v_max is 2.16 here. That's probably where the 2.16 in 78b2702 comes from.

Note also the a_max there :) Something which isn't documented any more (and probably incorrect for newer systems as well).

v1.8.x of ursim has the same data:

[Joint]
min_limit = -6.2831853071795862
max_limit = 6.2831853071795862
v_max = 2.16 # 2.16 = 2/3 * 3.2
a_max = 60.0 
torque_max = 330

Current manuals and datasheets spec this limit as 120 degree/sec though, which is 2.09 rad/s, lower than this 2.16.

In the worst case, the maximum joint velocity planned with for a UR10 would be approx 3% slower than what the robot is capable of (although the 3.2 there is probably the actual maximum joint velocity).

@gavanderhoorn
Copy link
Member Author

I'm in doubt whether or not to keep 56fab86: while it's convenient to be able to directly compare the limits, it's also using non-standard units which goes against REP-103.

I'd like some additional input from others: @miguelprada @ipa-nhg @fmauch: thoughts?

@fmauch
Copy link
Contributor

fmauch commented Jun 17, 2020

I'm in doubt whether or not to keep 56fab86: while it's convenient to be able to directly compare the limits, it's also using non-standard units which goes against REP-103.

I'd like some additional input from others: @miguelprada @ipa-nhg @fmauch: thoughts?

I think, going with radians (and maybe as a comment the according deg values) might be a good choice. As most of them are PI or 2PI, it is still quite easy to compare to the specs.

@gavanderhoorn
Copy link
Member Author

True, but limiting them (artificially) is easier when it's in degrees and degrees/sec.

Using degrees will make re-using the limits files for MoveIt and ros_control essentially impossible though.

@gavanderhoorn
Copy link
Member Author

I'm going to remove 56fab86.

Radians is what it should be, and it allows reuse of the joint limits file for other packages/nodes.

If only xacro supported something like subst_value as roslaunch does.

@gavanderhoorn
Copy link
Member Author

I've checked and double-checked the limits for all variants and joints. I believe they are now correct.

If it turns out something is still not right, we'll fix that in a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants