The plugin is supposed to read a specific file, run a plug in logic we developed and write a .csv file on disk with the results.
The same procedure works fine when running the simulator normally (and get the paths of input and output files through file dialogs), but the same pluging (with hard-coded paths in the addon) does not produce any output.
Are we missing something? Are we correctly using the cmd line mode?
Thanks in advance
is there some error output?
Also, if you add some print (which should be redirected to the console) or printToConsole, can you confirm that the add-on is executing the initialization callback, and the other relevant system callbacks?
What version of CoppeliaSim and platform are you running?
function sysCall_info()
return {autoStart=false}
end
function sysCall_init()
print("I'm executing the addon")
sim.addLog(sim.verbosity_msgs,"CHECK EXECUTION")
-- here is where we execute the plug in logic
end
function sysCall_addOnScriptSuspend()
print("Ending... (triggered by the user)")
return {cmd='cleanup'} -- end this add-on. The cleanup section will be called
end
function sysCall_cleanup()
print("Executing the clean-up section")
end
We saw that changing the autoStart to True "solve" the issue, however I think it is mostly a workaround (it executes the addOn correctly without the -b flag in the cmdLine, since it's executed when loaded).
When you manually load an add-on, then simply leave sysCall_info away. Of course if it is an add-on that also gets automatically loaded, and you want only one to automatically start (i.e. the one that was explicitely specified), then that doesn't work. The easiest workaround in that case is to have two distinct add-ons (maybe sharing some common include file).
In a future release the sysCall_info section of explicitly specified add-ons will be ignored.