Comments (6)
As output Ports are not buffered, all new data is dropped until the data was completely written to the connected input ports.
That's only partially true. For remote connections Orocos adds a local buffer per remote connection for output ports and the write calls never block on Corba. For buffer connections this additional local buffer can also hold multiple elements and unless this buffer is full, no samples will be lost. A Corba dispatcher thread (one per component) is then emptying the local buffer. Unless one-way writes are enabled (compile time option since #123) the dispatcher writes one sample at a time and indeed waits for the remote end to acknowledge, which, for low-bandwidth or high-latency connections could result in dropped samples in the output buffer. But local connections should not be affected by that.
Did you actually observe something different?
from rtt.
Hi,
I experienced the problem on master, i guess because #123 is not merged yet.
from rtt.
#123 added the compile-time option to switch to one-way writes, but the Corba dispatcher thread already existed much longer, probably since the beginning of the RTT corba transport plugin. The responsible code is in RemotePorts.cpp:177 and following on master. The dispatcher is triggered in RemoteChannelElement::signal() in RemoteChannelElement.hpp:132 and then calls RemoteChannelElement::transferSamples() to actually empty the buffer and forward to Corba in a non-realtime context.
So any remote connection of an output port should not be able to delay the samples written to another local connection to the same port (or at least not more than an additional local connection) and definitely not directly call into the Corba middleware. If that would be the case, it would be a bug.
I was not able to run your original example from #122 because I am not familiar with orogen and simply running orogen -v oneway_test.orogen
results in this error on my Ubuntu Xenial system using the toolchain-2.9 branches of all toolchain packages, which contain all patches from the respective master branches. Can you either help with that problem or provide CMake code and a deployment script to run the example without orogen?
from rtt.
So any remote connection of an output port should not be able to delay the samples written to another local connection to the same port
Ok, perhaps there is a Information missing: the "local connection" is also a corba connection, but "locally on the same PC". So both connections are using corba.
https://github.com/orocos-toolchain/rtt/blob/master/rtt/transports/corba/RemoteChannelElement.hpp#L342 this corba write blocks until the transmission is complete, so also transferSamples() and signal() is blocking.
If a new signal() is arriving while the old is still running (blocked), i guess it is not executed. I also guess that the port data content is overwritten in this case or am I wrong?
from rtt.
Yes, in that case your observations perfectly make sense. What @doudou proposed in #227 might be a solution then.
from rtt.
The multi-dispatcher setup is IMO the best solution to segregate domains (UI vs. system, reliable vs unreliable).
On single-host machines, you could also workaround by using the MQ transport, which would not have the same issue.
from rtt.
Related Issues (20)
- no boost / RTTv3 HOT 1
- clarification on copyright HOT 3
- 2.9.1 ros debian package fails to install HOT 5
- Massive deadlocking when disconnecting connections in parallel HOT 2
- Portable install space HOT 10
- Omniorbpy
- rtt does not support const array ?
- orocos with imcompatiable gcc version (7.4) HOT 1
- cleanupHook called twice after in runtime -> exception -> cleanup
- sample given to setDataSample seem to sometimes "leak" to the other side HOT 3
- catkin build err HOT 2
- PluginLoader::loadTypekits throws boost::filesystem_error for "File name too long" with long path_list
- Problems installing OROCOS under Linux-RTAI/Xenomai HOT 4
- Value parse problem with user defined data in a property bag
- Windows build broken
- Could not allocate configuration semaphore 'sem' for ***,Throwing std::bad_alloc. HOT 1
- Orocos on raspberrypi 3b+ HOT 4
- How to properly configure services
- Communication between OROCOS components via Ethernet network HOT 3
- Deadlock when the input event port is disconnected from the output when the connection is active
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtt.