Skip to content

Specify services and topics for rosbridge #985

Answered by harsh-pal-robotics
hck007 asked this question in Q&A
Discussion options

You must be logged in to vote

You need to pass the paramater as this:

topics_glob = "'topic_a'",'topic_b','topic_c'"
services_glob = "'service_a','service_b','service_c'"

This where the params are being parsed in the rosbridge script:

element.strip().strip("'") for element in value[1:-1].split(",")

This helper function can convert an array of strings into the glob param for rosbridge in your launch file:

def parse_globs(globs: list[str]) -> str:
    return ",".join([f"'{glob}'" for glob in globs])

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hck007
Comment options

Answer selected by hck007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants