Rosanswers logo


So I have this DAQ card called Labjack link , that I used as an interface to real world for a whole system. It will then take measurements from different sets of sensors, output commands or analog voltages, etc...

And, in an endeavor to maintain a modular software architecture, I would have liked to have several nodes, each managing a specific "low-level" functionality (because yes, it's not that low since it has to go through the daq first). For example, one node would retrieve data from my distance sensor and publish it to a topic, another node would receive speed commands from a subscribed topic and output them on Labjack.

The problem is, the daq card is connected to my PC via ethernet, and having multiple nodes able to send commands over this single connection could easily imply packet interference if two nodes try to use it at the same time.

So my question is, what would be the best way to deal with that? I considered several options, but I'm still unsure of which would be the best, or if there is a better solution I didn't think of.

  • I could have another node providing specific services corresponding to the different labjack's commands I want to use, so all the communication would be kept in a single process and processed one at a time, the other nodes would then have to call this services to send commands. But this will lose a bit of the modular architecture I wanted.

  • I could also have a shared memory space with a semaphore, containing the TCP socket, so each node would have to wait for the other to finnish their tcp communication before beginning a new one. But I fear this would be too complicated compared to the performance improvement it would bring.

  • Similarly, I read about nodelet, so I thought about having all the "low-level" functionnality in a single nodelet, so they could share memory, but this time only between threads. But it might be needlessly complicated too.

If anyone has comments/suggestions about this issue they would all be welcome :)

Originally posted by francoisdtf on ROS Answers with karma: 62 on 2015-06-23

Post score: 0


1 Answer 1


Rosanswers logo

I recommend you to take the First Type of Problem solver und programm an low level Proxy. witch
sherdmemory is not the fun to deal with.

Originally posted by duck-development with karma: 1999 on 2015-06-23

This answer was ACCEPTED on the original site

Post score: -1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.