Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ros2 publish message command line

# ros2 topic pub --once <topic> <message type> <data>
ros2 topic pub --once /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}"
Source by docs.ros.org #
 
PREVIOUS NEXT
Tagged: #publish #message #command #line
ADD COMMENT
Topic
Name
3+8 =