Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Inverse Kinematics (Robotic Arm)

Archive: 5 posts


So LBP2 is really, really cool at providing "Inverse Kinematics" - the ability to say where you want something (like the end of a robotic arm) and the physics engine will work out what angle the joints need to be at to get it there. Just slap a follower on the end of the arm and you're done!

But there is a problem.

I want to have an arm where the end stays fixed at the same angle (pointing downwards) and it follows an object to pick up.

This means there are 3 constraints (x position, y position and angle). So consequently I need 3 joints in my robotic arm, to give enough degrees of freedom to meet the constraints. So far so good.

But the problem is, even though there are no more degrees of freedom left, there are still multiple angles that give a correct solution (the arms being "buckled" the other way). When I try following an object with this, it often bends the "wrong" way, so that the bottom part of the arm is bent way over to the side and it looks awkward. I tried sticking a gyro on the bottom part of the arm to keep it more upright, but when it is close to the correct angle for the gyro it keeps it locked in the same place, reducing the degrees of freedom and thus meaning the end of the arm is no longer pointing downwards.

Has anyone got decent robotic arms working? I know there are some in the Mm levels...
2011-03-16 19:58:00

Author:
thor
Posts: 388


You've already placed a gyro on the part you want to point down which I would think is correct. But I'd try messing with the strength. But you might have to put some movers on the arm to assist with the final movement because I don't believe a follower would be able to override the gyro.

Also, it may not be what you want, but you might want to use a sequencer to move each of the parts in turn, to position it where you want it to go. I may have to play with this when I get home.

I was also wondering what would happen if you put some weak rotators on each section, so the follower could override them, but the tendency would be that each joint bends in the direction you want.
2011-03-16 20:19:00

Author:
Shanghaidilly
Posts: 153


You could also try putting some springs on the arms to sort of push the IK solution toward where you want it.2011-03-16 21:01:00

Author:
Unknown User


Springs may be a viable solution, but personally, I would go with low strength motor bolts. They should be weak enough to be overpowered by the regular movement, but strong enough to affect which direction a joint bends when the hand moves in.2011-03-16 23:19:00

Author:
Sehven
Posts: 2188


I actually managed to do this, kind of. I ended up with a long segment coming from the floor, bound with 2 non-stiff springs to keep it roughly central, and bolted on with a max-strength sprung bolt. I then had 3 more segments but put gyros on the last 2 to keep them upright. The second-to-last segment didn't always keep upright because it needed some give, that's why I didn't just glue it on.

But I realised that, perhaps, the mathematical solution to the problem does not actually have a continuous solution! Using this method, the arm would follow the object until it moved to the right, and then the middle joint would "snap" to the other way around, so that it looks right. Then it would move to the left again, and the same thing would happen. I think for certain paths there has to be such a "snap" (discontinuity) between 2 states to make it look right. And that snap is not always desirable because it tends to wobble a bit and it no longer looks like a sturdy robot arm.

Looking at the Mm level (Waste Disposal in "The Factory of A Better Tomorrow") that uses robotic arms I can see that they suffer from a similar "problem". I think it is just the nature of how those robotic arms have to move. So taking inspiration from their level, I have redesigned my arm so that it is made of 3 joints on top of a steel support. It still buckles the "wrong" way but in this setup it doesn't look too bad. Other things Mm used included hovering over the object to be picked up before swooping down and grabbing it. Looks really good, I think I'll borrow that
2011-03-17 00:07:00

Author:
thor
Posts: 388


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.