Remove preprended '|' from pretty-printed strings#1114
Remove preprended '|' from pretty-printed strings#1114dirk-thomas merged 2 commits intoros:lunar-develfrom
Conversation
it's standard yaml and is used to indicate that the text following it should be interpreted as one single multi-line scalar value (from here). Not sure whether that can be removed from there, as it would probably break things that need that |
|
Why is the output interpreted as YAML? The parameter Can someone give an example for the case that removing the pipe |
|
yaml is used all over ROS. In essence, the parameter server is a large yaml dict. Exporting parameters is also done as yaml, so that the output can be loaded onto the parameter server again. The wiki page for rosparam also notes this:
This PR would seem to break that documented behaviour. |
|
The removal of the |
|
I have no idea. Pretty printing is stated to be "not yaml safe", so perhaps the |
|
I can only speculate what the pretty print was intended for when it was originally implemented. This code area hasn't been touched for many years. In case But I would argue that the output shouldn't add the two space indentation for values with newlines either. Instead the value should be printed as is. Does that sounds reasonable? If yes, please update the PR to remove the |
6f7e44f to
aaf98f9
Compare
|
I agree, the printed value should be the original without indentation. |
|
Thank you for the patch as well as the quick update. |
Calling:
rosparam get -p /robot_description > robot.urdfresults in a malformed URDF file because it contains a prepended
|in the first line.E.g.:
What is the
|used for?