ZJU-FAST-Lab / ego-planner

GNU General Public License v3.0
1.29k stars 268 forks source link

3D-2D #52

Closed zrd1234 closed 1 year ago

zrd1234 commented 1 year ago

Hello, thank you very much for your work. I want to use it in 2D to make a plane plan and how to modify it. Please guide me. Thank you.

bigsuperZZZX commented 1 year ago

You can just inflate the gird map a great amount in z direction.

zrd1234 commented 1 year ago

You can just inflate the gird map a great amount in z direction.

Hello, is the z-axis in the configuration file? I have modified the A* algorithm to two-dimensional search, but sometimes there is A star error problem, may I ask what is the reason for this problem? Kazam_screenshot_00000

zrd1234 commented 1 year ago

Hello, I fixed the search range of A in the plane, so it is a 2D path planning, but a star error often occurs. If the a algorithm fails, the path becomes 3 dimensional. Would like to ask the most likely cause of failure.

bigsuperZZZX commented 1 year ago

I hope that this late response helps. Your error indicates that the openSet_ is empty before finding an A* solution.

zrd1234 commented 1 year ago

I hope that this late response helps. Your error indicates that the openSet_ is empty before finding an A* solution. Thank you very much for your reply. Do you mean that this error occurred because openset_ was empty and the node could not be found?

bigsuperZZZX commented 1 year ago

That's true

zrd1234 commented 1 year ago

这是真的

May I ask if there is any good way to solve this problem? I want to do two-dimensional planning, but sometimes I just go three-dimensional.

bigsuperZZZX commented 1 year ago

The planner is designed for 3D flight, and maybe converting to 2D will be a big project. A relatively easier solution is to modify the inflation function in the mapping code. You can choose a certain layer at a specific height and inflate that layer up and down with enough margin so that the trajectory will not go above the wall. It will make the new 3D map looks like this: image Then implement the planner as normal and ignore the z-component of the trajectory.

zrd1234 commented 1 year ago

The planner is designed for 3D flight, and maybe converting to 2D will be a big project. A relatively easier solution is to modify the inflation function in the mapping code. You can choose a certain layer at a specific height and inflate that layer up and down with enough margin so that the trajectory will not go above the wall. It will make the new 3D map looks like this: image Then implement the planner as normal and ignore the z-component of the trajectory.

May I ask how to operate or modify it? I don't understand this part of the code. Because of my limited ability, I did not see how to operate.

bigsuperZZZX commented 1 year ago

modifying and debugging this is still a little bit complicated. So perhaps it is unavoidable for you to read and understand the code by yourself.