Page 1 of 1

sim.setPathTargetNominalVelocity function

Posted: 09 Nov 2020, 07:32
by larmesto
It seems that the "sim.setPathTargetNominalVelocity" is not available anymore in the latest function, however this change was not reflected in the change log.

Can you tell me an alternative way to set the speed of a path?

Thanks!

Re: sim.setPathTargetNominalVelocity function

Posted: 09 Nov 2020, 08:25
by coppelia
Hello,

path objects are clumsy and will slowly be abandoned for something more flexible.
The API function you mention is deprecated since a while. It is however still working.
We recommend manually moving objects along a path by using following API functions (for now): sim.getPathLength, sim.getPositionOnPath and sim.getOrientationOnPath.

Cheers

Re: sim.setPathTargetNominalVelocity function

Posted: 11 Nov 2020, 07:45
by larmesto
The function is not working in the new version (it does not effectively change the path velocity as in the previous version with the same code). Anyway, the function does not appear highlighted either in the newest version.

Re: sim.setPathTargetNominalVelocity function

Posted: 12 Nov 2020, 14:58
by coppelia
Yes, you are right. You need to add following to the actuation section of your main script, for it to have an effect:

Code: Select all

    simHandlePath(sim.handle_all_except_explicit,sim.getSimulationTimeStep())
Syntax highlighting was removed on purpose, since the function is deprecated.

Cheers

Re: sim.setPathTargetNominalVelocity function

Posted: 12 Nov 2020, 15:03
by larmesto
Thanks a lot!