The source project of this merge request has been removed.
fix error output of lanelet_map_loader
/label bug
Fixed bug
lanelet_map_loader
does not output full error message from parser
Required information:
- Operating system and version:
- Ubuntu 16.04
- Autoware installation type:
- from source
- Autoware version or commit hash
- master
- ROS distribution and version:
- ROS Kinetic
- ROS installation type:
- from binaries
- Package or library, if applicable:
-
map_file
package
-
Description of the bug
lanelet_map_loader
shuts down without outputting full error message.
Steps to reproduce the bug
- prepare invalid lanelet map autoware_invalid_map.osm
- load the map by
roslaunch map_file lanelet2_map_loader.launch file_name:=/path/to/invalid_map.osm
Expected behavior
lanelet_map_loader
terminates after outputting all error messages as follows:
[ERROR] [1573642640.229832623]: Errors ocurred while parsing Lanelet Map:
[ERROR] [1573642640.229877002]: - Error parsing primitive -9395: Creating a regulatory element of type invalid_regulatory_element failed: No regulatory element found that implements rule invalid_regulatory_element
[ERROR] [1573642640.229901396]: - Error parsing primitive 45008: Failed to get id -9395 from map
Actual behavior
lanelet_map_loader
only outputs part of error message as follows:
[ERROR] [1573640720.247154961]: Errors ocurred while parsing Lanelet Map:
Fix applied
The bug comes from the fact that return EXIT_FAILURE
is called within the loop.
It should be called after the loop is finished.
Edited by mitsudome-r