Meaning of resampled path.

Typically: "How do I... ", "How can I... " questions
Post Reply
shreyas7738
Posts: 19
Joined: 30 Dec 2020, 15:32

Meaning of resampled path.

Post by shreyas7738 »

What is meaning of resampled path?Asking in reference to sim.resamplePath

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

Re: Meaning of resampled path.

Post by coppelia »

Hello,

imagine you have a path described by 3 non-aligned points. You can resample it in order to generate more intermediaries points (i.e. interpolate). The interpolation can be linear, or based on Bezier curves. That's what sim.resamplePath does.

Cheers

shreyas7738
Posts: 19
Joined: 30 Dec 2020, 15:32

Re: Meaning of resampled path.

Post by shreyas7738 »

I had another query.I have a closed multiloop path which I need to follow using dummy following.But the issue is the PathCtrlPts are placed randomly.So my ClosestPosOnPath starts from 15 instead of 0 which is creating problem as the dummy keeps following the same loop instead of going to next loop..Is there any solution for this.

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

Re: Meaning of resampled path.

Post by coppelia »

Not sure how to handle this situation, which is very specific. If you have a path that overlaps several times, then you should probably try to sample the path yourself and find out about the most appropriate point on the path that is closest to an external point X. Use sim.getPathInterpolatedConfig to get a random point along the path.

Cheers

Post Reply