-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prioritize broadcast commands #30
Conversation
The current scheduler several issues: 1.) automatic pings are sent in a round robin fashion. For example, consider the case where we have 10 CFs, with only one being busy to send commands. Then, we will send pings to 9 CFs, artificially delaying the 1 important connection. => Solution: Only send a ping if all connection queues are empty. 2.) Broadcasts are handled like unicast connections, even though these are typically low-latency connections. => Solution: Prioritize all broadcasts before sending any unicast commands 3.) We sometimes reconfigure the radio, even if nothing needs to be done => Solution: check before the radio is reconfigured
Adding @ataffanel, since this is important also for Crazyradio2 on-board scheduling. I hope that there will be proper support for broadcasts:-)? |
Packet scheduling is an interesting topic and indeed a good thing to think about in the context of Crazyradio2. As for your current changes I have some comments:
|
For both cases, I am actually planning to add some monitoring component that can warn the user if a connection is starved. It might even be possible to measure latency using the echo port semi-continuously and issue a warning if starving occurs (which likely means that there are too many connections per radio). For Crazyswarm2, this is tracked in IMRCLab/crazyswarm2#209. I think we would need something similar for Crazyradio2 (i.e., a way to query statistics that we can use to warn users in undesirable cases). It might also make sense to revive the |
Sorry for the delayed answer.
As for CRTP, we are currently starting to work on the new comm stack, the first step is to separate CRTP from the rest of the firmware: handling binary packet in on separate module and calling APIs in the Crazyflie. This should make experimentation, like realtime, much easier in the future and will also allow to test other protocol. Realtime and prioritization requirements are actually very interesting to think about when we make a new protocol. |
Was there any progress at the new com stack @ataffanel ? How would you feel about this prioritization, if a user of this library can provide a priority for each packet? Then the client library can decide what's important (and Crazyswarm2 would use the lowest priority for broadcasts). This also solves the problem that the CRTP priorities are not necessarily logically anymore, i.e., a user-library can re-order to make cmd's more important than logging. |
Not much unfortunately, we will likely be focusing on it from January together with the new unified lib.
This sounds good to me. |
The current scheduler several issues:
1.) automatic pings are sent in a round robin fashion. For example, consider the case where we have 10 CFs, with only one being busy to send commands. Then, we will send pings to 9 CFs, artificially delaying the 1 important connection.
=> Solution: Only send a ping if all connection queues are empty.
2.) Broadcasts are handled like unicast connections, even though these are typically low-latency connections.
=> Solution: Prioritize all broadcasts before sending any unicast commands
3.) We sometimes reconfigure the radio, even if nothing needs to be done
=> Solution: check before the radio is reconfigured