rticommunity / rticonnextdds-connector-py

RTI Connector for Connext DDS is a lightweight technology that enables DDS data to be accessed with Python.
Other
34 stars 21 forks source link

connector error:somebody help me #131

Open kimakuma opened 2 years ago

kimakuma commented 2 years ago

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

samuelraeburn commented 2 years ago

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

kimakuma commented 2 years ago

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

<?xml version="1.0" encoding="UTF-8"?>

RELIABLE_RELIABILITY_QOS TRANSIENT_LOCAL_DURABILITY_QOS RELIABLE_RELIABILITY_QOS TRANSIENT_LOCAL_DURABILITY_QOS
samuelraeburn commented 2 years ago

@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.