03-29-2015 01:50 AM
Hi,
I want to plot the path of my robot by instaling a bluetooth mouse on it, so when the robot moves, the mouse cursor changes and I can plot the path in labview.
My problem is that while rotating the robot, mouse is rotate too but the cursor is still on the staigth way. my question is that how can I rotate the xy graph online so that i can plot the path by this trick.
thank you
mohammad
Solved! Go to Solution.
03-29-2015 01:58 AM
Can you make an illustration of what you want?
03-29-2015 08:04 AM
03-29-2015 10:30 AM
Movement on a 2D plane (I'm assuming your robot is rolling around on the ground) takes three parameters to specify location and orientation, X, Y, and Heading. Most mice are designed to give you X and Y, assuming that you maintain a constant heading. I just tried turning my Logitech mouse, and noticed X and Y moved a lot -- that's because the sensor is eccentric in the mouse, so the rotation got "mapped" into X and Y, but not heading.
You can solve this by using two mice and "doing the math" (may take some experimentation to get the proper constants) to map rotation into mice outputs. Note that choosing the origin of your robot coordinate system (relative to the "origins" of the mice) is also important.
Finally, the plot you want to make is probably not a "moving cursor" (since I don't know an easy way to make a cursor rotate) but a simple representation of your robot moving around on the screen. Christian Altenbach recently answered a "math problem" Jeff Bohrer posted where he created such a display (maybe a week ago) -- give him credit for the design if you "borrow" it.
Bob Schor
03-29-2015 02:29 PM
When you rotate your robot, how do you know how far it has turned or what its new heading is? You will obviously need this data to replot the graph.
Given the heading, it should not be difficult to calculate the new movement by taking your XY data from the mouse and a little simple trigonometry. In fact, you shouldn't need to rotate the graph, just calculate the correct position based on mouse data and heading.
03-30-2015 09:51 AM - edited 03-30-2015 09:53 AM
Look at chip driver and doc of the sensor. My opto mouse will compensate a rotation due to hand rotation on a continous move 🙂
So the rotation information seems to captured and transmitted.
There are many mouse sensor hacks documented in the www.....
03-31-2015 01:34 AM
Simply I want to sense the rotation of robot while the the mouse is rotating too. But if the robot (and the mouse that is fixed on it) turn left (or right) the graph is still showing that the robot is moving straigth. My Idea is to rotate the graph in order to sensing the rotation.
thank you for you attention
Mohammad
03-31-2015 01:40 AM
thank you very much. You answer is so excellent. I can do some mathematicla work on your idea and solve my problem.
thank you for attention
Mohammad