Skip to main content

Crate moqros_cli

Crate moqros_cli 

Source
Expand description

Shared plumbing for the moqros bridge binaries.

Structs§

Bridges
What a bridge node does: ROS topics to publish to the relay, and broadcasts to republish on ROS.
BroadcastSpec
A broadcast for moqros-sub: BROADCAST[,topic=…][,type=…][,frame_id=…].
EncoderArgs
Video encoder flags.
PubTopic
What moqros-pub does with one topic.
QosArgs
ROS QoS flags.
Relay
The relay connection of a bridge node: a publisher for its topics, a subscriber for its broadcasts, or both over one connection.
RelayArgs
Relay connection flags.
SharedNode
A node shared between spawn_spinner and code that adds subscriptions while it spins.
Spinner
Stops the spawn_spinner thread when dropped.
SubBroadcast
What moqros-sub does with one broadcast.
TopicSpec
A topic for moqros-pub: TOPIC[,format=…][,type=…][,mode=…][,broadcast=…].

Enums§

Format
What moqros-pub sends.

Constants§

DEFAULT_SUB_TOPIC
Topic of a lone broadcast that neither topic= nor --topic names.

Functions§

check_no_loop
Refuse a bridge that would feed its own output back in: a broadcast or a ROS topic that both directions use. Every message would go round the loop forever.
init
Create the ROS node and parse T from the command line and the node’s ROS parameters.
init_logging
pub_topics
Fill in each topic’s options from the flags: format and mode apply to every topic, while ros_type and broadcast name one topic, so they need exactly one.
run_bridges
Run bridges until one of them ends, the relay connection gives up, or SIGINT or SIGTERM arrives (which closes the connection first, so the relay ends this node’s broadcasts and subscriptions right away).
shutdown_signal
Resolves with the signal’s name on the first SIGINT (Ctrl-C) or SIGTERM (docker stop, systemd), so the bridges can close their relay connection before exiting.
spawn_spinner
Spin node on a blocking thread until the returned guard is dropped.
strip_ros_args
Drop the ROS arguments (--ros-args … [--], possibly repeated) from args.
sub_broadcasts
Fill in each broadcast’s options from the flags. topic and ros_type name one broadcast, so they need exactly one. Without either topic= or --topic, a lone broadcast goes to DEFAULT_SUB_TOPIC, and each of several to /moqros/<broadcast>.