Let's say the robot is at the origin(O) at the beginning. The goal is to move the robot to points A,B,C. If the robot is at point A at the first step and the next step I want to move it to B, then it has to go to B directly without going back to the origin.
I guess in ROS, we always have the origin at the robot. Hence, when the robot is at A. I don't know how to move it to B directly without knowing the position of the robot in the map. This comes to my question. I want to transform from robot_base coordinate to global coordinate. I tried rosrun tf tf_echo /map /base_link but it does not work.
Then I move the robot to point1. Then after that I want to move it directly to point 2 with respect to the initial position (point0) without going back to point0. I do not know how to deal with this without knowing the global position of the robot.
Is there any way I can get the robot global position? If I know this ,it will make my life very much easier.
↧