Skip to content

v13.0.0 merge to master

Caileigh Fitzgerald requested to merge devel into master
  • Significant refactoring of message_queue_node.py. Added a ton of comments in-line.

Breaking Changes

  • Changes to the following message types:
    • TdmaStatus.msg, TdmaAdvancedStatus.msg, TdmaScriptedStatus.msg, TdmaSlottedAlohaStatus.msg:
      • added require_tags: str[]
      • added exclude_tags: str[]

New Features / Improvements

  • New feature added called "tags".
    • all TDMA MAC types support tags. For TDMA, the tags are associated with a slot. The rosparam is: ~slot_tags.
    • message_queue_node now supports tags:
      • on link layer queues and dynamic queues.
      • added Optional tag attr to QueueParams dataclass (list of strings).

(!153 (merged))

  • Updates to tdma_scripted_node to support sending modem commands without or without having transmitted a packet (cycle_on_tx_packet: false, default is True to preserve prior behavior)
  • tdma_scripted_node test_plan blocks keys are now optional. When nothing is passed for a block e.g., nothing is passed for miniframe_rate, tdma_scripted_node will just use the value it currently has set. This simplifies the test_plan yaml structure.

Bugfixes

  • message_queue_node:
    • fixed bug in query_dynamic_queues. Now checks if dest_address is None
    • now check that the highest priority packet codec can fit in the available space with the overhead

(!153 (merged))

  • Bug fixed to tdma_node that catch the timeout exc when message queue is not up with the service get_next_packet_data. Now handles that error by printing a message. Also wrapped future service proxy calls to get_next_packet_data in a try/catch and prints an informative error.

Notes:

We have created a tool called "tags". Tags are used for adding context to individual queues that can then be used for filtering while building a packet. The TDMA MAC uses tags slightly differently. Rather than a list of tags, TDMA creates a ~slot_tags structure which associates require_tags and/or exclude_tags (also includes optional minimum_priority) with a specific slot or range of slots. When TDMA is ready to build a packet for transmit, it will pass the tag information for the current slot to message_queue in the call to get_next_packet_data().

When TDMA makes the call to get_next_packet_data() it includes the set of require_tags and exclude_tags for THIS slot. For message_queue these are the setting it will use for the packet it returns from get_next_packet_data().

Tags are supported in dynamic_queues. The difference is, we don't manage those queues directly so we pass the tags information in the dynamic_queue query call for the client to manage directly.

Our current MAC type is TDMA but, this paradigm could be expanded to fit MACs other than TDMA. The service endpoints defined in GetNextPacketData.srv and GetNextQueuedMessage.srv defines the API for using tags.

How tag exclusion criteria works:

queue excluded has tag in require_tags has tag in exclude_tags
True True True
True False True
False ** False False
False True False

** Would be: True if there were require_tags this slot.

MAC Configuration:

Example of a ~slot_tags configuration:

slot_tags:
  - slots: 0-11           # settings for slots 0-11 (no tags in this one, just priority)
    minimum_priority: 10  # ** this minimum_priority will be overwritten in tagged slots below this one
  - slots: 2              # this is a set of tags for slot 2 (tags that cover slot ranges will be combined)
    minimum_priority: 50  # this will set the minimum priority for this slot (this will overwrite minimum_priority: 10 set ^^)
    exclude_tags:         # any queues with these tag(s) will not be transmitted in this slot
      - 'low_priority' 
      - 'images'
  - slots: 4-11        # this set of slot tags will be used for slots 4-11
    require_tags:      # any queues with these tag(s) WILL be transmitted in this slot (IF they don't have any on exclude list)
      - 'chat'         
  - slots: 4-11:2      # this set of slot tags will be used for slots 4-11:2 == (4,6,8,10)
    exclude_tags:      # any queues with these tag(s) will not be transmitted in this slot
      - 'images'
  - slots: 4,6,7       # this set of slot tags will be used for slots 4,6,7
    require_tags:      # any queues with these tag(s) WILL be transmitted in this slot (IF they don't have any on exclude list)
      - 'some_aloha'   
    exclude_tags:      # any queues with these tag(s) will not be transmitted in this slot
      - 'images'

Codec Configuration:

Example of tags defined for a specific queue in a codec yaml:

    - id: 100
      message_codec: default
      subscribe_topic: "chat_msgs"
      publish_topic: "from_acomms"
      ros_type: "std_msgs/Int8"
      default_dest: 121
      queue_order: fifo
      queue_maxsize: 10
      priority: 50
      tags:
        - 'chat'
      fields:
        data:
          codec: int8
    - id: 101
      message_codec: default
      subscribe_topic: "chat_images"
      publish_topic: "from_acomms"
      ros_type: "std_msgs/Int8"
      default_dest: 121
      queue_order: fifo
      queue_maxsize: 10
      priority: 50
      tags:
        - 'chat'
        - 'images'
      fields:
        data:
          codec: int8
    - id: 102
      message_codec: default
      subscribe_topic: "low_priority"
      publish_topic: "from_acomms"
      ros_type: "std_msgs/Int8"
      default_dest: 121
      queue_order: fifo
      queue_maxsize: 10
      priority: 50
      tags:
        - 'low_priority'
      fields:
        data:
          codec: int8

Merge request reports

Loading