ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
From what I understood, you want to use image instead of the actual world co-ordinates for localization and your sensor gives out x,y value. Now I am assuming that the sensor output is in meters and in the world co-ordinate. So as far as odometry goes, it's a problem of mapping the image (pixel information) to the world (meter information in the actual world). Example: 1m of Robot motion = 1 Pixel in image. This will depend on the position of the camera when the image was taken (the height of camera, angle and the frame resolution). But if you are drawing your image it's up to you to draw an image as a top view to the world and scale your pixels according to world (example: 10mX 10m of your world [where robot is going to move] will map to 640x480 px.) So now you'll have a relation between image and world. Not to locate your Turtlebot, ideally you should start at 0,0 of image which will be 0,0 of world. And with the x,y information from the sensor you can map that to the image to view the robot position in image. Now if you want to set a goal, it is just a path planning problem. You can you algorithms like A-star and find waypoints. These points can be calculated in image and then mapped to world and given to the turtlebot for actual motion. If you can be a bit more clear with your question, I think I will be able to answer this better.