feat: dang ky robot_sensor_msgs/RouteGraph vao registry type

Graph tuyen (Voronoi) bien dich san tu map, host day vao qua BaseNavigation::addRouteGraph.
La message cua robot_sensor_msgs du khong phai "cam bien" - kho khong phan biet. 23/25 loai
duoc dang ky san.
This commit is contained in:
2026-09-22 15:31:05 +07:00
parent c60173d320
commit 5efa0e7392
3 changed files with 8 additions and 2 deletions

View File

@@ -136,7 +136,10 @@ Không đổi interface. **Không plugin nào phải build lại.**
Loại thuộc package khác thì đăng ký ở nơi nó sống — `ROBOT_SENSOR_PORTS_REGISTER_TYPE` cộng một lời
gọi `TypeNames::add()` lúc khởi động — để không kéo dependency của nó vào mọi nơi include header này.
### 22/24 loại của `robot_sensor_msgs` được đăng ký sẵn
### 23/25 loại của `robot_sensor_msgs` được đăng ký sẵn
`RouteGraph` (graph tuyến biên dịch sẵn từ map, host đẩy vào cạnh static map) cũng nằm trong danh
sách — nó là message của `robot_sensor_msgs` dù không phải "cảm biến"; kho không phân biệt.
Thiếu `Imu` và `TimeReference` vì **header của chúng không biên dịch được trong workspace này**:

View File

@@ -30,6 +30,7 @@
#include <robot_sensor_msgs/Range.h>
#include <robot_sensor_msgs/RegionOfInterest.h>
#include <robot_sensor_msgs/RelativeHumidity.h>
#include <robot_sensor_msgs/RouteGraph.h>
#include <robot_sensor_msgs/Temperature.h>
#include <robot_sensor_ports/sensor_type.h>
@@ -82,6 +83,7 @@ namespace robot_sensor_ports
X(::robot_sensor_msgs::Range, "robot_sensor_msgs/Range") \
X(::robot_sensor_msgs::RegionOfInterest, "robot_sensor_msgs/RegionOfInterest") \
X(::robot_sensor_msgs::RelativeHumidity, "robot_sensor_msgs/RelativeHumidity") \
X(::robot_sensor_msgs::RouteGraph, "robot_sensor_msgs/RouteGraph") \
X(::robot_sensor_msgs::Temperature, "robot_sensor_msgs/Temperature")
ROBOT_SENSOR_PORTS_TYPE_LIST(ROBOT_SENSOR_PORTS_REGISTER_TYPE)

View File

@@ -121,7 +121,8 @@ TEST(TypeNames, KnowsEveryTypeInTheBuiltInList)
for (const char* expected : {"robot_sensor_msgs/LaserScan", "robot_sensor_msgs/PointCloud2",
"robot_sensor_msgs/DepthCameraData", "robot_sensor_msgs/CameraInfo",
"robot_sensor_msgs/JointState", "robot_sensor_msgs/Image"})
"robot_sensor_msgs/JointState", "robot_sensor_msgs/Image",
"robot_sensor_msgs/RouteGraph"})
{
EXPECT_NE(std::find(all.begin(), all.end(), expected), all.end()) << expected;
}