Open ssfc opened 8 months ago
您好! 您发送的邮件已收到。谢谢。 祝您生活愉快!
Which version of Python and numpy are you using? The error indicates that box_p is an integer type, while E is a floating point type, so a likely fix would manually set the dtype of box_p initially.
Which version of Python and numpy are you using? The error indicates that box_p is an integer type, while E is a floating point type, so a likely fix would manually set the dtype of box_p initially.
The bug is fixed! Thanks for your advice. The python version I am using is Python 3.11.5
. I modify function precheck_bounding_box
as follows and the roadmap visualization can run successfully now.
def precheck_bounding_box(E, p0, p1, q0, q1):
"""Check if the bounding boxes spanning the two line segments overlap.
Returns True if the bounding boxes overlap, False otherwise."""
box_p = np.stack([np.min([p0, p1], axis=0), np.max([p0, p1], axis=0)]).astype(np.float64)
box_q = np.stack([np.min([q0, q1], axis=0), np.max([q0, q1], axis=0)]).astype(np.float64)
box_p += np.stack([-np.diagonal(E), np.diagonal(E)])
box_q += np.stack([-np.diagonal(E), np.diagonal(E)])
return np.logical_and(box_p[1, :] > box_q[0, :],
box_q[1, :] > box_p[0, :]).all()
Firstly thanks a lot for releasing such high-quality code. Kindly, I have question about errors I am facing while running roadmap example in the README.
After running
python3 ../tools/annotate_roadmap.py ../test/mapf_simple1_roadmap_to_annotate.yaml mapf_simple1_roadmap_annotated.yaml
I am facing the following outputAny recommendations to overcome this error is highly appreciated