# How to compute angular velocity from linear velocity?

Hi, I get linear velocity (linear.x and linear.y) in geometry_msgs/Twist message. But the robot is controlled by linear.x and angular.z. So I want to ask how to calculate angular.z from linear.x and linear.y.

Please edit your question and explain why you want to do this. Are you using move_base? In a properly configured move_base, this calculation should not be necessary because the Local Planner is expected to comply with the robot's physical motion restrictions.

My problem is in pedsim. I want to control the robot there. In pedsim, controllable by rqt_robot_steering. However, there is an algorithm to calculate robot control parameters in this environment . Its results are in topic /pedsim_simulator/robot_position. I want to use this result for control. In this topic, there are 2 parameters: linear.x and linear.y. But controlling the robot in pedsim will use linear.x and angular.z. So I want to find a way to convert this.