TF Listener Explanation

asked 2019-10-01 10:01:30 -0500

I have been going through the ROS tutorial for TF using C++. I understand how the code works except for one thing. In the TF listener C++ code, I don't understand how the follow lines work.

vel_msg.angular.z = 4 * atan2(transform.getOrigin().y(), transform.getOrigin().x()); vel_msg.linear.x = 0.5 * sqrt(pow(transform.getOrigin().x(), 2) + pow(transform.getOrigin().y(), 2)); turtle_vel.publish(vel_msg);

How are the equations for angular and linear velocity determined, and how exactly do they affect the movement of the turtle, respectively. Additionally, what exactly is the Origin in the case, and what point does the turtle rotate around in terms of the angular velocity?

edit retag flag offensive close merge delete