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

1) Create an object of the ROS Msg/Srv. 2) Use the dot operator. Example:

include "std_msgs/String.h"

std_msgs::String msg; msg.data = "Hello World";

click to hide/show revision 2
No.2 Revision

1)

  1. Create an object of the ROS Msg/Srv. 2) Msg/Srv.
  2. Use the dot operator. operator.

Example:

include "std_msgs/String.h"

#include "std_msgs/String.h"
std_msgs::String msg;
msg.data = "Hello World";

World";