Pobspath

How to use Pobspath?

Dear All,

i am searching some algorithm code to find shortest path avoiding square obstacles, so i found Pobspath at last.

i've study pathplan.3.pdf for its usage, and got a peice of code as below

[CODE]
Pxy_t points[4] = {{20, 10}, {40, 10}, {40, 30}, {20, 30}};
Ppoly_t poly = {points, 4};
Ppoly_t obstacles[] = {poly};
Ppoly_t * o = obstacles;

vconfig_t * conf = Pobsopen(&o, 1);

Pxy_t p0 = {10, 20};
Pxy_t p1 = {50, 20};

Ppolyline_t result;

Pobspath(conf, p0, POLYID_NONE, p1, POLYID_NONE, &result);

Pobsclose(conf);
[/CODE]

Recent comments

Syndicate content