ROs physical movements
Hi everyone,
I am currently studying ROS and actually I had my internship in a robotic firm using ROS, controlling robotic arms but the system was already set up when I was there. So I was wondering how physical world is being applied to ROS.
To give an easy example. Suppose we have 2 wheeled mobile robot. One base_link which is a box shaped body and 2 wheels, left and right.
Using joint_state_publisher, I can rotate the wheels by publishing rotation angles between -pi and pi. Using tf (odometry) I can move the base link around, I can even make it move in a circle around a center.
So here is my question, how can I make my robot move as my wheels turn just like a real world car. I mean, I can use tf to move my car, yes, but this is not real. I am just manipulating its location in space and in the meantime I can rotate my wheels or not, it doesn't matter. How can I tell my ROS environment: " Hey this is the surface that you will be moving on. So you will placed on it. And then if I move the wheels, then the whole robot will move and it will travel a distance regarding to the diameter of wheels and the speed will also based on wheels"
So you may say, "Hey you gave your answer already, this is literally how it works, you need a surface etc". What I am wondering is, do I need to write a code and calculate the travel distance simply using (2pir) and then manipulate the tf according to this distance?
To sum up my question, what we see in ROS simulation such as rviz, gazebo or moveit whatsoever, is it just a manipulation of tf? Is something physical happening there? Or can it really understand "Oh this wheel is turning and it is touching to the ground and physically it must travel a distance because this is how it works in real world"
Or let's just answer that question. If you create a basic cylinder and make it roll from A to B, how would you do it?