On linux I can run V-REP from the command line using things like
../vrep.sh -g10 '/home/full/file/path/file.ttt' -s10000 -q
to launch a sim which will run until 10 seconds of sim time has elapsed which quits V-REP when the sim ends, with a parameter of 10 fed in as first argument. But once running I typically find I need to press the "hare" button beside the tortoise to speed up the sim. I can't run these sims fully headless as certain elements of the GUI are still needed. Is there a command line argument which will let me "click the hare button" a number of times as the sim begins?
Thank you
V-REP from command line, press the "hare" button
Re: V-REP from command line, press the "hare" button
Hello,
no, you can't. The only thing you can do is use an add-on script (for instance)that does this for you. You need to have set a custom time step in the simulation dialog of that scene. Then, before simulation starts, then set your time step with:
Cheers
no, you can't. The only thing you can do is use an add-on script (for instance)that does this for you. You need to have set a custom time step in the simulation dialog of that scene. Then, before simulation starts, then set your time step with:
Code: Select all
sim.setFloatParameter(sim.floatparam_simulation_time_step,yourTimeStep)
Re: V-REP from command line, press the "hare" button
You can use the command-line option -aXXX which loads and runs an additional add-on script specified via its filename (XXX).
In the add-on script you set the
In the add-on script you set the
sim.floatparam_simulation_time_step
parameter, as suggested by coppelia.Re: V-REP from command line, press the "hare" button
The floatparam option isn't much help to me. I'm not looking to decrease the number of simulation ticks per second of sim time, I just want to do what the "hare" button does and only render a frame on a smaller fraction of those ticks.
Re: V-REP from command line, press the "hare" button
Have a look at this:
where x can be a positive value between 1 and 6 (to skip display frames), or a negative value between -1 and -3 (to reduce the simulation time step). Make sure to execute this only when simulation is running for this to have an effect.
Cheers
Code: Select all
sim.setInt32Parameter(sim.intparam_speedmodifier,x)
Cheers
Re: V-REP from command line, press the "hare" button
Thanks, that sim.setInt32Parameter(sim.intparam_speedmodifier,x) tip is exactly what I needed.