rticonnextdds-connector python3 problems

8 posts / 0 new
Last post
Offline
Joined: 03/26/2019
Posts: 2
rticonnextdds-connector python3 problems

Hey there, 

I'm trying to create a testing application for some of our systems and I'm using the python connector to implement it. I've been successful reading and pubishing data using the connector with python2.7, but when I try to use it with python3 I can't seem to ever get a valid sample. No errors are displayed but no data is ever received. 

According to the github the connector should support Python 3.6, but I seem to be having no luck getting it to work. Any help would be appreciated.

Thanks!

gianpiero's picture
Offline
Joined: 06/02/2010
Posts: 174

Hello Andrew,

Thank you for writing about your issue with the Python Connector. I just run the simple/writer.py and simple/reader.py that we have on github [here] and it seems to work. I am on a mac with python 3.6. 

Can you verify if the simple example works for you?

Best,
   Gianpiero

Offline
Joined: 03/26/2019
Posts: 2

Hi Gianpiero,

Sorry for the delayed response. It seems that there was a version mismatch between python 2 and 3. Python 2 was using the 0.3.3 version of the connector while Python3 was using 0.4.4. When I installed the 0.3.3 version for python 3 it seemed to work fine. Not sure what was causing the issue in the new version.

Regards,

Andrew

Offline
Joined: 04/04/2019
Posts: 2

Hello,

I am coming across a similar issue trying to test our system. I am using Python 2.7.15, and when I use 0.3.3 in my tool, I am able to read samples published by our system no problem. If I use version 0.4.4 in my tool however, the samples are not read. The one exception to this is when I use 0.3.3 first, stop my tool that uses the rti connector, install 0.4.4, and use the tool again. Then, for a minute or two, the tool is able to read the samples published by our system, then later fails to read any samples. The xml file I use doesn't change at all. 

I also made a simple reader and writer program similar to the Shapes example, only using the xml file for our system. When the samples are published by the simple writer, the reader is able to pick them up. It seems that 0.4.4 is causing some issues with the communication between connector and the samples published by our system?

Regards,

Daniel

 

gianpiero's picture
Offline
Joined: 06/02/2010
Posts: 174

Hello there,

@andrewindoe: glad you solved the issue. 

 @minad

As I mention in github:

There should not be difference between the two versions when it comes to receive samples. Be aware that now when you iterate through sample you have to start from 0 so old code may miss the first sample and go one over and crash.

Beside that, is what you call "our system" a c-system? Is it compiled against Connext 6? (Connector >= 0.4) is based on the new Connext 6.  You can look at this migration guide to learn more about compatibility between versions: 

https://community.rti.com/static/documentation/connext-dds/6.0.0/doc/manuals/migration_guide/index.html

I hope this helps,

 Gianpiero

Offline
Joined: 04/04/2019
Posts: 2

Hello,

Our system is written in traditional C++. It uses RTI 5.2.0. Is 0.4.4 not backwards compatible with older versions of RTI? If so I guess that could be the issue.

The iterating through samples starting at 0 isn't the issue, as I accounted for that when using 0.4.4.

Thanks,

Daniel 

 

gianpiero's picture
Offline
Joined: 06/02/2010
Posts: 174

Hi @minad,

That may be the issue. Connext 6 is backward compatible with older versions but you most likely have to do some extra qos configurations. For example for the wire compatibility. See here for more info. 

Best,
  Gianpiero

Offline
Joined: 04/13/2019
Posts: 1

Python Connector for Connext v6.0.0 "Failed to auto-enable entity"

I tried my *QoS.xml files that were working with RTI Connector for Connext DDS v5.3.* and I get these errors :

[D0000|Sub(80000009)|T=rov_beacon|CREATE Reader]
PRESTypePluginDefaultEndpointData_createMD5StreamWithInfo:no space on heap for structure of size 2147482623 bytes aligned at 0 bytes
PRESPsService_enableLocalEndpointWithCursor:failed to attach endpoint to typePlugin
PRESPsService_enableLocalEndpoint:!enable local endpoint
DDS_Subscriber_create_datareader:ERROR: Failed to auto-enable entity
DDS_FactoryXmlPlugin_createDataReadersWithNamesI:!create DataReader
DDS_FactoryXmlPlugin_createDataReaders:!create DataReaders from XML DataReader "::MyParticipantLibrary::Zero::MySubscriber::MyRovBeaconReader"

On Win10 x64 I installed using git clone of rticonnextdds-connector-py.
Using Python 3.7.2, the .\examples\simple\reader.py could see the writer.py data.

I then incrementally added my QoS information to the ShapeExample.xml and had
no errors until I added my reader to <subscriber with the MySquareReader.
<data_reader name="MyRovBeaconReader" topic_ref="rov_beacon" />

I have the same results on Ubuntu 18.04.

Bill