-
Notifications
You must be signed in to change notification settings - Fork 413
updated to urdf parser from xmldom (rqt_joint_trajectory_controller) #1982
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
base: master
Are you sure you want to change the base?
Conversation
| root = ET.fromstring(description) | ||
| for rc in root.findall("ros2_control"): | ||
| root.remove(rc) | ||
|
|
||
| cleaned_description = ET.tostring(root, encoding="unicode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you comment on why we need to remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i tested with ros2_control_demos , i got these unknown tags
ros2 run rqt_gui rqt_gui --force-discover -s rqt_joint_trajectory_controller
Waiting for the robot_description!
Waiting for the robot_description!
Waiting for the robot_description!
Unknown tag "ros2_control" in /robot[@name='2dof_robot']
also while testing with some robot descriptions with inertial tags as well
Unknown attribute "iyx" in /robot[@name='ur5e']/link[@name='robotiq_85_base_link']/inertial/inertia
Unknown attribute "izx" in /robot[@name='ur5e']/link[@name='robotiq_85_base_link']/inertial/inertia
Unknown attribute "izy" in /robot[@name='ur5e']/link[@name='robotiq_85_base_link']/inertial/inertia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok it seems that the parser is very strict with that. iyx/izx/izy does not exist in the spec, this really is an issue in the URDF.
Unless there isn't a possibility to switch to a robust mode in the urdf module, your fix seems to be fine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will check if there is a possibility of the robust mode, and also write the test case as you mentioned
| # TODO: Use urdf_parser_py.urdf instead. I gave it a try, but got | ||
| # Exception: Required attribute not set in XML: upper | ||
| # upper is an optional attribute, so I don't understand what's going on | ||
| # See comments in https://github.com/ros/urdfdom/issues/36 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if fixed, please remove L21-24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some comments.
Apart from that, I think we easily could write a unit test for this class. At least some sort of smoke test with a valid robot_description from the assets we have.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1982 +/- ##
==========================================
+ Coverage 85.11% 85.17% +0.06%
==========================================
Files 143 143
Lines 13740 13730 -10
Branches 1201 1200 -1
==========================================
Hits 11695 11695
+ Misses 1638 1628 -10
Partials 407 407
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Update joint-limits parsing to use urdf_parser_py