Skip to main content

AVxcelerate Simulation Framework 2026 R1 SP01

Namespace simulation_framework::autonomy::topic_registry

Last update: 22.04.2026

Definition: autonomy/communication/topic_registry/topic_registry.h (line 34)

Autonomy Topic IDs and their Topic types (RTI-DDS backed)

Use these Topic types when adding publishers/subscribers for the listed IDs.

  • "KpiLoggerTopic" -> KpiMessageTopicType (uses rtidds::KpiMessage)

  • "DriverInputTopic" -> KpiMessageTopicType (uses rtidds::KpiMessage)

  • "SensorViewTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "SensorDataTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "TrafficUpdateTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "TrafficCommandTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "MotionRequestTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "FmuInput" -> FmuMessageTopicType (uses rtidds::FmuMessage)

  • "FmuOutput" -> FmuMessageTopicType (uses rtidds::FmuMessage)

  • "ScenarioVariableTopic" -> VariantMapTopicType (uses rtidds::VariantMap)

  • "VehicleControlInputTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

  • "ObjectSpeedInputTopic" -> GenericBytesTopicType (uses rtidds::GenericBytesMessage)

Examples:

  1. KPI (KpiMessageTopicType)
// Publish to KPI logger
AddPublisher<core::topic_registry::KpiMessageTopicType>(
    "KpiLoggerTopic", [&]() { return kpi_msg_; }  // rtidds::KpiMessage kpi_msg_;
);
// Subscribe driver input
AddSubscriber<core::topic_registry::KpiMessageTopicType>(
    "DriverInputTopic", [&](const rtidds::KpiMessage& msg) { HandleDriverInput(msg); }
);
  1. Generic bytes (GenericBytesTopicType) for serialized payloads (e.g., protobuf/OSI)
AddPublisher<core::topic_registry::GenericBytesTopicType>(
    "SensorDataTopic", [&]() { return bytes_msg_; }  // rtidds::GenericBytesMessage bytes_msg_;
);
// Fill bytes_msg_ with serialized data; see communication.md for details
AddSubscriber<core::topic_registry::GenericBytesTopicType>(
    "SensorViewTopic", [&](const rtidds::GenericBytesMessage& msg) { ParseAndUse(msg); }
);
  1. FMU I/O (FmuMessageTopicType)
AddPublisher<core::topic_registry::FmuMessageTopicType>(
    "FmuInput", [&]() { return fmu_msg_; }  // rtidds::FmuMessage fmu_msg_;
);
AddSubscriber<core::topic_registry::FmuMessageTopicType>(
    "FmuOutput", [&](const rtidds::FmuMessage& msg) { HandleFmuOutputs(msg); }
);
  1. Scenario variables (VariantMapTopicType)
AddPublisher<core::topic_registry::VariantMapTopicType>(
    "ScenarioVariableTopic", [&]() { return var_map_msg_; }  // rtidds::VariantMap var_map_msg_;
);
AddSubscriber<core::topic_registry::VariantMapTopicType>(
    "ScenarioVariableTopic", [&](const rtidds::VariantMap& msg) { ApplyScenarioVariables(msg); }
);

?> VariantMap references

  • For the RTI-DDS message type and Topic alias, see [core/communication/topic_registry.h](core_2communication_2topic__registry_8h.md

  • For the C++ native VariantMap API and bi-directional conversion helpers, see core/communication/utils/variant_map.h and core/communication/utils/variant_map_converter.h.

  1. VehicleControlInputMsg I/O (VehicleControlInputTopic)
AddPublisher<core::Topic<rtidds::GenericBytesMessage>>(
    "VehicleControlInputTopic", [&]() {
  autonomy::communication::messages::VehicleControlInputMsg msg;
  return autonomy::communication::utils::ConvertAutonomyMsgToGenericBytes(frame_counter, header_name, msg); //
rtidds::GenericBytesMessage
}
);

AddSubscriber<core::Topic<rtidds::GenericBytesMessage>>(
    "VehicleControlInputTopic", [&](const rtidds::GenericBytesMessage& msg) {
  autonomy::communication::messages::VehicleControlInputMsg inputs;
  autonomy::communication::utils::ConvertGenericBytesToAutonomyMsg(msg,inputs);}
);
  1. Object speed input I/O (ObjectSpeedInputTopic)
AddPublisher<core::Topic<rtidds::GenericBytesMessage>>(
    "ObjectSpeedInputTopic", [&]() {
  autonomy::communication::messages::ObjectSpeedInputMsg msg;
  return autonomy::communication::utils::ConvertAutonomyMsgToGenericBytes(frame_counter, header_name, msg); //
rtidds::GenericBytesMessage
}
);

AddSubscriber<core::Topic<rtidds::GenericBytesMessage>>(
    "ObjectSpeedInputTopic", [&](const rtidds::GenericBytesMessage& msg) {
  autonomy::communication::messages::ObjectSpeedInputMsg speed_input;
  autonomy::communication::utils::ConvertGenericBytesToAutonomyMsg(msg, speed_input);}
);

Typedef ScenarioVariableTopicType

Definition: autonomy/communication/topic_registry/topic_registry.h (line 154)

using simulation_framework::autonomy::topic_registry::ScenarioVariableTopicType = typedef simulation_framework::core::topic_registry::VariantMapTopicType

Alias for scenario variable Topic type in Autonomy.

?> Variant message aliases

In core, rtidds::VariantMessage is currently an alias of rtidds::FmuMessage. Similarly, rtidds::VariantData aliases rtidds::FmuData, and rtidds::VariantDatatype aliases rtidds::FmuDatatype. This provides a semantic "Variant" naming today while retaining full compatibility with FMU message structure. If dedicated Variant types are introduced in the future, these aliases can be updated centrally. Maps to simulation_framework::core::topic_registry::VariantMapTopicType which uses rtidds::VariantMap as the underlying RTI-DDS message. See also: [core/communication/topic_registry.h](core_2communication_2topic__registry_8h.md

Return type: simulation_framework::core::topic_registry::VariantMapTopicType

Function GetExistingTopicById

std::shared_ptr< core::ITopic > simulation_framework::autonomy::topic_registry::GetExistingTopicById(const std::string &topic_id)

Return a concrete Topic instance for a known Autonomy Topic ID.

Parameters:

  • topic_id: One of: "KpiLoggerTopic", "DriverInputTopic", "SensorViewTopic", "SensorDataTopic", "TrafficUpdateTopic", "TrafficCommandTopic", "MotionRequestTopic", "FmuInput", "FmuOutput", "ScenarioVariableTopic", "VehicleControlInputTopic", "ObjectSpeedInputTopic".

Returns:

A std::shared_ptr<core::ITopic> of the appropriate concrete Topic type, or throws std::runtime_error if the ID is not recognized.

Parameters:

  • const std::string & topic_id

Return type: std::shared_ptr< core::ITopic >

Connect with Ansys