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

hi
in this code

ros::Publisher local_pos_pub = n.advertise<geometry_msgs::posestamped> ("chatter", 2);

chatter is the name of topic and you can change to what you want in this "part advertise<geometry_msgs::posestamped> " you set the msg type in this case is geometry_msgs::posestamped

hi
in this code

ros::Publisher local_pos_pub = n.advertise<geometry_msgs::posestamped> ("chatter", 2);

chatter is the name of topic and you can change to what you want in this "part advertise<geometry_msgs::posestamped> part "advertise<geometry_msgs::posestamped> " you set the msg type in this case is geometry_msgs::posestamped