orjano-max / ORJANOS_MASTER_REPO

This is the github repo for orjano's master thesis
1 stars 0 forks source link

Publish a topic in ros2 from terminal #12

Open orjano-max opened 1 year ago

orjano-max commented 1 year ago

This is useful for testing.

Example: The example below publishes a message on the topic "/vx300/action". The ~--once~ flag, specifies that the message should only be published once. The message type is defined by "std_msgs/msg/String" In this example, a string saying "place" is published. "data" is where the message is contained

ros2 topic pub --once /vx300/action std_msgs/msg/String "data: place"