The pipeline goes as follows:
1. Some calculations are performed in external Python script.
2. The resulting variables are sent from external Python script to Coppelia via sim.writeCustomTableData() command.
3. A child script is executed in Coppelia before the actual simulation starts
4. The child script is then disabled.
5. The simulation starts via API Python command sim.startSimulation()
6. Simulation takes place within Coppelia.
7. The resulting variables are sent from Coppelia to external Python script.
The actual simulation in Coppelia is sync with the Python script using the following code:
Code: Select all
sim.startSimulation()
while sim.getStringSignal(signal_tag) == 'on':
client.step()
sim.stopSimulation()
I'm trying to do something similar to the code above, having the Python script running in loop until a confirmation is received from Coppelia script that the actual child script has finished executing.
Im trying something similar to:
Code: Select all
sim.initScript(coppelia_script_handle)
while sim.getStringSignal(signal_tag) == 'on':
pass
How could I manage to resume the external Python execution once the Coppelia child script is fully executed?
I appreciate any help!