I am trying to use the writer from generateScript(…) to write a function and call it many times later on. I need the function to receive a pose as parameter. Though writer.defineFunction only accepts the function name, no parameters. plus writer.returnMethod() is unable to return a value. I know these functionalities are supported in urscript. is there anyway to do it through the writer?
The obvious workaround (which I haveny tried but I believe should work) is to use writer.appendLine or writer.appendRaw and write everything I want through there, but I was wondering if there was a better way to do it.