Comments (7)
At first glance you're using spin_some
in the publish loop and then sleeping until the next publish. I would expect that you then are only giving rclcpp the opportunity to check for incoming messages each time you publish, which thus causes your latency to be correlated to your publish frequency.
I'd suggest refactoring to make sure to have spin active all the time by putting it in a dedicated thread. Or even simpler would be to setup a timer to trigger your publish events and then you can just call spin in the main thread.
from rmw.
Hello,
thanks for your replay. This makes sense and was very helpful. Now the latencies are constant over the frequency. This is totally what we expected. But there is a new observation: During the transmission data losses occur over a longer time. This leak time increases with the frequency and occurs only with WLAN connections. Have you an idea why this happens?
Obeservations
D-Link DIR-645 (LAN)
TP-Link M7350 (5 GHz WLAN)
TP-Link M7350 (2G4 Hz WLAN)
Setup
Now I seperate the sender and receiver tasks in two classes. The sender has an own thread for his work, while the receiver only bind the callback function to the topic. The spin
comes directly before the class-destructors inside the main function:
// initialize ROS2
rclcpp::init(argc, argv);
// initialize a node
auto node = rclcpp::node::Node::make_shared(flzNodeName);
// take a reference time stamp
auto t_start = std::chrono::steady_clock::now();
auto *iomReceiver = new test::IomReceiver( node, flzNo, t_start );
auto *iomSender = new test::IomSender( node, flzNo, t_start, freq );
rclcpp::spin(node);
delete iomReceiver;
delete iomSender;
The QoS-profile is again rmw_qos_profile_sensor_data
.
from rmw.
When using best-effort I would expect messages to be lost when being sent over a wireless connection. If packet collision happens the message will not be resend and therefore never be received. If you switch to reliable that should not happen.
from rmw.
Yes this is clear. But what I don't see why this happens in that way. The network has totally only this two "members" and only this data exchange. Over a longer period with some hundred messaged all goes perfectly. And then comes a short period of collisions? Why, all of a sudden, collisions? Maybe there is something black magic from the router?
To solve this by setting the profile to be reliable truly is a way. But on our 400 Hz measurement this will lead to hold maybe up to 80 messages. Is it right to say this will additionally increase the data traffic? If it is so I think maybe it is a good thing to think about the reasons for this. Because the bandwidth is limited and we go to have up to 10 IOMs in a further development step.
from rmw.
You might want to run wireshark on that interface and look at the exchanged packets. A lot of stuff is going on in a (wireless) network even if it is "idle" from the user point of view.
from rmw.
Yeah - I think we should examine this. Sad, that the small modern mobile routers don't support a good QoS-set-up to avoid disturbing parallel communications. (DIR-645 <> DIR510L / TP-Link M7350)
On a DIR-645 it's possible to set up priorities and it seems to lead to better results.
from rmw.
@Alex031544 I'm going to close this due to the low activity for a while. If you want to share the results of your investigation, please feel free to comment here and we can reopen this if needed
from rmw.
Related Issues (20)
- rmw_time_t is redundant with rcutils_duration_value_t and doesn't need to be a struct HOT 9
- Implement info structure with timestamps for services HOT 1
- Add support for `on sample lost` event HOT 8
- test_names_and_types failing on Linux HOT 4
- [Draft] ContentFilteredTopic Support HOT 4
- fastrtps communication over other network HOT 1
- Add ability to pass in allocator for some methods HOT 8
- Push notification on publisher/subscription match HOT 3
- Clarify the error codes in serialized_message.h
- Add ability to confirm reader receive all sent messages HOT 18
- Get most compatibility QoS policies given QoS for multiple endpoints HOT 4
- [feature request] Expose functionality to discover, read and send serialized services
- Change `rmw_take_response()` `request_header` param/variable name
- Inconsistent documentation with code HOT 5
- Add documentation on uniqueness of node, topic, and service names HOT 1
- Configure maximum DDS participants in a generic way HOT 3
- prolem: Is there performance test about zero copy between cyclonedds and fastdds? HOT 2
- Connect/Disconnect notification/callback support HOT 44
- Warning about history depth of 0 even while using system default QoS HOT 2
- Where are defined rmw_init & rmw_shutdown ? HOT 1
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 rmw.