Not necessarily. You can have defaults for your command line arguments and change only what’s needed. We use cxxopts in Chrono demos (and provide a convenience wrapper around it, ChCLI.h). Look at a demo such as demo_ROBOT_RoboSimian_SCM<https://github.com/projectchrono/chrono/blob/develop/src/demos/robot/robosimian/sequential/demo_ROBOT_RoboSimian_SCM.cpp> for an example.
--Radu From: [email protected] <[email protected]> On Behalf Of Yves Eric Maxime Robert Sent: Monday, June 20, 2022 8:14 PM To: ProjectChrono <[email protected]> Subject: [chrono] Re: Parse additional data Hello, Thank you for your answer. To clarify, if I have like 20 parameters to pass, the second solution (third-party JSON parser) would be way more practical than putting arguments, am I write? It is just to check if I understand well the first solution. Best regards, Yves Robert On Sunday, June 19, 2022 at 12:24:41 PM UTC+3 Ruochun Zhang wrote: Hi Yves, You know, I think the easiest way to achieve what you described, is to write your C++ scripts with input arguments. Other than that, maybe you can incorporate a third-party JSON parser such as RapidJSON to parse custom JSON files in your scripts, if it is necessary. Thank you, Ruochun On Sunday, June 19, 2022 at 3:15:29 AM UTC-5 [email protected] wrote: Hello, I am using Chrono::GPU and would like to make the simulation more user-friendly by not requiring the user to recompile the code every time a parameter is needed to be changed. The JSON file is very handy, but it is rather not flexible as the number and names of the parameters are fixed. Let's say that for instance, the user wants to change regularly the part the '.obj' file to be loaded by the routine, or that I want the to scale this object with a parameter named "scale", etc. How would I do that? Is there any feature allowing for it? Thank you, Yves -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/7fb7189c-a629-468a-a240-d251315e528dn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/7fb7189c-a629-468a-a240-d251315e528dn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/SA1PR06MB82260D7EA705B1F9DB92BF5CA7B09%40SA1PR06MB8226.namprd06.prod.outlook.com.
