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

answered 2013-01-31 10:21:34 -0500

joq gravatar image

It would be something like this:

#include <std_msgs/Int8.h>

msg.data = 17;
ROS_INFO("%d", msg.data);
chatter_pub.publish(msg);

It would be something like this:

#include <std_msgs/Int8.h>

std_msgs::Int8 msg;
msg.data = 17;
ROS_INFO("%d", msg.data);
chatter_pub.publish(msg);