Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

bebo323

I am trying to use my inverse kinematics m file from Hw 12 problem 2b to finish the inverse kinematics code in the lynx6.m file for the demo. I have been adjusting my code all evening to get my results to match the ones in Hw 12 solution. I have 3 of the 5 angles correct but I can not get the other 2 correct. The thing about it is the angles that are correct depend on the angles that are wrong. I get wrong values for alpha2 and alpha3. Alpha3 is the first angle I calculated in the program. I think the problem is in the creation of Pw = g*inv(g6). I use Pw to get my x, y and z values.

  • one year ago
  • one year ago

  • This Question is Closed
  1. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Can you help?

    • one year ago
  2. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I am using the linklen values 80, 155, 155, 30 and 70 and the gi configuration from Hw 12 problem 2 as inputs to my function file that contains the inverse kinematics

    • one year ago
  3. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Are the solutions to hw 12 problem 2b correct?

    • one year ago
  4. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    You could try doing the gf inverse kinematics. I'm sure at least one of them is correct. Aside from that, I would just do some print statements to see if things look the way they're supposed to look. For instance do you get a pure rotation matrix when you do gw^-1*ge*g6^-1? That kind of thing. Also it may be useful for your partners to take a look at it. They may notice a mistake that you don't.

    • one year ago
  5. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Correy and I have been working on this since Thursday. I have reduced the code down to just getting alpha3 correct with no luck using gi or gf. I figured if I can get the first and easiest angle correct there is no since correcting the rest of the code. I have not tried the gw^-1*ge*g6^-1 yet. I will try that and see what I get.

    • one year ago
  6. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah just start with the simplest thing - see if you are getting the position of the wrist correct. For instance if you set all joint angles equal to 0 except the last 2, you should get pack a wrist position of (0,0,z) because the wrist wouldn't have moved in the x or y.

    • one year ago
  7. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I do get a pure rotation when I do gw^-1*ge*g6^-1

    • one year ago
  8. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Ok well it sounds like you're getting the first three angles right then.

    • one year ago
  9. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    If I set alpha1, 2, 3 and 4 = 0 and alpha5 and alpha6 not = to 0 I should get (0, 0, z) as a position?

    • one year ago
  10. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Does the position of the wrist change in the case you described?

    • one year ago
  11. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    It will take me time to code the program to accept individual angles (alpha1, 2, 3, 4, 5, 6) as opposed to an end effector and give position

    • one year ago
  12. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm sure you know how to make an end effector configuration given some joint angles. In fact you have a function that does that.

    • one year ago
  13. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I can easily make the program

    • one year ago
  14. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    You don't need to make any program. Just calculate the end effector configuration that you want to input.

    • one year ago
  15. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I have a program that gives me an end effector given angles. I entered the end effector into my inverse kinematics program to give me back the same angles. The angles I entered where [0 0 0 30 55] in degrees, the angles I got back were [ 0 -0.0031 0.0062 -2.9976 -1.5508].

    • one year ago
  16. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Ok so the first 3 look right. Now you just need to get the last 2

    • one year ago
  17. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Is linklen 1 and 2 combined or linklen 4 and 5? In our manipulator linklen 1 and 2 are combined.

    • one year ago
  18. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    It's up to you how you want to do it as long as it makes sense in your forward kinematics

    • one year ago
  19. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I just wanted to get this inverse kinematics working but I can not even get it to give me the first angle correct. I did not think of creating my own end effector with know angles to test the inverse that was a help. I will keep working on it and hope I figure it out.

    • one year ago
  20. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Why do you think your first angle is incorrect? Seems to be correct to me

    • one year ago
  21. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    My first angle has been 'correct' so far in all of my tests. The first angle as I calculate it is based on alpha3 as well as alpha2. Since alpha3 is not correct that implies everything based on alpha3 is incorrect.

    • one year ago
  22. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't understand that. Alpha1 only depends on xw and yw right?

    • one year ago
  23. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Also why do you think your alpha3 is wrong?

    • one year ago
  24. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I do not get the answer on Hw 12 problem 2b when I enter in the gi or gf as my end effector.

    • one year ago
  25. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Well remember that there are a few different solutions if you gw^-1*ge*g6^-1 gives you a pure rotation that's a pretty good sign that your alpha1,2,3 are right.

    • one year ago
  26. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I do get a pure rotation when I calculate gw^-1*ge*g6^-1

    • one year ago
  27. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Ok then most likely your 1,2,3 are right. gotta go

    • one year ago
  28. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks later

    • one year ago
  29. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I have all my alphas correct but only if I chose the correct options. Option one: the inverse cos of alpha3 can be plus or minus from that I use the quadratic equation and get more possible answers. If I make a choice of +cos^1 or -cos^-1 and which omega to use, run the program, see the answers do not apply, I can make different selections and rerun the program until I do get all 5 angles correct. Am I making this harder than it needs to be? Do I need to put in conditional statements to avoid incorrect answers? How do I deal with the opnning and closing of the gripper?

    • one year ago
  30. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Last question first: an input to your function should be w, the width of the object which I will input at the demo. Yes you need to figure out automatically which angles are the correct ones. You can check the first angle you find to see if it is within alphalims. If it is, continue down that line. If not, try the other one. Etc.

    • one year ago
  31. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I was thinking of having the inversekin m file recreate all 16 end effector possibilities using the 16 vectors of alphas it calculated. Then comparing each reconstructed end effector to the inputted end effector. Once a match is found the inversekin would select that vector of alphas as the correct alphas.

    • one year ago
  32. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    That still ignores the possibility that one of the commanded angles is outside the alphalims right?

    • one year ago
  33. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes but since I do not actually know the correct alphas (in a real life setting), I do not see a way to correct that problem. Unless I place a condition on the inversekin m file to ignore angles outside a range of approved angles.

    • one year ago
  34. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    When you're testing your possible angles to see if they match the given end effector, throw out any vectors that include angles outside your range. I mean at the end of the day you actually have to pick something up and put something down. It's your job to make sure that actually happens.

    • one year ago
  35. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    My range is between -90 to 90 on all angles. The hw12 problem 2b end effector configuration had an angle of 2*pi/3 = 120. A simple < or > conditional statement is incomplete when I encounter these angles.

    • one year ago
  36. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't understand what you mean. You cannot determine if a given angle is between -90 and 90?

    • one year ago
  37. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    No. I am working on what you said. One moment

    • one year ago
  38. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I did not think of dismissing vectors of angles because one angle in that vector is out of range.

    • one year ago
  39. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    That would not dismiss all but correct answer but that should reduce the number of end effectors I need to calculate.

    • one year ago
  40. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah there will still be a few correct answers. Just pick one

    • one year ago
  41. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    Ok if you have time can we go over this gripper part? I have not gotten into it but can you discuss the idea of where it gets inputted to. I mean if I have the gi and gf end effectors so I am oly entering two things in and I now know I will have a gripper open and close value Where and how will the program know when to execute it?

    • one year ago
  42. Chipper10
    Best Response
    You've already chosen the best response.
    Medals 0

    So there is some kind of routine that your manipulator should go through as defined in the homework. At some point it closes the gripper to some value. Instead of hardcoding that value, leave it as a variable which I can input into the function.

    • one year ago
  43. bebo323
    Best Response
    You've already chosen the best response.
    Medals 0

    I am getting complex numbers in my rotation matrix. atan can not deal with complex numbers. If the quadratic formula gives a comlpex number can I disregard that number as an option for creating alphas?

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.