33 #include <geometry_msgs/Twist.h> 38 int main (
int argc,
char *argv[])
43 printf (
"Usage: testdrive host[:port]\n");
47 printf (
"Connecting to server at %s\n", argv[1]);
48 nh.initNode (argv[1]);
50 printf (
"Advertising cmd_vel message\n");
51 geometry_msgs::Twist twist_msg;
55 printf (
"Go robot go!\n");
58 twist_msg.linear.x = 5.1;
59 twist_msg.linear.y = 0;
60 twist_msg.linear.z = 0;
61 twist_msg.angular.x = 0;
62 twist_msg.angular.y = 0;
63 twist_msg.angular.z = -1.8;
64 cmd_vel_pub.
publish (&twist_msg);
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
int main(int argc, char *argv[])