How to pass a list variable from external application to the script of the server?
How to pass a list variable from external application to the script of the server?
The function I use(sim.moveToConfig) can only be used in the thread script, while the parameter of this function can only be caculated by the external application. Therefore, I wonder konw that is there way to pass the result caculate by the external applicatioin to the sever so that the thread script can also use it?
Re: How to pass a list variable from external application to the script of the server?
Hello,
that is correct that sim.moveToPose can only be used from within a thread. But its elemental pendants can also be used from within non-threaded scripts: sim.moveToPose_init, sim.moveToPose_step and sim.moveToPose_cleanup.
If you need to exchange data with CoppeliaSim from an external application, you can use several means of communication with CoppeliaSim, but I would recommend the ZeroMQ remote API. From within your external application, you can call sim.callScriptFunction for that (you'll need a callable function in your script that stores thereceived data)
Cheers
that is correct that sim.moveToPose can only be used from within a thread. But its elemental pendants can also be used from within non-threaded scripts: sim.moveToPose_init, sim.moveToPose_step and sim.moveToPose_cleanup.
If you need to exchange data with CoppeliaSim from an external application, you can use several means of communication with CoppeliaSim, but I would recommend the ZeroMQ remote API. From within your external application, you can call sim.callScriptFunction for that (you'll need a callable function in your script that stores thereceived data)
Cheers
Re: How to pass a list variable from external application to the script of the server?
Thank you for your reply.
Additionally, I wanna ask that how to make sure how much joint position will chang within each step when drive joint through 'sim.moveToConfig_step' ?
Additionally, I wanna ask that how to make sure how much joint position will chang within each step when drive joint through 'sim.moveToConfig_step' ?
Re: How to pass a list variable from external application to the script of the server?
The position change is highly variable and is actually the core of the Ruckig motion library that powers the sim.moveToPose function. You probably meant to ask if there is a possibility to adjust the time step? Yes, you can do that during initialization (in sim.moveToPose_init) via the optional timeStep field.Additionally, I wanna ask that how to make sure how much joint position will chang within each step when drive joint through 'sim.moveToConfig_step' ?
Cheers