Open jwnimmer-tri opened 1 year ago
My proposal: the user has provided a file that is internally inconsistent. So no matter what, we need to warn somehow, since we can't obey the file as-is.
Then the question is which of the conflicting information do we obey on a best-effort basis? It seems like for URDFs in particular (typically robots, vs SDFormat which are objects + worlds), actuation is the common case so we should err on that side.
If the user wanted unactuated but happened to have a non-zero effort on paper, setting effort=0 or omitting //joint/limit/effort entirely is pretty easy. Adding XML for all of the transmissions and motors and such is a lot of work on the flip side.
The joints in a typical URDF (e.g., panda arm) will have stanzas something like this:
When drake's Parser loads this file, it create a
multibody::Joint
from the<joint>
element and amultibody::JointActuator
from the<actuator>
element.In case the joint is unactuated (e.g., acrobot shoulder), the URDF looks like this:
The file has no effort limit nor actuator.
The ambiguity arises when the URDF specifies a non-zero effort limit
<limit effort="...">
but then does not define any transmission (nor actuator). For example, this joint from the spot model has no transmission elements defined at all:What should Drake do in this case?
At the moment, we neither warn nor add an actuator.
For reference, when parsing SDFormat the zero vs non-zero effort limit is the condition we use to govern whether or not to add actuation.