TDMA Slotted Aloha, TDMA Manual Transmit, TDMA bug fixes and lots of new CI testing for TDMA
Breaking Changes
-
TdmaStatusadded fieldslot_duration_seconds. - removed the following dynamic reconfigure params from
tdma_advanced(also effectstdma_scriptedandtdma_slotted_alohasince they usetdma_advanceds' dynamic reconfigure method on top of their own). These params were mostly unused. The only tdma node where you can set slots with dynamic reconfigure istdma_slotted_aloha(and onlyaloha_slots).active_slots_nav_slots_comms_slots_
-
tdma_nodewill no longer run with a configuration that does not allow transmit because of padding and self imposed guard time. If intentional, this forces users to make use oftdma_advanced'ssoftware_mutefeature (this is the tested and maintained code path for software mute with TDMA). If unintentional, this draws attention to the configuration mistake immediately. -
tdma_scriptedburns it's very first active slot after enabling a test plan (or when it is reloaded or changed with dynamic reconfigure). Burning the first slot means we can depend on the test plan order (defined in the yaml file). - changes to:
TdmaAdvancedStatus.msg,TdmaScriptedStatus.msg,TdmaSlottedAlohaStatus.msg. Switching from nested message types for super class, to a flat message type. e.g.,we_are_active, etc.. is now at the top level of these messages. Previously they were nested in the super classes type.-
active_slotschanged field type from int8 to int8[]. -
nav_slotsis now a list type (int8[]) -
comms_slotsis now a list type (int8[]) -
time_to_next_activein the context oftdma_slotted_alohait means time to next own slot or aloha slot (which ever is closest)
-
-
GetNextPacketData.srvchangedmin_prioritytominimum_priorityto match other calls. -
GetNextPacketData.srvandGetNextQueuedMessage.srv,minimum_priorityis type:int8. - Setting all instances of
minimum_priorityandpriorityto type:int8.
New Features / Improvements
- New Node:
tdma_slotted_alohauses queue priority to gate traffic sent in thealoha_slots. -
tdma_slotted_alohaadds priority gating and a special kind of slot calledaloha_slots-
aloha_slot_prioritycondition:msg.priority >= aloha_slot_priority, msg can be transmitted duringaloha_slot. Otherwise this msg can only be transmitted in our own slot. -
aloha_slotsare slots that have a minimum priority and are typically shared with other platforms. -
aloha_slotsallow traffic with high enough priority to be sent during this "group" slot. The traffic can also be sent in the dedicated slot. But only traffic with priority >=aloha_slot_prioritywill be transmitted during thealoha_slots -
aloha_slotsare allowed to:- be outside of
active_slotscompletely (intended use) - overlap with
active_slots(ifactive_slotsare subset ofaloha_slotsthis is only allowed whenallow_aloha_slots_only=True) - be a list of slots
- be outside of
-
-
tdma_slotted_aloharosparamallow_aloha_slots_onlyby defaultFalse. WhenTrue, it allows a configuration with onlyaloha_slotsand no slots of our own i.e.,active_slotsis a subset ofaloha_slots. - New
DynamicReconfigurefortdma_scripted(overlaid ontdma_advancedDynamicReconfigure)-
scripted_test_plan_enabled, default True ifscripted_test_planyaml is passed -
scripted_test_plan_file, filename for test plan yaml -
parse_test_plan_file_again, toggle to reload test plan
-
- New
DynamicReconfigurefortdma_slotted_aloha(overlaid ontdma_advancedDynamicReconfigure)aloha_slot_priority-
aloha_slots_, trailing '_' for this dynamic reconfigure param. This allows changing thealoha_slotsafter launch.
-
message_queue_nodecan now gate on a minimum priority. To gettdma_slotted_alohaworking,message_queue_nodeneeded the plumbing for minimum priority. It now has it buttdma_slotted_alohais the only node that uses it currently (TODO: add priority slots totdma_advanced? )
- Added system in tdma super class (
manual_transmit_queue) for sending modem nmea messages manually to be queued by tdma and sent in active slot (in place of next packet) - new rosparam
~maxlen_manual_queuedefault: 1 - new rostopic
tdma/manual_transmit_statustypediagnostic_msgs/DiagnosticStatus. It shows the contents of all manual transmit queues on insert and on transmit - User publishes to
nmea_to_modemtopic inside oftdma/namespace andtdmawill hold up to~maxlen_manual_queuemessage(s) and publish them (one at a time) instead of the next outgoing packet during ouractive_slot. - If using a value > 1 for
maxlen_manual_queue,tdmawill work through themanual_transmit_queueuntil it's empty. It will treat each nmea sentence like a packet with the samepacket_length_secondsandguard_time_seconds. It will only transmit one message from this queue at a time so large values formaxlen_manual_queueare not recommended as tdma needs to work through the whole queue before getting back to packets.
- New ci test node:
test_tdma_slotted_aloha.py - test cases for
tdma_slotted_aloha-
test_high_pass()- publishes 3 msgs (on low priority topic) to a node with only aloha slots so it must timeout to pass
-
test_low_pass()- publishes 1 msg on high priority topic, confirms it's next rx.
-
test_collision()- makes sure we're not active and at least 1 slot away from shared
aloha_slot - creates subscriber for
/modem0/from_acomms/test_msg_alohaand/modem1/from_acomms/test_msg_aloha - publishes 1 msg on modem0 high priority topic (
/modem0/test_msg_aloha),priority: 80 - publishes 1 msg on modem1 high priority topic (
/modem1/test_msg_aloha),priority: 80 - when callback set for subscribers has set modem0_last and modem1_last, we check that the time delta and values indicate a collision (which we expect)
- makes sure we're not active and at least 1 slot away from shared
-
test_low_priority()- publishes 3 msgs on low priority topic
- makes sure we recv all of them on rx side
-
-
tdma_scripted_nodenow sets rosparam server and attempts to delete rosparam server so re-launch does not use old cached value -
tdma_slotted_alohanow has~aloha_slots = []by default for test cases -
test_ros_acomms.pyremoved always_send_test_data case as test_tdma_extended.py now tests this case -
test_tdma_extended.pytest cases added:manual_transmit_queue-
manual_transmit_queue, with always_send_test_data software_mutealways_send_test_data-
always_send_test_data, with miniframe data -
always_send_test_data, with dataframe data
-
test_tdma_scripted.pycases added:-
test_cycling_rates_one_per_slot- passing criteria, cycle rates from test plan one packet per slot, rates in order from test plan
- [1,3,5,1,3,5,1,3,5], [5,1,3,5,1,3,5,1,3], [3,5,1,3,5,1,3,1,5] are valid
-
test_cycling_rates_three_per_slot- passing criteria, cycle rates from test plan 3 packets per slot, so ALL 3 rates from test plan in test plan order per slot twice.
- ONLY [1,3,5,1,3,5] is valid
-
test_cycling_rates_six_per_slot- passing criteria, cycle rates from test plan 6 packets per slot, so ALL 3 rates from test plan in test plan order twice per slot. Then confirm this pattern in the next active slot
- ONLY [1,3,5,1,3,5,1,3,5,1,3,5] is valid
-
Bugfixes
- pipeline now uses tag:
pipeline_$CI_PIPELINE_IDinstead oflatest- e.g.,
ros_acomms-tests:latestis nowros_acomms-tests:pipeline_$CI_PIPELINE_ID
- e.g.,
-
tdma_scripted-
#40 (closed)
tdma_scriptedwill burn it's very first active slot IF there is an active test plan. This assures the rates/buffer sizes are cycled according to the test plan from the very first packet in the slot. -
#40 (closed)
tdma_scriptedsets the parameters for the first transmit from the test plan rather than using values passed in launch for first TX - #40 (closed) when the test plan is toggled on from an off state (or it's re-read while running via dynamic reconf) the next active slot will be burned (in case the user toggled during an active slot. This keeps the code simple for handling this case and we won't activate a test plan mid slot)
-
#40 (closed)
-
tdma_node,tdma_slotted_aloha_nodeadded more informative error messages. -
active_slotswas never allowed to be an empty list but, now the error is more clear and the condition is checked more explicitly.- if
active_slotswas previously set, tdma will keep the prioractive_slotsrather than raise an Exception (general M.O. only raise exc right away but once we have launched, do everything in our power to keep system up)
- if
-
tdma_slotted_aloha_nodeadded new rosparamallow_aloha_slots_only. By default this isFalseand should only be true in a special case (or for CI testing)- when
allow_aloha_slots_onlyis True, the user is allowed to have a tdma configuration with only aloha slots and none of it's own. - when
allow_aloha_slots_onlyis False, the user cannot configure tdma to only have aloha slots. It will raise an exception right away.
- when
Notes
- The
manual_transmit_queuesystem is for sending nmea messages to the modem that make the modem transmit. There is only one topic logically compatible right now and it's thenmea_to_modemin the modem namespace tdma is currently servicing. - in the future there may be other topics or ways of using this manual transmit system. For now, it's just a simple interface for nmea commands that you want to send in band with tdma
- Example for manual transmit:
- user publishes to
$CCACM,1,1,1,CCCFG;pwramp.txlevel;0to/modem0/tdma/nmea_to_modem -
$CCACM,1,1,1,CCCFG;pwramp.txlevel;0is now queued to transmit next - when
tdma_status.we_are_activeand ready to send a packet, we instead publish$CCACM,1,1,1,CCCFG;pwramp.txlevel;0to/modem0/nmea_to_modemwhich in this case will make the modem transmit this CCACM.
- user publishes to
Edited by Caileigh Fitzgerald