Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    𝕡𝕠𝕔𝕜𝕖𝕥𝕤 𝕤𝕠 𝕗𝕒𝕥
    Admin
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    22,698
    Reputation
    3409
    Thanks
    10,669
    My Mood
    Yeehaw
    Get the angular rotation of the wheels (which you should have, but you can use the optical quad encoder to do it), you can multiply it by the radius of the wheel, times 2pi to get the circumference, then you'll know how many times it turned, and if I got the diagram correctly, it can only move horizontally and vertically. Two independent wheels would give you the x and y distance travelled.

    ---------- Post added at 09:34 PM ---------- Previous post was at 09:32 PM ----------

    AND YOU CALL YOURSELF A PROGRAMMER... UGH.



    v1.96 - Tutorials, Upgraded Town, Def Revamp
    v1.97 - Cutscenes/Quests, Friend List
    v1.98 - Classes, Necklace/Rings
    v1.99 - Guilds
    v2.00 - Open Beta


  2. #17
    M.S's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    IDK.. ಠ_ಠ
    Posts
    433
    Reputation
    10
    Thanks
    45
    I DIDN'T EVEN READ IT I JUST SAW THAT PIC AND RAN AWAY

  3. #18
    Gragodine's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    C:\Users\Gragodine\My Documents\Grag.exe
    Posts
    703
    Reputation
    98
    Thanks
    72
    My Mood
    Amused
    Next thing jeta needs to do is weponize it and sell it to dabe.
    .Gragtastic.
    Failed Genius

  4. #19
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,813
    My Mood
    Sad
    Quote Originally Posted by arunforce View Post
    Get the angular rotation of the wheels (which you should have, but you can use the optical quad encoder to do it), you can multiply it by the radius of the wheel, times 2pi to get the circumference, then you'll know how many times it turned, and if I got the diagram correctly, it can only move horizontally and vertically. Two independent wheels would give you the x and y distance travelled.

    ---------- Post added at 09:34 PM ---------- Previous post was at 09:32 PM ----------

    AND YOU CALL YOURSELF A PROGRAMMER... UGH.
    It can also rotate 360 degrees and turn. Take the distance traveled on each wheel after it has rotated and turned at a range of 0-90 degrees in either direction. Using just the distances of the wheels, it is mathematically impossible to solve for the distance in the x and y axis. Trust me, I spent like 4 hours on it.
    @Lehsyrus the environment is 100% predictable and known. All the entities accross the playing field can be preprogrammed inside of the robot. There is no need to detect obstacles.

    Accross the playing field are cells (of very poor resolution) composed of white lines. The line followers could signal the robot whenever it has crossed a particular cell. If the location of this cell is know (and it is) the robot can resynchronize its position with the playing field if there are small errors.

    I don't think I would need to measure the circumference of the wheels if I were using the accelerometer. I can calculate distance from acceleration itself.

    I've got an interesting idea though (I'm not sure if it is what you were trying to explain to me.) I could attach the range-finder to a quad encoder and a moter thus allowing me to set it to point towards a given angle. After doing that, I could measure my distance relative to other entities or obstacles preprogrammed inside of the field and (with two given distances from any two obstacles) solve for my x and y position. What do you guys think?



    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?


  5. #20
    𝕡𝕠𝕔𝕜𝕖𝕥𝕤 𝕤𝕠 𝕗𝕒𝕥
    Admin
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    22,698
    Reputation
    3409
    Thanks
    10,669
    My Mood
    Yeehaw
    Quote Originally Posted by Jetamay View Post
    It can also rotate 360 degrees and turn. Take the distance traveled on each wheel after it has rotated and turned at a range of 0-90 degrees in either direction. Using just the distances of the wheels, it is mathematically impossible to solve for the distance in the x and y axis. Trust me, I spent like 4 hours on it.
    Can the wheels rotate? If the wheels cant but the robot can, you can still calculate the X and Y distances.



    v1.96 - Tutorials, Upgraded Town, Def Revamp
    v1.97 - Cutscenes/Quests, Friend List
    v1.98 - Classes, Necklace/Rings
    v1.99 - Guilds
    v2.00 - Open Beta


  6. #21
    ☬Ξητσρζ Ζσ♍βε δτσηε☬
    Former Staff
    Premium Member
    Lehsyrus's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Jersey
    Posts
    10,900
    Reputation
    1281
    Thanks
    3,071
    Quote Originally Posted by Jetamay View Post
    I've got an interesting idea though (I'm not sure if it is what you were trying to explain to me.) I could attach the range-finder to a quad encoder and a moter thus allowing me to set it to point towards a given angle. After doing that, I could measure my distance relative to other entities or obstacles preprogrammed inside of the field and (with two given distances from any two obstacles) solve for my x and y position. What do you guys think?
    Well that makes this a shit ton easier. That would work, though I feel like it's more work. If you were to do the equation @arunforce gave, you can get the distance traveled purely by the amount of rotation the wheels have turned. Actually, it may be even easier if you were to attach the range-finder to the quad encoder to instead measure the amount of rotation by each wheel to give an exact measurement. From there you can take the amount of degrees the wheel has rotated and get the exact distance the wheel has put you forward and back when stopping, from there you can plug in the equation I gave before (the same one arunforce gave but I shorthanded it) to get the overall distance with a full rotation.

    So we would need the linear distance and we would have: Dπ * R = T

    Where D is the diameter,
    π is Pi,
    R is the amount of revolutions,
    and T is the total distance traveled.

    So to get the distance traveled when stopped if it wasn't a full revolution you would want to take the same equation, however instead of using R as the amount of revolutions, you want to take the degree of rotation, use it as a decimal, and plug that in, then add everything together.

    Now that I think about it, you might only need to use the quad encoder to count the amount of times the wheel has rotated, have it translate that using the formula above into the distance traveled, and profit.

    Is there a specific point on the robot that needs to be used to calculate the distance? Then you're going to need to get the measurement to that point and plug that in as well.

  7. #22
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,813
    My Mood
    Sad
    Quote Originally Posted by arunforce View Post


    Can the wheels rotate? If the wheels cant but the robot can, you can still calculate the X and Y distances.
    The wheels can spin on their axis.

    Imagine this: The the wheels to left and right move forward x units. Now that is a totally different ending position than if the right wheel moved x units while the left wheel did not, then after the left wheel moves x units and right wheel does not.

    In the first case (both wheels move forward x units) the robot will move straight.

    In the second, the robot will rotate with the left wheel as a pivot x units, then rotate with the right wheel as pivot at x units.

    Same distance, totally different final location. Maybe I am not understanding you properly though.
    Last edited by radnomguywfq3; 11-24-2012 at 10:14 PM.



    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?


  8. #23
    𝕡𝕠𝕔𝕜𝕖𝕥𝕤 𝕤𝕠 𝕗𝕒𝕥
    Admin
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    22,698
    Reputation
    3409
    Thanks
    10,669
    My Mood
    Yeehaw
    Quote Originally Posted by Jetamay View Post
    The wheels can spin on their axis.

    Imagine this: The the wheels to left and right move forward x units. Now that is a totally different ending position than if the right wheel moved x units while the left wheel did not, then after the left wheel moves x units and right wheel does not.

    In the first case (both wheels move forward x units) the robot will move straight.

    In the second, the robot will rotate with the left wheel as a pivot x units, then rotate with the right wheel as pivot at x units.

    Same distance, totally different final location. Maybe I am not understanding you properly though.
    I'm a bit confused. If it pivots on one wheel, the distance travelled would be in the shape of a circle, so couldn't you just just measure the center (assuming it pivots from there) out to the wheel, and consider that the radius, and if you know the angle, then you can calculate the distance travelled.

    I'm kinda confused, can you draw a 2 picture diagram with a point of origin showing it rotate?

    Also are you looking to determine its position absolutely (like -10m, -5m) on a coordinate plane, or are you trying to determiine how many feet is moves in each axis like to calculate how far its travelled?
    Last edited by arunforce; 11-24-2012 at 10:34 PM.



    v1.96 - Tutorials, Upgraded Town, Def Revamp
    v1.97 - Cutscenes/Quests, Friend List
    v1.98 - Classes, Necklace/Rings
    v1.99 - Guilds
    v2.00 - Open Beta


  9. #24
    noob555's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    o.O
    Posts
    8,235
    Reputation
    511
    Thanks
    1,230
    Quote Originally Posted by Lehsyrus View Post


    Well that makes this a shit ton easier. That would work, though I feel like it's more work. If you were to do the equation @arunforce gave, you can get the distance traveled purely by the amount of rotation the wheels have turned. Actually, it may be even easier if you were to attach the range-finder to the quad encoder to instead measure the amount of rotation by each wheel to give an exact measurement. From there you can take the amount of degrees the wheel has rotated and get the exact distance the wheel has put you forward and back when stopping, from there you can plug in the equation I gave before (the same one arunforce gave but I shorthanded it) to get the overall distance with a full rotation.

    So we would need the linear distance and we would have: Dπ * R = T

    Where D is the diameter,
    π is Pi,
    R is the amount of revolutions,
    and T is the total distance traveled.

    So to get the distance traveled when stopped if it wasn't a full revolution you would want to take the same equation, however instead of using R as the amount of revolutions, you want to take the degree of rotation, use it as a decimal, and plug that in, then add everything together.

    Now that I think about it, you might only need to use the quad encoder to count the amount of times the wheel has rotated, have it translate that using the formula above into the distance traveled, and profit.

    Is there a specific point on the robot that needs to be used to calculate the distance? Then you're going to need to get the measurement to that point and plug that in as well.
    aren't you in high school

  10. #25
    ☬Ξητσρζ Ζσ♍βε δτσηε☬
    Former Staff
    Premium Member
    Lehsyrus's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Jersey
    Posts
    10,900
    Reputation
    1281
    Thanks
    3,071
    Quote Originally Posted by noob555 View Post
    aren't you in high school
    Nah dude I take online classes for university. I graduated two years ago.

  11. #26
    Gragodine's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    C:\Users\Gragodine\My Documents\Grag.exe
    Posts
    703
    Reputation
    98
    Thanks
    72
    My Mood
    Amused
    Quote Originally Posted by Jetamay View Post
    The wheels can spin on their axis.

    Imagine this: The the wheels to left and right move forward x units. Now that is a totally different ending position than if the right wheel moved x units while the left wheel did not, then after the left wheel moves x units and right wheel does not.

    In the first case (both wheels move forward x units) the robot will move straight.

    In the second, the robot will rotate with the left wheel as a pivot x units, then rotate with the right wheel as pivot at x units.

    Same distance, totally different final location. Maybe I am not understanding you properly though.
    I think some IF statements are in order.

    if robot turning on internal axis
    Do not add distance to total distance.

    Simple.
    .Gragtastic.
    Failed Genius

  12. #27
    Tall kiwi's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Living in Kiwi land
    Posts
    4,536
    Reputation
    325
    Thanks
    573
    My Mood
    Cheerful
    @Lehsyrus and @arunforce ... Reading through your comments and I'm amazed at how much knowledge you guys have in this field
    Oh hai der.

  13. #28
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,813
    My Mood
    Sad
    Quote Originally Posted by arunforce View Post


    I'm a bit confused. If it pivots on one wheel, the distance travelled would be in the shape of a circle, so couldn't you just just measure the center (assuming it pivots from there) out to the wheel, and consider that the radius, and if you know the angle, then you can calculate the distance travelled.

    I'm kinda confused, can you draw a 2 picture diagram with a point of origin showing it rotate?

    Also are you looking to determine its position absolutely (like -10m, -5m) on a coordinate plane, or are you trying to determiine how many feet is moves in each axis like to calculate how far its travelled?
    Yar I can, but how do I know it has been pivoting. I need an absolute coordinate (x, y)

    Okay, technically, I can assume when it has started and finished pivoting on which wheel since I am responsible for putting it inside of that pivoting cycle. I know this, but I think it is a very sloppy way of doing it just because now the calculated position is based off of a lot of different assumptions.

    I.e, we assume no pivoting\rotating whatsoever has occurred when we wish to move in a straight line, the only problem with this is that the motors I am using are nowhere near perfect and the centre of mass is not entirely at centre. What actually ends up happening is the robot begins doing very small bits of rotations and pivoting as it travels between two points and, as you can imagine, this adds up to a pretty inaccurate calculation of position after travelling for a good minute or two.



    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?


  14. #29
    Sirius Black's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Hogwarts
    Posts
    919
    Reputation
    41
    Thanks
    1,219
    My Mood
    Aggressive
    xD i did something like that on 12 grade ...

  15. #30
    𝕡𝕠𝕔𝕜𝕖𝕥𝕤 𝕤𝕠 𝕗𝕒𝕥
    Admin
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    22,698
    Reputation
    3409
    Thanks
    10,669
    My Mood
    Yeehaw
    Quote Originally Posted by Jetamay View Post
    Yar I can, but how do I know it has been pivoting. I need an absolute coordinate (x, y)

    Okay, technically, I can assume when it has started and finished pivoting on which wheel since I am responsible for putting it inside of that pivoting cycle. I know this, but I think it is a very sloppy way of doing it just because now the calculated position is based off of a lot of different assumptions.

    I.e, we assume no pivoting\rotating whatsoever has occurred when we wish to move in a straight line, the only problem with this is that the motors I am using are nowhere near perfect and the centre of mass is not entirely at centre. What actually ends up happening is the robot begins doing very small bits of rotations and pivoting as it travels between two points and, as you can imagine, this adds up to a pretty inaccurate calculation of position after travelling for a good minute or two.
    If it was in a box room with no obstacles you could just bounce it off the walls using the ultrasonic range finder. Or you could run a simulation like the Mars Rover does, like if the steps are preprogrammed, assuming everything is accurate, you could simulate where it would end up and use the simulation to determine the coordinates. Dunno if your bot has the capabilities to do it, might need a computer to talk to.
    ---
    Urgh just re-read your thing, if your thing is as inaccurate as you said, you probably won't be able to simulate it, though you should, but I'll just assume this is a tight budget project. One thing you could do is like leave a reflector at the origin and using a laser or something to bounce off it, assuming you have line of sight to it, but that would only give the distance, not the angle, so you wouldn't be able to get the components.

    The analog accelerometer would be your best bet, attach it to the center of rotation, and as long as you know how many degrees you turned, you can derive the velocity and keep a constant track of it.
    Last edited by arunforce; 11-25-2012 at 04:15 PM.



    v1.96 - Tutorials, Upgraded Town, Def Revamp
    v1.97 - Cutscenes/Quests, Friend List
    v1.98 - Classes, Necklace/Rings
    v1.99 - Guilds
    v2.00 - Open Beta


Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. First time i used C4D in a sig
    By Brizingir in forum Showroom
    Replies: 14
    Last Post: 09-23-2009, 08:45 AM
  2. use your imaaaaagination =D
    By megaflcl in forum Help & Requests
    Replies: 1
    Last Post: 01-23-2009, 12:56 PM
  3. How to start using your agbot!
    By poon hacker in forum Silkroad Online Hacks & Cheats
    Replies: 0
    Last Post: 09-06-2008, 12:57 AM
  4. Use your head boy'
    By yahagashi in forum General
    Replies: 9
    Last Post: 01-02-2008, 12:15 AM
  5. Use your xbox as a computer!
    By Dave84311 in forum General
    Replies: 2
    Last Post: 01-15-2006, 02:25 PM