Give action handlers a port onto the shared raw sensor store

A handler that samples through TF only ever sees what perception already
decided. One that detects for itself - picking the V plate of a charging dock
out of a laser scan - needs the ranges array in ray order, and the costmap at
0.05 m has inflated that away beyond reconstruction. ActionContext carried no
way to reach sensor data at all, so that handler could not be written.

It now carries a read-only port onto the store in robot_sensor_ports. Null
when the host provides none, and a handler that needs sensor data is expected
to refuse in configure() rather than discover it mid-shift, the same contract
the tf pointer already has.

The struct is crossed by boost::dll, so its layout is an ABI. Adding a field
changes that layout and dlsym plus reinterpret_cast catches none of it at
compile time - an old .so reads the old offsets off new data and returns
garbage. The field goes at the end and the warning now says so in the doc, but
the rule stands: every handler .so is rebuilt in the same pass.
This commit is contained in:
2026-08-26 11:34:35 +07:00
parent 8acbc5b0b0
commit 3b7692ed8b
3 changed files with 31 additions and 1 deletions

View File

@@ -87,13 +87,14 @@ if(NOT BUILDING_WITH_CATKIN)
/usr/local/lib
)
# Gói này KHÔNG kéo costmap/tf3: action không chạm bản đồ và không phát vận tốc (D8), nên bốn
# Gói này KHÔNG kéo costmap/tf3: action không chạm bản đồ và không phát vận tốc (D8), nên năm
# thư viện dưới đây là toàn bộ phụ thuộc runtime của nó.
set(STANDALONE_LIBRARIES
robot_cpp
robot_time
robot_xmlrpcpp
robot_protocol_msgs
robot_sensor_ports
)
include_directories(
@@ -116,6 +117,7 @@ else()
robot_time
robot_protocol_msgs
robot_xmlrpcpp
robot_sensor_ports
)
catkin_package(
@@ -134,6 +136,7 @@ else()
robot_time
robot_protocol_msgs
robot_xmlrpcpp
robot_sensor_ports
DEPENDS
Boost