sim.setPathTargetNominalVelocity function

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

sim.setPathTargetNominalVelocity function

Post 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!

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: sim.setPathTargetNominalVelocity function

Post 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

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

Re: sim.setPathTargetNominalVelocity function

Post 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.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: sim.setPathTargetNominalVelocity function

Post 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

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

Re: sim.setPathTargetNominalVelocity function

Post by larmesto »

Thanks a lot!

Post Reply