0
$\begingroup$

Rosanswers logo

Hi guys,

I am currently looking at using odometry with the position given by an optical mouse.

As I couldn't find any package/node driver that would allow me to have access to the position of the mouse, I was wondering if anyone had already looked into that and could give some feedback.

Thanks in advance for the replies


Originally posted by Antoine on ROS Answers with karma: 91 on 2014-07-01

Post score: 5


Original comments

Comment by ccapriotti on 2014-07-01:
Very good approach ! Thinking outside the box at its best !

Comment by Antoine on 2014-07-01:
can't really take any credit for that, many people have already successfully done what I'm trying to do :), just wondering if anyone has done with ROS

Comment by ccapriotti on 2014-07-02:
Since we are thinking outside of the box here, you could use two mouse-based sensors: one on the robot, close to the floor, and another on your wheel's surface (mechanics permitting) , so you could measure skidding, implement cliff-avoidance, and some other good stuff.

Comment by Antoine on 2014-07-03:
I am definitely interested in any idea that may help the odometry work better, although I do not see where you want to put the second sensor. Could you maybe draw a quick sketch or just elaborate a bit might be enough for me to understand?

Comment by Mehdi. on 2014-07-03:
I think he means to fix the second mouse above one of the wheels, with very small distance between the mouse's sensor and the wheels surface (wheel has to be flat in this case)

Comment by stevej_80 on 2015-11-26:
Hi, did you finally happen to work on this type of Odom? any good resources?

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Just adding the sketch as requested:

@Mehidi: Your description is right. Indeed, that was what I meant.

One comment: if the sensor on the base is too far from the floor, it may not work, or you will need lenses to focus/compensate the distance.

This also reduces the hight of your base and the possibility of going over obstacles.

But it is cheap, and tends to be precise: optical mouses can work with resolution of typically 300 dpi.

Quick explanation of sketch: gray wheel: free wheel. Black wheel (yellow core) drive wheels. "Robot" is mounted on a triangular base.

image description

Ok, so let's think about the possibilities on what kind of data you can gather from this.

The concept is simple physics: distance over time.

  1. If the wheel sensor reads movement, you can actually calculate the linear speed of the wheel.
  1. If the linear speed of the wheel and the linear speed detected by the base sensor are the same, you robot is moving.

  2. If the linear speed of the wheel is greater than the linear speed of the "floor", your drive wheel is skidding.

  3. If the linear speed of the floor is greater than the linear speed of the wheel, your robot is being dragged or going down a very slippery path.

  4. if the base sensor detects movement in the X and Y axes, your robot is either making a curve, or spinning. You can calculate angular speed of the curve, if you think you need it.

  5. If you detect that the wheel speed is fluctuating, your robot may be on some sort of low cohesion soil, like pebbles.


Originally posted by ccapriotti with karma: 255 on 2014-07-03

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by dornhege on 2014-07-03:
For tracking the wheels encoders seem more suited although they work the old fashioned style.

Comment by dornhege on 2014-07-03:
With regard to odometry from mice: If I remember correctly from experiments a few year ago your comment about the distance is indeed a problem. Unless you have a very flat surface like a table top (i.e. the same a mouse works on) it won't work.

Comment by Antoine on 2014-07-04:
Thanks for the sketch ccapriotti. So if the sensor on the wheel tells you that the wheel is rotating but the one at the back tells you that the robot isn't moving then you can tell that you're robot is skidding. Is that about right or can you actually get more out of your sensors?

Comment by Antoine on 2014-07-04:
I mean except for the position from the back sensor and the rotation direction of the wheel from the other sensor

Comment by Antoine on 2014-07-06:
Thanks ccapriotti for the explanation, you kept it nice and simple, I got it now. I strongly recommend the link to the first paper that Stefan Kohlbrecher gave, great practical solutions.

Comment by Antoine on 2014-07-07:
2nd link actually

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Mehdi. with karma: 3339 on 2014-07-02

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Antoine on 2014-07-03:
Thanks for the ideas Mehdi. My first approach was to get the real world coordinates of the mouse from the position of the cursor on the screen. But you can not use this method if you are ever to use more than one of these sensors, or at least I do not see how you could make it work.

Comment by Antoine on 2014-07-03:
I am actually using the rosserial_arduino package with an arduino Uno to read the data out of the sensor. Seems to works well enough, though I haven't put it on an actual robot yet.

Comment by Mehdi. on 2014-07-03:
Try it then , and keep us updated.

$\endgroup$
0
$\begingroup$

Rosanswers logo

If you put other lenses on the sensors you can actually get some distance between it and the surface. There´s been very interesting research on using mouse sensors for obstacle avoidance in UAVs as well as using multiple sensors on ground vehicles for highly accurate odometry. See for example http://www.et.byu.edu/~beard/papers/preprints/GriffithsSCMB05.pdf or http://botsnlinux.net/school_projects/mouse_paper_colloquium_22march11.pdf .


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-07-04

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.