Created
March 7, 2022 22:37
-
-
Save jhurliman/0a6dd029dd1261d8ef0b52499e1abd55 to your computer and use it in GitHub Desktop.
ros2 topic pub examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# volatile, no history | |
ros2 topic pub -r 0.5 --qos-durability volatile --qos-reliability reliable /chatter std_msgs/msg/String '{data: hello}' | |
# transient_local, history of 5 | |
ros2 topic pub -r 0.5 --qos-durability transient_local --qos-reliability reliable --qos-depth 5 --qos-history keep_last /chatter std_msgs/msg/String '{data: hello}' | |
# foxy compatible transient_local | |
ros2 topic pub -r 0.5 --qos-durability transient_local --qos-reliability reliable /chatter std_msgs/msg/String '{data: hello}' | |
# /tf_static | |
ros2 topic pub -r 0.5 --qos-durability transient_local --qos-reliability reliable /tf_static tf2_msgs/msg/TFMessage '{transforms: [{child_frame_id: "child", header: {frame_id: "parent", seq: 0}, parent_frame_id: "parent", transform: {rotation: {w: 1, x: 0, y: 0, z: 0}, translation: {x: 0, y: 0, z: 0}}}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment