## sim.setPathTargetNominalVelocity function

Report crashes, strange behaviour, or apparent bugs
larmesto
Posts: 3
Joined: 05 Nov 2020, 22:19

### sim.setPathTargetNominalVelocity function

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!

coppelia
Posts: 8371
Joined: 14 Dec 2012, 00:25

### Re: sim.setPathTargetNominalVelocity function

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

larmesto
Posts: 3
Joined: 05 Nov 2020, 22:19

### Re: sim.setPathTargetNominalVelocity function

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.

coppelia
Posts: 8371
Joined: 14 Dec 2012, 00:25

### Re: sim.setPathTargetNominalVelocity function

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

larmesto
Posts: 3
Joined: 05 Nov 2020, 22:19

Thanks a lot!