I'm sorry what?
I have to create a node-based AI navigation system to make our school's robot kick ass. If you don't understand that, just get this: I need to measure how far the robot has moved from its starting point. I need the x and y components of the difference in position (if the surface of the playing field is the plane)
My robot is configured like this (the black lines are wheel connected to motors. The gray box is the robot's shape. It is a :
Here is an example of a similar drive train (our drive train is a shitton better than this though ofc...)
I have this:
*An optical quad encoder (any number of them)
- They can be used to measure the amount any joint has rotated. I.e, I could attach it to a wheel and measure how far it has traveled.
*A 'line-follower'
- Emits an infared light and measure the intensity of the reflection. Basically, I can use it to measure how white a surface is (how well it reflects light.) Good for checking if I am over a while or black line (hence what it is called a line-follower)
* Ultra-sonic range finder
- Omits an ultrasound wave, measures the time it takes for it to reflect back - can be used to measure the distance between the robot and an obstacle or some bs.
* Analog Accelerometer
- Measures acceleration of body it is attached to in three-axis. Probably my best bet, but it is expensive and probably not that great in terms of accuracy (which I need a lot of.) Anyone use one of these before? How accurate are they?
How can I measure the change in position?
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
I'm sorry what?
... hi
[IMG]https://i1283.photobucke*****m/albums/a546/MintSica/82d7_zps705242c3.gif[/IMG]
Useful links: MPGH Rules | Scammers Grave | Support Sections | How to use IM
Contact me: Visitor Message | Add me on IM | Private Message
Other links: Social Engineering Section | Announcements
MPGH Dark Theme
Super User since 02.02.2020
Global Moderator since 09.23.2017
Moderator since 09.01.2016
Minion+ since 07.22.2016
Marketplace Minion since 06.09.2016
Trove Minion since 06.06.2016
Middleman since 04.21.2016
Social Engineering Minion since 02.03.2016
News FO Freelancer From 11.08.2015 to 07.23.2016
News FO Head Editor From 08.23.2015 to 11.08.2015
News FO Head Editor From 07.19.2012 to 08.11.2014
MPGH News and News FO Founder
Programming Minion From Unknown to 04.23.2013
Minecraft Minion From 09.19.2012 to 04.23.2013
Member since 05.13.2012
Can't you just find the vector of the x,y distances on the wheels?
Can't think of anything else...
edit:
Also are we talking scalar or vector quantity?
Last edited by Gragodine; 11-24-2012 at 01:35 AM.
[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/Untitled.jpg[/IMG][IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/NuCor.jpg[/IMG].Gragtastic.Failed Genius[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/124Member1.png[/IMG]
You won't find a good answer unless someone like Lehsyrus comes.
[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/Untitled.jpg[/IMG][IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/NuCor.jpg[/IMG].Gragtastic.Failed Genius[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/124Member1.png[/IMG]
smarty pants.
I'm only in high school and am early in Java with Karel, so I might not be the best @Jetamay, but this would be my guess
To find the speed of your robot, use the encoder with the finder; the encoder to take the rotations of the wheel, and the finder to calculate distances traveled per rotation or time, etc and use that to find speed
As for distance traveled, if you're only talking about the range from origin to robot, then just stick the range finder at the middle of the robot and have it check back with the origin
If you're talking about total distance it has traveled, then use the speed one, calculate the distance in respect to time, and so on
Calculus :\
Last edited by Gragodine; 11-24-2012 at 11:55 AM.
[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/Untitled.jpg[/IMG][IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/NuCor.jpg[/IMG].Gragtastic.Failed Genius[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/124Member1.png[/IMG]
Listen Jeta ask an asian.
Reported Denelf for off-topic spam.
The first two are useless, they are good for following a specific pattern. What you need to do is use the range finder and the accelerometer to find the distance traveled. Now, I would use the line follower to simply set out a track to the object who's distance you need to measure.
If you use the ultra-sonic range finder, you can get te information on the distance to multiple objects. You need to take this data and set it in a way so you can diversify the differen objects. By this I mean your program must be able to take I the information from te range finder, as in the different distances based on the delayed reflection of the sound waves, and map out the distance to these objects separately, which will allow your program to basically create a distance map between itself and each obstacle accordingly. It's like using sonar to map out the bottom of the ocean.
What I said above only counts for going in a straight line.
If you are turning and moving in general, you need to use the optical quad encoder. By measuring the amount a joint has turned, to can set it to update the range finder as to which object is which. Basically, it allows you to rotate the map, whilst still knowing which object is which that it initially measured.
Basically you are relying on the range finder and you're ability to take that raw data and write an algorithm that allows it to map out its surroundings. While turning you need to use the quad encoder to manipulate the range finders data to know where each object it initially measured still is. This will give you a (near) triangulated position of your robot at all times, allowing to to measure the distance.
On the same token, you can use the accelerometer if you are mobo in a straight line to measure your speed, and then the circumference of the wheels. Use the quad encoder to measure the wheel rotation speed rather than joint movement degree.
X = distance covered by one full rotation of the wheels.
Y = total distance traveled.
Z = number of rotations by the wheel.
Z=Y(Pi)/X
ACTUALLY nigga you can probably use the line follower and use it on the wheels! Paint the wheels black on the tread and put a small white line on it. Set up the line follower so it's looking at the wheel. Each full rotation of the wheel the line follower will send a command saying t saw the line. Now have it count the amount of times it saw the line and that's the number of rotations. More lines would bring it to a more precise calculation.
I have more ideas but I'd rather give them to you visually.
@Jetamay
[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/Untitled.jpg[/IMG][IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/NuCor.jpg[/IMG].Gragtastic.Failed Genius[IMG]https://i1060.photobucke*****m/albums/t452/Gragodine/124Member1.png[/IMG]
With the materials he's allowed to use he has to be in a controlled environment I had the same project except I had an infrared line measurement thing-a-majig (forget the name) that measured the distance to an object directly in front of it, though my test was in a controlled environment.
@Jetamay where exactly is this going to go on? I might be able to come up with an algorithm for you if I can get more specifics.