- Create a Topic without a "/"
- Generate code
- Edit the XML file that is generated. Modify <domain_library> section of the XML file. Change the topic name to include the desired "/"
- Close the Simulink model
- Delete the .sldd file
- Open the Simulink model
- Use the DDS quick start to import the new XML file created in step 3.
- In the DDS Data Dictionary, you should now see the Topic type defined with "/".
How to change the name of topic in DDS
5 views (last 30 days)
DDS->Code interface->DDS Libraries->Domains->Topic. Are there any restrictive rules for naming topics?
When I named topic, I found that if there are special symbols in it, it cannot be named.
For a simple example, if the topic of a manipulator in our robot is "RT / SCR / psa1 / jointstate", then I need to define the same name when defining the topic in MATLAB, but I find that when defining the name of the topic, if the name is with "/", it cannot be named.
Mark McBroom on 10 Oct 2022
You are correct that the DDS Data Dictionary currently does not allow the user to create a Topic with a name that contains a slash. Here is one possible workaround for this: