hi,
I'm trying to use matlab to control vrep by zmq. When I simulation in step mode, and make breakpoint in matlab,there will be a waring in vrep.
I had try to use the example scene and code. I had use the pController.m and the scene.
When I'm running the code and set a breakpoint. The warning window will appear,
"Connectivity >> ZMQ remote API server@addOnScript: abort execution".
And there will be a warining in command line:"[CoppeliaSim:warning] Detected non-default settings (time steps and/or dyn. engine global settings)."
And some times, the coppeliasim will crash..
Addition: I'm trying to use version 4.6
ZMQAPI and MATLAB will warning when using step simulation
Re: ZMQAPI and MATLAB will warning when using step simulation
Hello,
the warnings you are seeing are normal: when blocking the ZeroMQ remote APi client, CoppeliaSim will wait until unblocked. Try setting the breakpoints outside of a communication loop, i.e. somewhere where CoppeliaSim API functions are not called.
The other warning is also normal if running with non-standard parameters (as is the case with the pControllerViaRemoteApi.ttt scene).
If there is a crash, please provide a minimalistic, self-sufficient scene that we can use to reproduce the crash, or describe precisely how we can reproduce the crash.
Cheers
the warnings you are seeing are normal: when blocking the ZeroMQ remote APi client, CoppeliaSim will wait until unblocked. Try setting the breakpoints outside of a communication loop, i.e. somewhere where CoppeliaSim API functions are not called.
The other warning is also normal if running with non-standard parameters (as is the case with the pControllerViaRemoteApi.ttt scene).
If there is a crash, please provide a minimalistic, self-sufficient scene that we can use to reproduce the crash, or describe precisely how we can reproduce the crash.
Cheers
Re: ZMQAPI and MATLAB will warning when using step simulation
Thanks for your reply.
The reason I set the breakpoint in the communication loop is because I want to observe the values of the variables at a particular simulation time step.
I have tried to use the simulation step that comes with Coppeliasim, but when I used it, I couldn't set breakpoints and observe variable values when MATLAB continued to run.
If I set the breakpoint somewhere outside of the communication loop, there is no way to pause the simulation and observe the variable values.
The reason I set the breakpoint in the communication loop is because I want to observe the values of the variables at a particular simulation time step.
I have tried to use the simulation step that comes with Coppeliasim, but when I used it, I couldn't set breakpoints and observe variable values when MATLAB continued to run.
If I set the breakpoint somewhere outside of the communication loop, there is no way to pause the simulation and observe the variable values.
Re: ZMQAPI and MATLAB will warning when using step simulation
you can step/pause the simulation yourself from MATLAB, when running in stepping mode, e.g.:
in above, as long as you do not call sim.step(), then simulation will not advance.
Additionally you can also use the simulation stepper add-on if you want to trigger each simulation step manually: [Menu bar > Modules > Tools > Simulation stepper]
Cheers
Code: Select all
sim.setStepping(true);
sim.startSimulation();
while 1
t = sim.getSimulationTime();
if t >= 3; break; end
s = sprintf('Simulation time: %.2f [s] (simulation running synchronously to client, i.e. stepping)', t);
fprintf('%s\n', s);
sim.addLog(sim.verbosity_scriptinfos, s);
sim.step(); % triggers next simulation step
end
sim.stopSimulation();
Additionally you can also use the simulation stepper add-on if you want to trigger each simulation step manually: [Menu bar > Modules > Tools > Simulation stepper]
Cheers
Re: ZMQAPI and MATLAB will warning when using step simulation
Thanks for your reply.
I got your point. I need not to care the yellow warning window, Just run stepping mode like the previous version.
Thank you very much~
I got your point. I need not to care the yellow warning window, Just run stepping mode like the previous version.
Thank you very much~