Open fmessmer opened 3 years ago
It looks like its breaking on this plugin xml
On the one hand, roscompile
should accept the same XML that pluginlib
can parse.
On the other hand, to me that looks like invalid XML since there is not a <class_libraries>
tag surrounding all three libraries.
I will look into what pluginlib
is doing, and will see if I can add a rule to fix it.
here is another plugin.xml that roscompile
has issues with:
<class_libraries>
<library path="lib/liboutlier_scan_filters">
<class name="outlier_scan_filters/ClusterScanFilter" type="outlier_scan_filters::ClusterScanFilter"
base_class_type="filters::FilterBase<sensor_msgs::LaserScan>">
<description>
Cluster filters outliers based on cluster building.
</description>
</class>
<class name="outlier_scan_filters/NeighbourScanFilter" type="outlier_scan_filters::NeighbourScanFilter"
base_class_type="filters::FilterBase<sensor_msgs::LaserScan>">
<description>
Neighbour filters out outliers based on the distance from a points left and right neighbour.
</description>
</class>
</library>
</class_libraries>
results in the following error:
rosrun roscompile noetic_migration -m
ERROR: Trouble parsing package @ ./outlier_scan_filters
Traceback (most recent call last):
File "/home/fxm/projects/default/care-o-bot/src/roscompile/ros_introspection/src/ros_introspection/util.py", line 17, in get_packages
packages.append(Package(root))
File "/home/fxm/projects/default/care-o-bot/src/roscompile/ros_introspection/src/ros_introspection/package.py", line 31, in __init__
self.plugin_configs.append(PluginXML(rel_fn, file_path))
File "/home/fxm/projects/default/care-o-bot/src/roscompile/ros_introspection/src/ros_introspection/plugin_xml.py", line 18, in __init__
self.read()
File "/home/fxm/projects/default/care-o-bot/src/roscompile/ros_introspection/src/ros_introspection/plugin_xml.py", line 21, in read
tree = parse(self.file_path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: not well-formed (invalid token): line 4, column 4
That's another fun one. XMLLint tells me Unescaped '<' not allowed in attributes values
, which makes sense, but also works with pluginlib apparently.
I have been using both
noetic_migration
andupgrade_manifest
scripts I did not really look into the code to figure out what the problem is, but I wanted to report this herewhenever there is a
plugin.xml
file in the repository, I get errors similar to the following:what I did to work around this is: