2 #include <turtlesim/Pose.h> 3 #include <geometry_msgs/Twist.h> 27 geometry_msgs::Twist twist;
28 twist.angular.z = pose->angular_velocity;
29 twist.linear.x = pose->linear_velocity;
33 int main(
int argc,
char** argv)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ros::Subscriber pose_sub_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Publisher twist_pub_
void poseCallback(const turtlesim::PoseConstPtr &pose)
int main(int argc, char **argv)