karlkurzer / path_planner

Hybrid A* Path Planner for the KTH Research Concept Vehicle
http://karlkurzer.github.io/path_planner/
BSD 3-Clause "New" or "Revised" License
1.49k stars 526 forks source link

How to change the resolution for maps exactly? #20

Closed EdXian closed 4 years ago

EdXian commented 5 years ago

Hi, Thank you very much. This package helps me a lot. I have some question about the resolution for map-server. If the resolution is 1, the planner works perfectly. However, the planner will do some error if the value of the resolution is 0.05.

image: ccc.png
resolution: 0.1
origin: [0.0, 0.0, 0.0]
occupied_thresh: 0.1
free_thresh: 0.05
negate: 0

I have found the related issue but I dont know how to set value for Node3D::dy[] = { 0, -0.0415893, 0.0415893};

karlkurzer commented 5 years ago

// R = 6, 6.75 DEG
const float Node3D::dy[] = { 0,        -0.0415893,  0.0415893};
const float Node3D::dx[] = { 0.7068582,   0.705224,   0.705224};
const float Node3D::dt[] = { 0, 0.1178097, -0.1178097};

There are three possible directions, straight, left and right. Each direction is made up by a combination of changes in theta (heading) as well as x and y. This is encoded in the respective vector. if you wanna change the resolution your motion primitives would need to change respectively.

I hope this helps.

ppln53 commented 3 years ago

Hello @EdXian, did you make the planner to work after adjusting the motion primitives, is it working???