Open mklingen opened 8 years ago
To be clear, the problem is that not that continuous joints do not wrap [-pi, +pi]
- they should not.
The core issue is that urdfdom
sets the default upper and lower position limits to [0, 0]
, regardless of the joint type. The position limits should always be set to [-inf, +inf]
for continuous
joints. Fixing this should be as simple as overwriting the position limits in DartLoader
for that joint type.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
At this line:
https://github.com/dartsim/dart/blob/e8b4f1c40e26140d93ea803bcb4a76547ebe05fb/dart/utils/urdf/DartLoader.cpp#L340
CONTINUOUS
andREVOLUTE
joints are treated exactly the same. This is wrong, because in the URDF, continuous joints do not have limits.This merge was intended to allow for continuous joints:
https://github.com/dartsim/dart/pull/441
But the
DartLoader
was not updated to reflect these changes. Note that in the URDF, the upper and lower limits have nothing to do with whether a joint is continuous. Only the joint type reflects this. In fact, if a joint has no limits, the URDF parser sets them to zero by default (see this file): https://github.com/ros/urdfdom/blob/master/urdf_parser/src/joint.cpp#L108So relying on limits being infinity or not existing is just not going to work when parsing the urdf to determine if the joint is continuous.