zenoh: Don't use uORB o_name as type but check for parent type

For example vehicle_local_position_groundtruth has ROS2 type
vehicle_local_position, so we've to use px4_msgs/VehicleLocalPosition as typename
This commit is contained in:
Peter van der Perk
2025-08-22 08:22:59 +02:00
committed by Beat Küng
parent cb74cee970
commit e37f20e94d
2 changed files with 69 additions and 43 deletions
@@ -159,6 +159,20 @@ Zenoh_Subscriber* genSubscriber(const char *name) {
return NULL;
}
const char* genTypeName(const char *name, const uint8_t* hash) {
const char *pch;
for (auto &sub : _topics) {
pch = strstr(name, sub.orb_meta->o_name);
if(pch) {
if(hash == sub.hash) {
return sub.orb_meta->o_name;
}
}
}
return NULL;
}
const uint8_t* getRIHS01_Hash(const orb_metadata *meta) {
for (auto &sub : _topics) {
if(sub.orb_meta->o_id == meta->o_id) {