Go to the documentation of this file. 1 #include <boost/bind/bind.hpp>
3 #include <turtlesim/Pose.h>
4 #include <geometry_msgs/Twist.h>
5 #include <std_srvs/Empty.h>
36 return g_pose->angular_velocity < 0.0001 &&
g_pose->linear_velocity < 0.0001;
46 geometry_msgs::Twist twist;
47 twist.linear.x = linear;
48 twist.angular.z = angular;
150 int main(
int argc,
char** argv)
159 std_srvs::Empty empty;
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
void forward(ros::Publisher twist_pub)
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(AdvertiseOptions &ops)
void timerCallback(const ros::TimerEvent &, ros::Publisher twist_pub)
void stopForward(ros::Publisher twist_pub)
int main(int argc, char **argv)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
void stopTurn(ros::Publisher twist_pub)
void commandTurtle(ros::Publisher twist_pub, float linear, float angular)
Timer createTimer(Duration period, const TimerCallback &callback, bool oneshot=false, bool autostart=true) const
void poseCallback(const turtlesim::PoseConstPtr &pose)
turtlesim::PoseConstPtr g_pose
void turn(ros::Publisher twist_pub)
turtlesim
Author(s): Josh Faust, Dirk Thomas
autogenerated on Sat Apr 12 2025 02:28:03