Change output file of urdf_to_graphiz#144
Conversation
I don't think this is a good idea; what if the URDF is stored in However, I do agree that the current behavior isn't very nice either. Here's what I suggest here:
That way we maintain the current behavior (write to the current directory), but allow users to write it wherever they want. |
|
@clalancette Done! ;) |
b49072f to
6f0bb56
Compare
clalancette
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for iterating here. @scpeters OK to merge?
scpeters
left a comment
There was a problem hiding this comment.
looks good to me; I just have one nit about improving the deprecation console message
urdf_parser/src/urdf_to_graphiz.cpp
Outdated
| return -1; | ||
| } | ||
| if (argc != 3) { | ||
| std::cerr << "WARNING: OUTPUT not given. This type of usage is deprecated!" << std::endl; |
There was a problem hiding this comment.
nit: I think we should also print the Usage: ... string here in case people aren't sure what OUTPUT means
Thanks for approval, @clalancette and @scpeters. I added the string. |
Currently
urdf_to_graphizwrites the pdf to$ROBOT_NAME.gv/$ROBOT_NAME.pdfin the current working directory. This is problematic especially when using this in scripts, as one would either have to read the XML-file to know where this file was saved or to read the stdout ofurdf_to_graphizMoreover, it seems more handy to put the pdf in the same directory as the urdf. This way you can find it really easier later on and you don't have to move it to the urdf. Also when there might exist multiple URDFs for the same robot (same robot name) this prevents overwriting of files.
This MR saves the files right beneath the urdf by just appending
.gvor.pdfto the input path.