I want to make a turtle pursue other turtle. And I also want to use geometry message twist. I dont know what is the problem of my code!!

asked 2018-09-12 15:11:14 -0500

lablab gravatar image

updated 2018-09-13 12:39:15 -0500

jayess gravatar image

these are my functions that print the position of my turtles but there is a problem! when i run it the printed positions are same but in fact they are not!

void chatterCallback(const turtlesim::Pose::ConstPtr& msg)
{
 m=x;
 n=y;
 x=msg->x;
 y=msg->y;

  ROS_INFO("I heard: [%f],[%f]", x,y);
}

void chatterCallback1(const turtlesim::Pose::ConstPtr& msg)
{
 a=msg->x;
 b=msg->y;

  ROS_INFO("ey baba: [%f],[%f]",a,b);
}
edit retag flag offensive close merge delete

Comments

1

You may want to take a look at this tutorial: http://wiki.ros.org/tf/Tutorials/Writ...

ahendrix gravatar image ahendrix  ( 2018-09-12 15:16:43 -0500 )edit

I think that what you posted is not enough to answer your question, please update your question with minimal working example to allow other reproduce your problem.

luk.mitka gravatar image luk.mitka  ( 2018-09-13 01:35:28 -0500 )edit