Converting hello_world.idl to XML for Python
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation, tooling
Research direction
Start with rticonnextdds-getting-started/2_hello_world/python/README.md, the rtiddsgen -convertToXml ../hello_world.idl command, and HelloWorldPublisher.py. Compare the generated hello_world.xml with the XML used by the other examples and reproduce the parser error. Done means the documented conversion steps produce XML that the Python publisher can load without the reported error.
Written by the indexing model from the issue text.
Description
I am running the 2_hello_world example for Python. I am hitting a parsing issue with the converted hello_world.idl XML and while I can work around it by following other examples, I am wondering if I am performing any steps incorrectly or if there are additional steps apart from rticonnextdds-getting-started/2_hello_world/python/README.md.
To convert hello_world.idl to XML I am using:
rtiddsgen -convertToXml ../hello_world.idl
The output XML is:
<?xml version="1.0" encoding="UTF-8"?>
<types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:////Applications/rti_connext_dds-6.0.1/bin/../resource/app/app_support/rtiddsgen/schema/rti_dds_topic_types.xsd">
<struct name= "HelloWorld">
<member name="msg" stringMaxLength="256" type="string"/>
</struct>
</types>
Next I run HelloWorldPublisher.py with the following error output:
python3 HelloWorldPublisher.py
DDS_XMLStruct_initialize:!init XML struct object
DDS_XMLStruct_newI:!init XML struct object
RTIXMLParser_onStartTag:Parse error at line 3: Error processing tag 'struct'
RTIXMLParser_parseFromFile_ex:Parse error in file '/Users/test/Documents/test/rticonnextdds-getting-started/2_hello_world/python/../hello_world.xml'
DDS_XMLParser_parse_from_file:Error parsing file
DDS_QosProvider_load_profiles_from_urlI:ERROR: loading profiles file '/Users/test/Documents/test/rticonnextdds-getting-started/2_hello_world/python/../hello_world.xml'
DDS_QosProvider_load_profiles_from_url_groupI:ERROR: loading profiles
DDS_QosProvider_load_profiles_from_url_sequenceI:ERROR: loading profiles
DDS_QosProvider_load_profiles_from_policyI:ERROR: loading profiles
DDS_QosProvider_load_profilesI:ERROR: loading profiles
Traceback (most recent call last):
File "HelloWorldPublisher.py", line 83, in
run_example(args.domain_id, args.sample_count)
File "HelloWorldPublisher.py", line 30, in run_example
provider = dds.QosProvider(FILE)
rti.connextdds.Error:
DDS_XMLStruct_initialize:!init XML struct object
DDS_XMLStruct_newI:!init XML struct object
RTIXMLParser_onStartTag:Parse error at line 3: Error processing tag 'struct'
RTIXMLParser_parseFromFile_ex:Parse error in file '/Users/test/Documents/test/rticonnextdds-getting-started/2_hello_world/python/../hello_world.xml'
DDS_XMLParser_parse_from_file:Error parsing file
DDS_QosProvider_load_profiles_from_urlI:ERROR: loading profiles file '/Users/test/Documents/test/rticonnextdds-getting-started/2_hello_world/python/../hello_world.xml'
DDS_QosProvider_load_profiles_from_url_groupI:ERROR: loading profiles
DDS_QosProvider_load_profiles_from_url_sequenceI:ERROR: loading profiles
DDS_QosProvider_load_profiles_from_policyI:ERROR: loading profiles
DDS_QosProvider_load_profilesI:ERROR: loading profiles
reload profiles
I can fix this by adopting an XML style similar to the other examples. Example:
<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/6.0.1/rti_dds_qos_profiles.xsd"
version="6.0.1">
<type_library name="builtin_topics_lib">
<struct name= "HelloWorld">
<member name="msg" stringMaxLength="256" type="string"/>
</struct>
</type_library>
</dds>
I am wondering if there is additional configuration I need for rtiddsgen to have the XML conversion work seamlessly or if this is a known issue/change.
Thank you!
- Dominant language
- C++
- Stars
- 32
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rticommunity/rticonnextdds-getting-started
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rticommunity/rticonnextdds-getting-started#75 · 1 comment ·
-
rticommunity/rticonnextdds-getting-started#69 · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
rticommunity/rticonnextdds-getting-started#63 · 1 comment ·
All issues in rticommunity/rticonnextdds-getting-started
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·