ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The command line arguments are interpreted as yaml. However bash is parsing it before it runs. You either need to escape the quotes or quote the quotes otherwise they yaml parser will interpret it as a integer, which does not match str type.

Try:

$ rostopic pub /topic_name std_msgs/String \"123\"

Or:

$ rostopic pub /topic_name std_msgs/String "'123'"