Open EricCousineau-TRI opened 3 years ago
Now that cmdPrint is sprouting even more arguments, this issue has become even more acute.
extern "C" int cmdPrint(const char* _path, int _inDegrees, int _snapToDegrees,
float _snapTolerance, int _preserveIncludes,
int _outPrecision);
Good point! Alternative to exposing in header file is to simplify CLI interface (if possible), stripping need for Ruby.
At present (f94626a889),
libsdformat
only exposes these functions inign.hh
: https://github.com/osrf/sdformat/blob/f94626a8898b0a2898ae65892d76fd1031456133/src/ign.hh#L30-L37However,
ign.cc
defines more (cmdDescribe
,cmdPrint
): https://github.com/osrf/sdformat/blob/f94626a8898b0a2898ae65892d76fd1031456133/src/ign.ccThese are consumed by the intermediate Ruby script: https://github.com/osrf/sdformat/blob/f94626a8898b0a2898ae65892d76fd1031456133/src/cmd/cmdsdformat.rb.in#L150-L158
It would be nice if these were exposed via the header file.
In https://github.com/robotlocomotion/drake/pull/13767, I want to use the
check
andprint
functionality to lint and convert models.(I'm OK-ish with it being an unstable private API, but if it's there, would be nice to have it be consistent?)