test_sbpl and test_adjacency_list were always built, also in the
standalone pnkx_nav_core build that is deployed to the robot. Enable
them with -DBUILD_ROBOT_SBPL_TESTS=ON.
ros-noetic-sbpl (apt, 2020) installs a libsbpl.so without the abort flag in
/opt/ros/noetic/lib. A ROS environment puts that directory on
LD_LIBRARY_PATH, which the loader searches before any RUNPATH, so a
process that sourced ROS loaded the apt library instead of this one:
sbpl_lattice_planner then ran with a header/library ABI mismatch and
preempt disabled.
The package now follows the robot_* naming of the other packages:
- project and target robot_sbpl, library file librobot_sbpl.so;
- robot_sbpl-config.cmake (installed to share/robot_sbpl/, variables
robot_sbpl_INCLUDE_DIRS / robot_sbpl_LIBRARIES) and robot_sbpl.pc;
- the target exports src/include as a PUBLIC include directory, so an
in-tree consumer gets the headers that match the library.
- the target is installed with an export set (robot_sbpl-targets), like
the other robot_* packages; sbpl_lattice_planner exports its own target
and CMake requires its shared dependencies to be exported as well.
Headers keep the sbpl/ prefix, so no source include changes.
Debug tam thoi in ra moi lan SetConfiguration/InitializeEnv chay - lam log san xuat/sim ngap
dong vo nghia. Comment lai dong DEBUG 1000, xoa han 4 dong con lai (khong thu tin tuc gi ngoai
so thu tu).
SBPLPlanner::set_abort_flag(const std::atomic<bool>*) / aborted() let a caller
hand ARAPlanner a flag it checks every expansion, in both ImprovePath and the
outer Search loop. Aborted -> return "no solution" instead of running to
allocated_time.
Root cause this fixes (from a C++ host log): cancel during a long SBPL search
only set a discard flag — the search ran to allocated_time (10-30 s) before
the runtime could report CANCELLED, and the next mission queued behind it
also timed out and aborted. This flag is the primitive move_base2's
PlannerRunner and sbpl_lattice_planner's Preemptable wrapper (separate repos)
build the real preempt on top of.
extern "C" int sbpl_abort_flag_abi_version() lets a caller probe for this
feature at runtime via dlsym before touching the flag, since two sbpl
installs (apt ros-noetic-sbpl vs. this vendored build) can share a soname.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>