The current map managers loads the topological map file using the PyYaml safe load option directly here on manager2.py file:
Considering a map file that is exported using JSON stringily for large farms, the 'stringification' strips all the leading zeros so a pose orientation like the following :
const orientation = { x : 0.0, y : 0.0, z : 0.0, w : 1.0 }
would become:
orientation:
x : 0
y : 0
z : 0
w : 1
When the yaml file is loaded in Python, the x, y, z, w keys are treated as integer type instead of float types. This integer type fails an assertion in geometry_msgs/Point and geometry_msgs/Vector3:
The behaviour is reproducible if any of the nodes' pose or map global transformation is set without leading zeroes.
Solution:
PyYaml allows to extend the behaviour of SafeLoad by extending the class and passing it as a Loader argument. Within that extension, one can change the 'x', 'y', 'z', and 'w' keys to float type. Something like the first response here.
Description
Problem:
The current map managers loads the topological map file using the PyYaml safe load option directly here on manager2.py file:
Considering a map file that is exported using JSON stringily for large farms, the 'stringification' strips all the leading zeros so a pose orientation like the following :
would become:
When the yaml file is loaded in Python, the x, y, z, w keys are treated as integer type instead of float types. This integer type fails an assertion in geometry_msgs/Point and geometry_msgs/Vector3:
The behaviour is reproducible if any of the nodes' pose or map global transformation is set without leading zeroes.
Solution:
PyYaml allows to extend the behaviour of SafeLoad by extending the class and passing it as a Loader argument. Within that extension, one can change the 'x', 'y', 'z', and 'w' keys to float type. Something like the first response here.
Additional Information
No response