Skip to content

Inconsistency between protocol doc and code #1012

@ahoenerBE

Description

@ahoenerBE

Description
I'm currently working on a PR to RosLibJS and noticed some inconsistency between the protocol doc and the actual code.

e.g. In Advertising, rosbridge / roslib add fields latch and queue_size to the packet and are pulling them from the message

# rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/advertise.py
def advertise(self, message):
        # Pull out the ID
        aid = message.get("id", None)

        self.basic_type_check(message, self.advertise_msg_fields)
        topic = message["topic"]
        msg_type = message["type"]
        latch = message.get("latch", False)
        queue_size = message.get("queue_size", 100)
        # snip...

But the protocol document doesn't include these fields. Latch is mentioned briefly in its own section, and the phrase queue_size doesn't appear in the entire document.

#### 3.3.1 Advertise ( _advertise_ )

If you wish to advertise that you are or will be publishing a topic, then use the advertise command.


{ "op": "advertise",
  (optional) "id": <string>,
  "topic": <string>,
  "type": <string>
}


 * **topic** – the string name of the topic to advertise
 * **type** – the string type to advertise for the topic

   * If the topic does not already exist, and the type specified is a valid
     type, then the topic will be established with this type.
   * If the topic already exists with a different type, an error status message
     is sent and this message is dropped.
   * If the topic already exists with the same type, the sender of this message
     is registered as another publisher.
   * If the topic doesn't already exist but the type cannot be resolved, then
     an error status message is sent and this message is dropped.

It seems like publishers/advertisement use queue_size and subscriptions use queue_length?

Is this intentional? Are these fields no longer supported? Looking for some answers to guide my development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions