rticonnextdds-connector

4 posts / 0 new
Last post
Offline
Last seen: 6 years 7 months ago
Joined: 09/08/2017
Posts: 2
rticonnextdds-connector

 

Hi, 

I am using rticonnextdds-connector in Python. I have been using examples/python/simple .

 

Could I get any rticonnextdds-connector description?

I cannot understand this code exactly because rticonnextdds-connector refers to .so file.

 

 

 

gianpiero's picture
Offline
Last seen: 3 months 4 days ago
Joined: 06/02/2010
Posts: 177

Hello Junho,

You can find documentation on the README(s) in the github project. The .so is a native library based on RTI Connext DDS. 

Can you specify your doubts? I will try to answer.

 

Best,

  Gianpiero

Offline
Last seen: 6 years 7 months ago
Joined: 09/08/2017
Posts: 2

I have been applying the rticonnextdds-connector code into our GUI in Python.

I have used 2 timer threads for Publish and Subscribe in 1 code. In this process, Segmentation Fault occurred sometimes.

 

I found out the solution and then I have removed the segmentation fault through it.

 : I applied a mutex in our code by locking critical sections of threads.

 

 

I have a question about this solution

I locked everything related to input and output, and then the segmentation fault didnt occur.

 

I thought the segmentation fault occurred for the following reason of the picture below. It is what Im thinking.

 

 

If this algorithm is true, then if I lock something only related to input then the segmentation fault shouldn’t occur. But the fault occurs in this case.

But this error doesnt occur only if I lock everything.

 

So my questions are:

  1. Is it wrong with what I thought? Could you explain about the thread operation in rticonnextdds-connector?

  2. Is this the perfect solution? (locking everything related to input and output)

 

I will wait for your reply

 

Thank you

Best regards,

Junho

gianpiero's picture
Offline
Last seen: 3 months 4 days ago
Joined: 06/02/2010
Posts: 177

Hello Junho,

Thanks for your detailed description. You are right in protecting all the operations. We have a small section in the doc that explains that: [link]. A small example on how to do it in python is here. I saw other people using the QT semaphores as well (if you are using QT). 

The perfect solution for now. In the future i would like to make the connector calls thread safe so the final users doesn't have to worry about it. But this is the best you can do now,

Cheers,
  Gianpiero