Closed Zyhlibrary closed 2 years ago
It seems to be a corner case that is not well handled.
Could you please provide the input information of convexCover?
The inputs are:
const std::vector
Thanks for your reply. The path and the obstacle points are shown in the figure. The lowCorner: (-20,-20,0) highCorner: (20,20,2),progress: 7, range: 3. The error occurred in the function firi::firi(bd, pc, a, b, hp) ;
Actually, once the environment has no obstacles, the obstacle points will be empty, it should be easier to build the flight corridor and get the optimal path, but the code seems not work in this case. I guess there are no constraint on the maximum construction range when build the flight corridor in the environment without obstacles.
I wonder if there is a call where pc contained no points. If this is the truth, it can be simply resolved by return the bd with normalized normal vectors. Could you print valid_pc.size() before the call to firi::firi? Or I will do the test later.
valid_pc: 2108 valid_pc: 418 valid_pc: 125 valid_pc: 0 This is the results in one construction process.
It perfectly solves the problem. Thanks for your time and detailed explanation~
I have found a bug when no obstacles exist which is caused by distRs.minCoeff(&pcMinId) When pc is empty, distRs is also an empty vec. In Eigen, find the minimum element in an empty vec causes crashes.
I have fixed it in the commit.
Please check it in your case and see if it solves your problem. Whether it works or not, please tell me the results.
It perfectly solves the problem. Thanks for your time and detailed explanation~
Hey, I made a typo in an old commit but some how it hides the crash.
Please check the commit mentioned above.
The typos are fixed now.
OK, thanks for that, it also works. hhh~
Hi, when i use the code in our own environment, the code always meets the error in the part of convexCover if there are no obstacles info around the route. Is there a bug in the code or just caused by our incorrect using?