Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connector error:somebody help me #131

Open
kimakuma opened this issue Mar 17, 2022 · 3 comments
Open

connector error:somebody help me #131

kimakuma opened this issue Mar 17, 2022 · 3 comments
Assignees

Comments

@kimakuma
Copy link

Please understand that my English is weak
rti is in progress with python.
The "simple" example ran without problems.
However, I want to experience the idl and qos changes, so I am printing "helloworld".

After creating a file for helloworld with idl, I changed it to xml.
And proceeded according to all the references.
There seems to be nothing different from the simple example code.
But the following error pops up
why?

DDS_XMLStruct_initialize:!init XML struct object
DDS_XMLStruct_newI:!init XML struct object
RTIXMLParser_onStartTag:Parse error at line 4: Error processing tag 'struct'
RTIXMLParser_parseFromFile_ex:Parse error at line 9: junk after document element
RTIXMLParser_parseFromFile_ex:Parse error in file '/home/rti2/rticonnextdds-connector-py/examples/python/HelloWorld_h/HelloWorld.xml'
DDS_XMLParser_parse_from_file:Error parsing file
DDS_QosProvider_load_profiles_from_urlI:ERROR: loading profiles file '/home/rti2/rticonnextdds-connector-py/examples/python/HelloWorld_h/HelloWorld.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
DDS_DomainParticipantFactory_load_profilesI:!load profiles
RTIDDSConnector_newI:!new set factory qos
RTIDDSConnector_EntitiesLookupList_delete:RTIDDSConnector
Traceback (most recent call last):
File "examples/python/HelloWorld_h/writer.py", line 11, in
url=file_path + "/HelloWorld.xml") as connector:
File "/usr/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/home/rti2/.local/lib/python3.6/site-packages/rticonnextdds_connector/rticonnextdds_connector.py", line 1381, in open_connector
connector = Connector(config_name, url)
File "/home/rti2/.local/lib/python3.6/site-packages/rticonnextdds_connector/rticonnextdds_connector.py", line 1254, in init
_check_entity_creation(self.native, "Connector")
File "/home/rti2/.local/lib/python3.6/site-packages/rticonnextdds_connector/rticonnextdds_connector.py", line 93, in _check_entity_creation
+ _get_last_dds_error_message())
rticonnextdds_connector.rticonnextdds_connector.Error: Failed to create Connector:

@samuelraeburn
Copy link
Collaborator

Hey @kimakuma Can you share the XML file with me? It looks like Connector is failing to parse it for some reason.

@samuelraeburn samuelraeburn self-assigned this Mar 21, 2022
@kimakuma
Copy link
Author

Here is my xml file.
However, it may have changed slightly from before.
but the error is the same
Thanks for reading my post and replying

<domain_library name="HelloWorldLibrary">

<register_type name="HelloWorld" type_ref="HelloWorld"/>


</domain_library>

<domain_participant_library name="MyParticipantLibrary">
<domain_participant name="MyPubParticipant" domain_ref="MyDomainLibrary::HelloWorld">

<data_writer name="hwWriter" topic_ref="HelloWorld" />

</domain_participant>

<domain_participant name="MySubParticipant" domain_ref="MyDomainLibrary::HelloWorld">
    <subscriber name="MySubscriber">
        <data_reader name="hwReader" topic_ref="HelloWorld" />
    </subscriber>
</domain_participant>

</domain_participant_library>

<qos_library name="MyQosLibrary">
<qos_profile name="MyQosProfile" is_default_qos="true">
<datareader_qos>

RELIABLE_RELIABILITY_QOS


TRANSIENT_LOCAL_DURABILITY_QOS

</datareader_qos>
<datawriter_qos>

RELIABLE_RELIABILITY_QOS


TRANSIENT_LOCAL_DURABILITY_QOS

</datawriter_qos>
</qos_profile>
</qos_library>

@samuelraeburn
Copy link
Collaborator

@kimakuma Thanks.
So I can see a few things:

  1. Looks like you are missing the top level dds XML tags (e.g.: https://github.com/rticommunity/rticonnextdds-connector-py/blob/master/examples/python/ShapeExample.xml#L10).
  2. I don't see a the type definition in the XML, it should have been generated within a <types> XML tag (e.g.: https://github.com/rticommunity/rticonnextdds-connector-py/blob/master/examples/python/ShapeExample.xml#L27).
  3. I don't think the syntax you are using to set reliability/durability is valid. The QoS policies need to be within their corresponding tags (e.g.: https://github.com/rticommunity/rticonnextdds-connector-py/blob/master/test/xml/TestConnector.xml#L32).

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants