ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can check this
http://stackoverflow.com/questions/4855823/get-mouse-deltas-using-python-in-linux
and this
http://www.daniweb.com/software-development/python/code/230886/get-the-mouse-position-on-the-screen-on-linux
The Python code to get mouse coordinates on the screen is really short and you can easily integrate it into your project. In that case you maybe need to calibrate by yourself the ratio between Pixels/Meters by doing some tests. If the mouse gets stuck at the border of the screen you could also implement something to automatically take the mouse to the opposite border such that it could continue moving.
If you are more into hacking hardware and getting directly odometry data without plugging the mouse to a computer then check this :
http://blog.jgc.org/2012/09/conversion-of-cheap-optical-mouse-to.html